-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
2115 pauli twirling callibration of expectation estimation shadow needs continue #2116
2115 pauli twirling callibration of expectation estimation shadow needs continue #2116
Conversation
…on-of-expectation_estimation_shadow-needs-continue
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2116 +/- ##
=======================================
Coverage 98.21% 98.21%
=======================================
Files 87 87
Lines 4135 4135
=======================================
Hits 4061 4061
Misses 74 74 ☔ View full report in Codecov by Sentry. |
means.append(0.0) | ||
continue |
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.
means.append(0.0) | |
continue | |
product = 0.0 |
Is this equivalent? If so, I would suggest using product = 0.0
since it makes the workflow more linear and easier to debug in the future.
If my suggestion doesn't work, I am fine with continue
.
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.
That makes sense. Should a similar thing be done with the "else" on line 374 (when there aren't any matches between the measurement_outcome and the pauli_str expected outcomes.) That else would also include a product = 0.0 and at the end of the for loop do a single means.append(np.sum(product) / len(idxes))?
…on-of-expectation_estimation_shadow-needs-continue
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 @bdg221 !
fixes #2115
Added
continue
to the case where f_val from the pauli twirling calibration is None.This now prevents an additional mean value being incorrectly included for a particular split.
License
Before opening the PR, please ensure you have completed the following where appropriate.