Skip to content

Commit

Permalink
fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
eliottrosenberg committed Jul 1, 2024
1 parent 47f5aac commit 51c8f00
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cirq-core/cirq/experiments/readout_confusion_matrix_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def add_readout_error(
measurements: np.ndarray,
zero_errors: np.ndarray,
one_errors: np.ndarray,
rng: np.random.Generator | None = None,
rng: np.random.Generator,
) -> np.ndarray:
"""Add readout errors to measured (or simulated) bitstrings.
Expand All @@ -38,8 +38,6 @@ def add_readout_error(
Returns:
New measurements but with readout errors added.
"""
if rng is None:
rng = np.random.default_rng()
num_bitstrs, n = measurements.shape
assert len(zero_errors) == len(one_errors) == n
# compute the probability that each bit is 1 after adding readout errors:
Expand Down

0 comments on commit 51c8f00

Please sign in to comment.