-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Bugfix in _strat_has_stabilizer_effect_from_decompose
#6467
Bugfix in _strat_has_stabilizer_effect_from_decompose
#6467
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6467 +/- ##
=======================================
Coverage 97.82% 97.82%
=======================================
Files 1115 1115
Lines 97448 97452 +4
=======================================
+ Hits 95327 95331 +4
Misses 2121 2121 ☔ View full report in Codecov by Sentry. |
to stop the recursion. if it has 3 or less qubits then the Cirq/cirq-core/cirq/protocols/has_stabilizer_effect_protocol.py Lines 78 to 85 in 6a40da5
if it outputs the wrong result then the bug will be there not here. is there an example of this producing the wrong result? |
The bug was in
I think the check is redundant, because the control flow would reach the decomposition strategy only when it couldn't figure out the answer using the first 3 strategies and that would imply a scenario where, for example, the operation decomposes into non unitary operations (eg: measurements + cliffords) and therefore we should continue to check decomposition. An example in the test shows a scenario where |
Let's wait and not merge right now, I need to run some more tests |
Fixes quantumlib/Qualtran#665
@NoureldinYosri Do you remember why you added the following check?