Skip to content

Commit aa312bc

Browse files
authored
Fix flaky behavior of test_xeb_fidelity (#6337)
Increase tolerance for fidelities calculated with and without state vector amplitudes. Avoid flaky test failures due to round-off errors. Example: https://github.com/quantumlib/Cirq/actions/runs/6726576064/job/18283075054#step:6:598
1 parent 2f7d732 commit aa312bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cirq-core/cirq/experiments/fidelity_estimation_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_xeb_fidelity(depolarization, estimator):
8181
f2 = cirq.xeb_fidelity(
8282
circuit, bitstrings, qubits, amplitudes=amplitudes, estimator=estimator
8383
)
84-
assert np.abs(f - f2) < 1e-6
84+
assert np.abs(f - f2) < 2e-6
8585

8686
fs.append(f)
8787

0 commit comments

Comments
 (0)