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

Transpiler for OpenQASM decomposing multi-Pauli (rotation) gates #52

Merged
merged 2 commits into from
Apr 5, 2023

Conversation

kwkbtr
Copy link
Contributor

@kwkbtr kwkbtr commented Mar 30, 2023

Since multi-Pauli (rotation) gates are not defined in stdgates.inc, it should be decomposed before converted to OpenQASM.

@github-actions
Copy link

github-actions bot commented Mar 30, 2023

🚀 Deployed on https://deploy-preview-52--quri-parts.netlify.app

@github-actions github-actions bot temporarily deployed to pull request March 30, 2023 02:41 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 30, 2023 02:47 Inactive
@kwkbtr kwkbtr requested a review from lqtmirage March 30, 2023 07:44
Comment on lines 39 to 48
class OpenQASMTranspiler(SequentialTranspiler):
"""CircuitTranspiler which transpiles gates not supported by OpenQASM to
supported ones."""

def __init__(self) -> None:
transpilers = [
PauliDecomposeTranspiler(),
PauliRotationDecomposeTranspiler(),
]
super().__init__(transpilers)
Copy link
Contributor

@lqtmirage lqtmirage Apr 3, 2023

Choose a reason for hiding this comment

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

If there is no special processing, I think it would be acceptable to create a SequentialTranspiler directly.

OpenQASMTranspiler: Callable[[], CircuitTranspiler] = lambda: SequentialTranspiler(
    [PauliDecomposeTranspiler(), PauliRotationDecomposeTranspiler()]
)

@github-actions github-actions bot temporarily deployed to pull request April 5, 2023 02:19 Inactive
@kwkbtr kwkbtr merged commit 2968ad6 into main Apr 5, 2023
@kwkbtr kwkbtr deleted the qasm_transpiler branch April 5, 2023 02:24
@github-actions github-actions bot locked and limited conversation to collaborators Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants