-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add a function for running circuits in a shuffled order with readout error benchmarking. #6945
base: main
Are you sure you want to change the base?
Conversation
…he first commit only extracts qubits from the input circuits. The commit also adds a corresponding test.
… produce readout calibration circuits
Also add some tests to check the correctness of the implementation.
Regarding question 1, I think @dstrain115 was saying that this should go in |
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.
please try to breakdown the method into smaller functions
cirq-core/cirq/experiments/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/experiments/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/experiments/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/experiments/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/experiments/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/experiments/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/experiments/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6945 +/- ##
========================================
Coverage 97.86% 97.87%
========================================
Files 1084 1086 +2
Lines 94408 94538 +130
========================================
+ Hits 92393 92528 +135
+ Misses 2015 2010 -5 ☔ View full report in Codecov by Sentry. |
Sure, I breakdown the method into several sub methods. |
Done! I moved the whole stuff to contrib directory, and also added an optional 'qubit' input to the method. Additionally, I also added a test to reflect the change. |
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.
from a coding point of view, overall looks good % nits
@eliottrosenberg can you check the correctness
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
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, Danni! This looks great! Just some small nits.
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
…readout_benchmarking.py Co-authored-by: Noureldin <noureldinyosri@gmail.com>
…readout_benchmarking.py Co-authored-by: Noureldin <noureldinyosri@gmail.com>
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%nits
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_readout_benchmarking.py
Outdated
Show resolved
Hide resolved
Also address lint and format errors
This pull request adds a function to run the circuits in a shuffled order with readout error benchmarking.
This pull request introduces a new function,
run_shuffled_with_readout_benchmarking
, to thecirq.experiments
module. The function allows users to execute a set of quantum circuits in a randomized (shuffled) order while performing readout error benchmarking.Open questions: