Skip to content

Commit

Permalink
🚸 reduce flakiness of ft simulation
Browse files Browse the repository at this point in the history
Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer committed Sep 9, 2024
1 parent 30ee669 commit 069d624
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/python/ft_stateprep/test_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
heuristic_prep_circuit,
)

if TYPE_CHECKING: # pragma: no cover
if TYPE_CHECKING:
from qiskit import QuantumCircuit


Expand Down Expand Up @@ -114,7 +114,7 @@ def test_ft_sim_zero(steane_code: CSSCode, ft_steane_zero: QuantumCircuit) -> No
p = 1e-3
lower = 1e-4
simulator = NoisyNDFTStatePrepSimulator(ft_steane_zero, steane_code, p=p)
p_l, _, _, _ = simulator.logical_error_rate(min_errors=10)
p_l, _, _, _ = simulator.logical_error_rate(min_errors=10, shots=1000000)

assert p_l - tol < lower

Expand All @@ -136,6 +136,6 @@ def test_ft_sim_plus(steane_code: CSSCode, ft_steane_plus: QuantumCircuit) -> No
p = 1e-3
lower = 1e-4
simulator = NoisyNDFTStatePrepSimulator(ft_steane_plus, steane_code, p=p, zero_state=False)
p_l, _, _, _ = simulator.logical_error_rate(min_errors=10)
p_l, _, _, _ = simulator.logical_error_rate(min_errors=10, shots=1000000)

assert p_l - tol < lower

0 comments on commit 069d624

Please sign in to comment.