-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
LRE failure for chunking #2608
base: main
Are you sure you want to change the base?
LRE failure for chunking #2608
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2608 +/- ##
=======================================
Coverage 98.73% 98.73%
=======================================
Files 92 92
Lines 4193 4198 +5
=======================================
+ Hits 4140 4145 +5
Misses 53 53 ☔ View full report in Codecov by Sentry. |
Converting this back to draft because @natestemen suggested to write a better test. |
mitiq/lre/tests/test_lre.py
Outdated
assert abs(lre_exp_val - ideal_val) <= abs(noisy_val - ideal_val) | ||
# verify we get an expectation value | ||
assert(lre_exp_val_chunking) > 0 | ||
|
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.
@natestemen I cannot think of a better test here. Which is why I decided to check the function does provided a non-zero expectation value.
test_layerwise_folding
already has a test comparing the number of noise-scaled layers for a chunked and a non-chunked circuit.
Description
Noticed in #2601
https://github.com/unitaryfund/mitiq/actions/runs/12433520415/job/34715234002?pr=2601#step:6:4591
Originally, the test was written to confirm chunking a circuit performs worse in certain scenarios. However, this performance varies non-deterministically. Due to this reason, now the test is verifying there is a difference between two expectation values.
License
Before opening the PR, please ensure you have completed the following where appropriate.