Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove resource-intensive tests #263

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/python/ft_stateprep/test_stateprep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=6)
sp_circ = gate_optimal_prep_circuit(code, max_timeout=3)
assert sp_circ is not None
assert sp_circ.zero_state

Expand All @@ -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=6)
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]
Expand All @@ -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
Expand Down
Loading