Skip to content

Commit 1baaeab

Browse files
authored
Removing form_m from pyqrack interpreter. (#170)
* switch to using standard measurement * switch to using standard measurement * fixing test * making system size smaller for test
1 parent 16b2be8 commit 1baaeab

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/bloqade/pyqrack/noise/native.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ def atom_loss_channel(
9393

9494
for qarg in active_qubits:
9595
if interp.rng_state.uniform() <= stmt.prob:
96-
sim_reg = qarg.ref.sim_reg
97-
sim_reg.force_m(qarg.addr, 0)
96+
qarg.ref.sim_reg.m(qarg.addr)
9897
qarg.drop()
9998

10099
return ()

test/pyqrack/runtime/noise/native/test_pauli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_atom_loss():
7979
rng_state.choice.side_effect = ["y"]
8080
rng_state.uniform.return_value = 0.5
8181
sim_reg = run_mock(test_atom_loss, rng_state)
82-
sim_reg.assert_has_calls([call.mcz([0], 1), call.force_m(0, 0), call.y(1)])
82+
sim_reg.assert_has_calls([call.mcz([0], 1), call.m(0), call.y(1)])
8383

8484

8585
def test_cz_pauli_channel_true():

test/pyqrack/runtime/test_dyn_memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def ghz(n: int):
2525
dynamic_qubits=True,
2626
)
2727

28-
N = 50
28+
N = 20
2929

3030
result = target.multi_run(ghz, 100, N)
3131
result = Counter("".join(str(int(bit)) for bit in bits) for bits in result)

0 commit comments

Comments
 (0)