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 |
MarcDrudis
left a comment
There was a problem hiding this comment.
I adressed the comments. Thank you for the feedback!
|
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
RXXbut not forXXPlusYY). This has the power to improve compiler quality, but also speeds up theCommutationCheckerin 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 = 0are also handled. For compiling a 100-qubit QFT circuit (which has loads ofCPhasegates), the runtime on my laptop was reduced as:which is more than I expected given the small substitution.