From 34c43ef636eb9fd6c12089cb9b8ed86d4db33b4b Mon Sep 17 00:00:00 2001 From: Tom Peham Date: Mon, 26 Aug 2024 10:37:57 +0200 Subject: [PATCH 1/3] Increase timeout --- test/python/ft_stateprep/test_stateprep.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/python/ft_stateprep/test_stateprep.py b/test/python/ft_stateprep/test_stateprep.py index 5c9c9bf9..d0f86efb 100644 --- a/test/python/ft_stateprep/test_stateprep.py +++ b/test/python/ft_stateprep/test_stateprep.py @@ -117,7 +117,7 @@ def test_heuristic_prep_consistent(code_name: str) -> None: def test_gate_optimal_prep_consistent(code: CSSCode, request) -> None: # type: ignore[no-untyped-def] """Check that gate_optimal_prep_circuit returns a valid circuit with the correct stabilizers.""" code = request.getfixturevalue(code) - sp_circ = gate_optimal_prep_circuit(code, max_timeout=6) + sp_circ = gate_optimal_prep_circuit(code, max_timeout=10) assert sp_circ is not None assert sp_circ.zero_state @@ -137,7 +137,7 @@ def test_depth_optimal_prep_consistent(code: CSSCode, request) -> None: # type: """Check that depth_optimal_prep_circuit returns a valid circuit with the correct stabilizers.""" code = request.getfixturevalue(code) - sp_circ = depth_optimal_prep_circuit(code, max_timeout=6) + sp_circ = depth_optimal_prep_circuit(code, max_timeout=10) assert sp_circ is not None circ = sp_circ.circ max_cnots = np.sum(code.Hx) + np.sum(code.Hz) # type: ignore[arg-type] From 27210f572bfef3c9fbbc2fca305d22bfa43513ed Mon Sep 17 00:00:00 2001 From: Tom Peham Date: Mon, 26 Aug 2024 14:47:24 +0200 Subject: [PATCH 2/3] Remove surface code tests for time reasons. --- test/python/ft_stateprep/test_stateprep.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/python/ft_stateprep/test_stateprep.py b/test/python/ft_stateprep/test_stateprep.py index d0f86efb..4b530438 100644 --- a/test/python/ft_stateprep/test_stateprep.py +++ b/test/python/ft_stateprep/test_stateprep.py @@ -113,11 +113,11 @@ def test_heuristic_prep_consistent(code_name: str) -> None: assert eq_span(np.vstack((code.Hz, code.Lz)), z) # type: ignore[arg-type] -@pytest.mark.parametrize("code", ["steane_code", "surface_code"]) +@pytest.mark.parametrize("code", ["steane_code"]) def test_gate_optimal_prep_consistent(code: CSSCode, request) -> None: # type: ignore[no-untyped-def] """Check that gate_optimal_prep_circuit returns a valid circuit with the correct stabilizers.""" code = request.getfixturevalue(code) - sp_circ = gate_optimal_prep_circuit(code, max_timeout=10) + sp_circ = gate_optimal_prep_circuit(code, max_timeout=3) assert sp_circ is not None assert sp_circ.zero_state @@ -132,12 +132,12 @@ def test_gate_optimal_prep_consistent(code: CSSCode, request) -> None: # type: assert eq_span(np.vstack((code.Hz, code.Lz)), z) # type: ignore[arg-type] -@pytest.mark.parametrize("code", ["steane_code", "surface_code"]) +@pytest.mark.parametrize("code", ["steane_code"]) def test_depth_optimal_prep_consistent(code: CSSCode, request) -> None: # type: ignore[no-untyped-def] """Check that depth_optimal_prep_circuit returns a valid circuit with the correct stabilizers.""" code = request.getfixturevalue(code) - sp_circ = depth_optimal_prep_circuit(code, max_timeout=10) + sp_circ = depth_optimal_prep_circuit(code, max_timeout=3) assert sp_circ is not None circ = sp_circ.circ max_cnots = np.sum(code.Hx) + np.sum(code.Hz) # type: ignore[arg-type] From da83fc25903f9d995d72bbf37857ab91ffe14067 Mon Sep 17 00:00:00 2001 From: Tom Peham Date: Mon, 26 Aug 2024 16:00:19 +0200 Subject: [PATCH 3/3] Removed an overlooked test --- test/python/ft_stateprep/test_stateprep.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/python/ft_stateprep/test_stateprep.py b/test/python/ft_stateprep/test_stateprep.py index 4b530438..2bc07156 100644 --- a/test/python/ft_stateprep/test_stateprep.py +++ b/test/python/ft_stateprep/test_stateprep.py @@ -150,11 +150,11 @@ def test_depth_optimal_prep_consistent(code: CSSCode, request) -> None: # type: assert eq_span(np.vstack((code.Hz, code.Lz)), z) # type: ignore[arg-type] -@pytest.mark.parametrize("code", ["steane_code", "surface_code"]) +@pytest.mark.parametrize("code", ["steane_code"]) def test_plus_state_gate_optimal(code: CSSCode, request) -> None: # type: ignore[no-untyped-def] """Test synthesis of the plus state.""" code = request.getfixturevalue(code) - sp_circ_plus = gate_optimal_prep_circuit(code, max_timeout=5, zero_state=False) + sp_circ_plus = gate_optimal_prep_circuit(code, max_timeout=3, zero_state=False) assert sp_circ_plus is not None assert not sp_circ_plus.zero_state