-
-
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
adding rotated randomized benchmarking circuits to calibrator #2248
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2248 +/- ##
=======================================
Coverage 98.28% 98.28%
=======================================
Files 90 90
Lines 4257 4264 +7
=======================================
+ Hits 4184 4191 +7
Misses 73 73 ☔ View full report in Codecov by Sentry. |
After checking out this branch I was able to do the following.
The errors on lines 344, 345, and 348 of output of
|
Thanks for checking Nate, I'll try correct the errors on lines 344, 345, and 348 of mitiq/calibration/settings.py. |
"num_qubits": 2, | ||
"circuit_depth": 1, | ||
"circuit_type": "rotated_rb", | ||
"num_qubits": 1, |
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.
In the code, you are branching off logic based on the number of qubits. You want at least one test for each of the two logical branches.
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.
you are right!
mitiq/calibration/settings.py
Outdated
0 | ||
] | ||
ideal = { | ||
"0": (2 / 3) * np.sin(theta / 2) ** 2, |
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.
Why not using a variable, say p
, for this expression and then 1 - p
as expression for "1".
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.
good point, that is cleaner
… for rotated rb circuits
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.
LGTM
Note: I haven't checked the math from the issue discussion, so I would feel more comfortable with a second review from somebody who has.
* added rotated rb circuits in calibrator * added tests for rotated rb circuits in calibration * missing numpy import * fixed formatting issue * fix format issue * added a new variable p for probality of measuring 0 and an extra test for rotated rb circuits
Description
This PR will add rotated randomized benchmarking circuits to the calibrator settings as was requested in #2065.
License
Before opening the PR, please ensure you have completed the following where appropriate.