-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Parameterize Commutation Checker #13302
Conversation
Co-authored-by: MarcDrudis <MarcSanzDrudis@outlook.com>
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 11594925663Details
💛 - Coveralls |
releasenotes/notes/Parameterized-commutation-checker-8a78a4715bf78b4e.yaml
Outdated
Show resolved
Hide resolved
releasenotes/notes/Parameterized-commutation-checker-8a78a4715bf78b4e.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I adressed the comments. Thank you for the feedback!
releasenotes/notes/Parameterized-commutation-checker-8a78a4715bf78b4e.yaml
Outdated
Show resolved
Hide resolved
I ran the utility scale benchmarks in Average over 10 runs with CX as basis gate
|
Summary
Add support for basic parameterized gates in the commutation checker (props to @Cryoris). This is currently only done for rotation gates that have a single generator (e.g. done for
RXX
but not forXXPlusYY
). This has the power to improve compiler quality, but also speeds up theCommutationChecker
in cases where we have to check if gates are parameterized a lot.Details and Comments
This works by replacing a parameterized gate by it's generator. For example,
RZ(theta)
commutes with a gate exactly if Z commutes with that gate. The special cases oftheta mod 2pi = 0
are also handled. For compiling a 100-qubit QFT circuit (which has loads ofCPhase
gates), the runtime on my laptop was reduced as:which is more than I expected given the small substitution.