Skip to content
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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update cirq-core/cirq/contrib/shuffle_circuits/shuffle_circuits_with_…
…readout_benchmarking.py

Co-authored-by: Noureldin <noureldinyosri@gmail.com>
  • Loading branch information
ddddddanni and NoureldinYosri authored Jan 17, 2025
commit 290873b5ddb79c9ed014dc9fe0e184722ea4df29
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _shuffle_circuits(all_circuits: list[circuits.Circuit], all_repetitions: lis
list[int], np.ndarray]:
"""Shuffles the input circuits and readout calibration circuits."""
shuf_order = rng.permutation(len(all_circuits))
unshuf_order = np.zeros_like(shuf_order)
unshuf_order = np.zeros_like(shuf_order) # Inverse permutation
unshuf_order[shuf_order] = np.arange(len(all_circuits))
shuffled_circuits = [all_circuits[i] for i in shuf_order]
all_repetitions = [all_repetitions[i] for i in shuf_order]
Expand Down