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

Skip transpilation for verbatim circuits #145

Merged
merged 4 commits into from
Feb 8, 2024
Merged

Skip transpilation for verbatim circuits #145

merged 4 commits into from
Feb 8, 2024

Conversation

speller26
Copy link
Collaborator

@speller26 speller26 commented Feb 8, 2024

Summary

Circuits are no longer translated when verbatim argument is passed to run.

Details and comments

Also expands the supported gates check to both BraketLocalBackend and AWSBraketBackend.

@jcjaskula-aws
Copy link
Collaborator

What do you think about cherry-picking these lines and deleting wrap_circuits_in_verbatim_box completely?

@speller26 speller26 changed the title Check supported gates in both backends Skip transpilation for verbatim circuits Feb 8, 2024
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.

Just a single comment, I'm fine either way.

def _get_gateset(self) -> Optional[set[str]]:
action = self._device.properties.action.get(DeviceActionType.OPENQASM)
if not action:
return None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just wonder if we want to keep full control of the gate set (i.e. returning set(BRAKET_TO_QISKIT_NAMES.values())) instead of letting Qiskit choose the gateset.

Copy link
Collaborator Author

@speller26 speller26 Feb 8, 2024

Choose a reason for hiding this comment

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

to_braket actually uses _TRANSLATABLE_QISKIT_GATE_NAMES when gateset=None, so the gateset is in fact always controlled by the provider.

@speller26 speller26 merged commit 10c83f1 into main Feb 8, 2024
7 checks passed
@jcjaskula-aws jcjaskula-aws deleted the supported branch February 9, 2024 00:22
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