From 51c8f0005e249ed87b410c10e9c03c40bf2d2316 Mon Sep 17 00:00:00 2001 From: Eliott Rosenberg Date: Mon, 1 Jul 2024 09:54:39 -0700 Subject: [PATCH] fix coverage --- cirq-core/cirq/experiments/readout_confusion_matrix_test.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cirq-core/cirq/experiments/readout_confusion_matrix_test.py b/cirq-core/cirq/experiments/readout_confusion_matrix_test.py index dba8c2c756c..48c0ce889d1 100644 --- a/cirq-core/cirq/experiments/readout_confusion_matrix_test.py +++ b/cirq-core/cirq/experiments/readout_confusion_matrix_test.py @@ -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. @@ -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: