File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
test/pyqrack/runtime/noise/native Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 99from bloqade .pyqrack import PyQrackQubit , PyQrackInterpreter , reg
1010from bloqade .pyqrack .base import MockMemory
1111
12- simulation = qasm2 .extended .add (native )
13-
1412
1513def run_mock (program : ir .Method , rng_state : Mock | None = None ):
1614 PyQrackInterpreter (
@@ -22,7 +20,7 @@ def run_mock(program: ir.Method, rng_state: Mock | None = None):
2220
2321def test_atom_loss ():
2422
25- @simulation
23+ @qasm2 . extended
2624 def test_atom_loss (c : qasm2 .CReg ):
2725 q = qasm2 .qreg (2 )
2826 native .atom_loss_channel ([q [0 ]], prob = 0.1 )
@@ -37,7 +35,7 @@ def test_atom_loss(c: qasm2.CReg):
3735 memory = MockMemory ()
3836
3937 result : ilist .IList [PyQrackQubit , Literal [2 ]] = PyQrackInterpreter (
40- simulation , memory = memory , rng_state = rng_state
38+ qasm2 . extended , memory = memory , rng_state = rng_state
4139 ).run (test_atom_loss , (input ,))
4240
4341 assert result [0 ].state is reg .QubitState .Lost
Original file line number Diff line number Diff line change 77from bloqade .noise import native
88from bloqade .pyqrack .base import MockMemory , PyQrackInterpreter
99
10- simulation = qasm2 .extended .add (native )
11-
1210
1311def run_mock (program : ir .Method , rng_state : Mock | None = None ):
1412 PyQrackInterpreter (
@@ -19,7 +17,7 @@ def run_mock(program: ir.Method, rng_state: Mock | None = None):
1917
2018
2119def test_pauli_channel ():
22- @simulation
20+ @qasm2 . extended
2321 def test_atom_loss ():
2422 q = qasm2 .qreg (2 )
2523 native .pauli_channel (
@@ -44,7 +42,7 @@ def test_atom_loss():
4442
4543@pytest .mark .xfail
4644def test_pauli_probs_check ():
47- @simulation
45+ @qasm2 . extended
4846 def test_atom_loss ():
4947 q = qasm2 .qreg (2 )
5048 native .pauli_channel (
@@ -60,7 +58,7 @@ def test_atom_loss():
6058
6159
6260def test_cz_pauli_channel_false ():
63- @simulation
61+ @qasm2 . extended
6462 def test_atom_loss ():
6563 q = qasm2 .qreg (2 )
6664 native .atom_loss_channel ([q [0 ]], prob = 0.4 )
@@ -101,7 +99,7 @@ def test_atom_loss():
10199
102100
103101def test_cz_pauli_channel_true ():
104- @simulation
102+ @qasm2 . extended
105103 def test_atom_loss ():
106104 q = qasm2 .qreg (2 )
107105 native .atom_loss_channel ([q [0 ]], prob = 0.4 )
You can’t perform that action at this time.
0 commit comments