Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve controlled gate support #164

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Improve controlled gate support #164

merged 2 commits into from
Mar 6, 2024

Conversation

speller26
Copy link
Collaborator

Right now, a controlled gate is included in the supported gates as long as its control qubit count is supported. This change checks whether the base gate of the controlled gate (e.g. rx for crx) is supported as well.

Summary

Details and comments

Right now, a controlled gate is included in the supported gates as long as its control qubit count is supported. This change checks whether the base gate of the controlled gate (e.g. rx for crx) is supported as well.
Copy link
Collaborator

@jcjaskula-aws jcjaskula-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok after a minor tweak.

qiskit_braket_provider/providers/adapter.py Outdated Show resolved Hide resolved
target=qubit_indices[-gate_qubit_count:],
control=qubit_indices[:-gate_qubit_count],
)
for gate in _QISKIT_CONTROLLED_GATE_NAMES_TO_BRAKET_GATES[gate_name](
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably a gate transform or decompose mechanism at some point.

Co-authored-by: Jean-Christophe Jaskula <99367153+jcjaskula-aws@users.noreply.github.com>
@speller26 speller26 merged commit e62177d into main Mar 6, 2024
7 checks passed
@speller26 speller26 deleted the ctrl branch March 6, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants