|
56 | 56 | QuantinuumAPI,
|
57 | 57 | QuantinuumAPIError,
|
58 | 58 | )
|
59 |
| -from pytket.extensions.quantinuum.backends.quantinuum import _ALL_GATES, GetResultFailed |
| 59 | +from pytket.extensions.quantinuum.backends.quantinuum import _ALL_GATES |
60 | 60 | from pytket.predicates import CompilationUnit
|
61 | 61 | from pytket.wasm import WasmFileHandler
|
62 | 62 |
|
@@ -597,19 +597,17 @@ def test_simulator(
|
597 | 597 | assert sum(stab_counts.values()) == n_shots
|
598 | 598 | assert len(stab_counts) == 2
|
599 | 599 |
|
600 |
| - # test non-clifford circuit fails on stabilizer backend |
601 |
| - # unfortunately the job is accepted, then fails, so have to check get_result |
| 600 | + # test non-clifford circuit fails predicate check |
| 601 | + # when run on stabilizer backend |
602 | 602 | non_stab_circ = (
|
603 | 603 | Circuit(2, name="non_stab_circ").H(0).Rx(0.1, 0).CX(0, 1).measure_all()
|
604 | 604 | )
|
605 | 605 | non_stab_circ = stabilizer_backend.get_compiled_circuit(non_stab_circ)
|
606 |
| - broken_handle = stabilizer_backend.process_circuit( |
607 |
| - non_stab_circ, n_shots, language=language |
608 |
| - ) |
609 |
| - |
610 |
| - with pytest.raises(GetResultFailed) as _: |
611 |
| - _ = stabilizer_backend.get_result(broken_handle) |
612 | 606 |
|
| 607 | + with pytest.raises(CircuitNotValidError): |
| 608 | + _ = stabilizer_backend.process_circuit( |
| 609 | + non_stab_circ, n_shots, noisy_simulation=False, language=language |
| 610 | + ) |
613 | 611 |
|
614 | 612 | @pytest.mark.skipif(skip_remote_tests, reason=REASON)
|
615 | 613 | @pytest.mark.timeout(120)
|
|
0 commit comments