-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix flakes in pauli_string_measurement_with_readout_mitigation_test #7185
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
Conversation
Ensure random Pauli strings have a non-identity operator for real.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7185 +/- ##
==========================================
- Coverage 98.14% 98.14% -0.01%
==========================================
Files 1100 1100
Lines 96194 96191 -3
==========================================
- Hits 94412 94408 -4
- Misses 1782 1783 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
can this be a symptom of a real bug?
The test flakes were failing on Pauli string validation which rejects identity-only strings, for example, https://github.com/quantumlib/Cirq/actions/runs/14068636480/job/39397251223#step:7:402 The original test code intended to avoid such strings, but could in fact produce them with
This PR ensures that there is at least one non-identity Pauli in the operators dictionary, which prevents the flake. |
Thanks for fixing it! I recall adding the Pauli-I validation to the verification stage, but I overlooked the need to prevent the generation of all Pauli-I test strings in the test file. Thanks for catching the error and fix it quickly! |
…uantumlib#7185) * Deflake pauli_string_measurement_with_readout_mitigation_test Ensure random Pauli strings have a non-identity operator for real. * Add missing spaces to exception message * Simplify - make do without an extra local variable
Ensure random Pauli strings have a non-identity operator for real.
Also add missing spaces to the exception message.
This fixes randomly-seed dependent test failure for
cc: @ddddddanni