Bugfix in _strat_has_stabilizer_effect_from_decompose#6467
Bugfix in _strat_has_stabilizer_effect_from_decompose#6467tanujkhattar merged 1 commit intoquantumlib:mainfrom
_strat_has_stabilizer_effect_from_decompose#6467Conversation
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?