-
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 random_clifford
#13606
base: main
Are you sure you want to change the base?
Fix random_clifford
#13606
Conversation
One or more of the following people are relevant to this code:
|
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 @alexanderivrii for fixing this bug!
The tests for 2-qubit Cliffords look good to me.
I wonder if we can also test larger Cliffrods, say with 3 and 4 qubits. We can't check that we generate the entire group (it's just too large), but perhaps we can check that they produce distinct CX counts?
Pull Request Test Coverage Report for Build 12503720653Details
💛 - Coveralls |
Summary
Fixes #13590.
Details and comments
The bug was introduced when porting
random_clifford
to Rust in #12695.I have added tests that ensure that for 2-qubits Cliffords,
random_clifford
produces Cliffords with all possible symplectic matrices (there should be 720) and all possible CX counts (should be {0, 1, 2, 3}). @ShellyGarion, can you think of other tests that we may wish to add?