-
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 extra CNOT inserted in Patel-Hayes-Markov algorithm #5044
Conversation
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.
Thanks a lot for this fix! It's always nice to see an old issue being closed :)
Some comments inlined. I would also add a test for example 4.3
What do you think about this? |
Sure, I added example 4.3 as a test case which exposed a bug with PMH |
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.
Thanks a lot ! Welcome to the project!
No problem! Happy to help :) |
Summary
Fixes #2718
Details and comments
Happened to see this and thought I would fix it quickly. The graysynth part had a bug where the output of Patel-Markov-Hayes was reversed. The extra CNOT is just what the PMH algorithm on its own produces, but I had a tweak in my implementation that dealt with these situations so I added it in here.