Add parallel randomized benchmarking#6382
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6382 +/- ##
=======================================
Coverage 97.81% 97.81%
=======================================
Files 1111 1111
Lines 96951 97037 +86
=======================================
+ Hits 94828 94914 +86
Misses 2123 2123 ☔ View full report in Codecov by Sentry. |
|
|
||
| def parallel_single_qubit_randomized_benchmarking( | ||
| sampler: 'cirq.Sampler', | ||
| use_xy_basis: bool = True, |
There was a problem hiding this comment.
Is there a reason this is before the kwargs cut-off?
There was a problem hiding this comment.
I was following the same format as in single_qubit_randomized_benchmarking() in the same file, but I can change it.
|
Thanks for the code reviews, @NoureldinYosri @dstrain115, and @maffoo! |
NoureldinYosri
left a comment
There was a problem hiding this comment.
LGTM. pending review from @dstrain115 and @maffoo
| return RandomizedBenchMarkResult(num_clifford_range, gnd_probs) | ||
|
|
||
|
|
||
| def parallel_single_qubit_randomized_benchmarking( |
There was a problem hiding this comment.
OOC, would it be possible to put this in the existing single_qubit_randomized_benchmarking module? Seems like it's basically the same thing and there could be opportunities for code reuse. The fact that one is running in parallel on multiple qubits is a minor details (the existing single-qubit code could just become a special case of the parallel code).
There was a problem hiding this comment.
Ok, I changed it so that single_qubit_randomized_benchmarking is now a wrapper for parallel_single_qubit_randomized_benchmarking. What do you think?
maffoo
left a comment
There was a problem hiding this comment.
Minor comments, then LGTM
| for num_cfds in num_clifford_range: | ||
| excited_probs_l = [] | ||
| # create circuits | ||
| circuits_all = [] |
There was a problem hiding this comment.
nit: call this circuits and add a type annotation
| circuits_all = [] | |
| circuits: list[`cirq.AbstractCircuit`] = [] |
There was a problem hiding this comment.
I don't think I should call this circuits because earlier in the file, there is from cirq import circuits.
No description provided.