From 7ed744d861560448ed899c130845733711219126 Mon Sep 17 00:00:00 2001 From: Phillip Weinberg Date: Thu, 17 Apr 2025 15:57:52 -0400 Subject: [PATCH 1/4] switch to using standard measurement --- src/bloqade/pyqrack/noise/native.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bloqade/pyqrack/noise/native.py b/src/bloqade/pyqrack/noise/native.py index 940038ca..0457a211 100644 --- a/src/bloqade/pyqrack/noise/native.py +++ b/src/bloqade/pyqrack/noise/native.py @@ -93,8 +93,7 @@ def atom_loss_channel( for qarg in active_qubits: if interp.rng_state.uniform() <= stmt.prob: - sim_reg = qarg.ref.sim_reg - sim_reg.force_m(qarg.addr, 0) + qarg.ref.sim_reg.r(qarg.addr) qarg.drop() return () From d420566374466e049b36197874c27d2fe43d3281 Mon Sep 17 00:00:00 2001 From: Phillip Weinberg Date: Thu, 17 Apr 2025 15:58:07 -0400 Subject: [PATCH 2/4] switch to using standard measurement --- src/bloqade/pyqrack/noise/native.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bloqade/pyqrack/noise/native.py b/src/bloqade/pyqrack/noise/native.py index 0457a211..e5002c33 100644 --- a/src/bloqade/pyqrack/noise/native.py +++ b/src/bloqade/pyqrack/noise/native.py @@ -93,7 +93,7 @@ def atom_loss_channel( for qarg in active_qubits: if interp.rng_state.uniform() <= stmt.prob: - qarg.ref.sim_reg.r(qarg.addr) + qarg.ref.sim_reg.m(qarg.addr) qarg.drop() return () From d2fb8818e28938d45ed035b3a6c9c8a5ab7c4fb8 Mon Sep 17 00:00:00 2001 From: Phillip Weinberg Date: Thu, 17 Apr 2025 16:08:50 -0400 Subject: [PATCH 3/4] fixing test --- test/pyqrack/runtime/noise/native/test_pauli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pyqrack/runtime/noise/native/test_pauli.py b/test/pyqrack/runtime/noise/native/test_pauli.py index 488ed21a..4e5fe833 100644 --- a/test/pyqrack/runtime/noise/native/test_pauli.py +++ b/test/pyqrack/runtime/noise/native/test_pauli.py @@ -79,7 +79,7 @@ def test_atom_loss(): rng_state.choice.side_effect = ["y"] rng_state.uniform.return_value = 0.5 sim_reg = run_mock(test_atom_loss, rng_state) - sim_reg.assert_has_calls([call.mcz([0], 1), call.force_m(0, 0), call.y(1)]) + sim_reg.assert_has_calls([call.mcz([0], 1), call.m(0), call.y(1)]) def test_cz_pauli_channel_true(): From fc355daf651e22dec1e1ec6905ce538e4699f8f4 Mon Sep 17 00:00:00 2001 From: Phillip Weinberg Date: Thu, 17 Apr 2025 16:09:07 -0400 Subject: [PATCH 4/4] making system size smaller for test --- test/pyqrack/runtime/test_dyn_memory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/pyqrack/runtime/test_dyn_memory.py b/test/pyqrack/runtime/test_dyn_memory.py index 92967432..03e08a7a 100644 --- a/test/pyqrack/runtime/test_dyn_memory.py +++ b/test/pyqrack/runtime/test_dyn_memory.py @@ -25,7 +25,7 @@ def ghz(n: int): dynamic_qubits=True, ) - N = 50 + N = 20 result = target.multi_run(ghz, 100, N) result = Counter("".join(str(int(bit)) for bit in bits) for bits in result)