-
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
Fix 4-pi periodicity of controlled rotations in the CommutationChecker
(backport #13670)
#13676
Conversation
Cherry-pick of dffc2df has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
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:
|
@Mergifyio rebase |
☑️ Nothing to do
|
I did a manual merge since the rebase didn't seem to work due to the conflict 🙂 |
Pull Request Test Coverage Report for Build 12816910695Details
💛 - Coveralls |
Summary
The commutation checker currently wrongly assumes that the controlled Pauli rotations CRX/Y/Z are equivalent to the identity for multiples of$2\pi$ . However, this is only true for $4\pi$ . Note that CP is indeed $2\pi$ periodic.
Details and comments
The tests were modified to compare the output of the commutation checker to a numeric result instead of a hardcoded one, such that this error shouldn't arise in the future again.
This is an automatic backport of pull request #13670 done by [Mergify](https://mergify.com).