Skip to content

Commit 68a9539

Browse files
committed
Raise an InterpreterError instead of RuntimeError in measure impl
1 parent 1229479 commit 68a9539

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bloqade/pyqrack/qasm2/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from typing import Any
22

33
from kirin import interp
4+
from kirin.interp import InterpreterError
45
from kirin.dialects import ilist
56

67
from bloqade.pyqrack.reg import (
@@ -70,7 +71,7 @@ def measure(
7071
else:
7172
cbit.set_value(interp.loss_m_result)
7273
else:
73-
raise RuntimeError(
74+
raise InterpreterError(
7475
f"Expected measure call on either a single qubit and classical bit, or two registers, but got the types {type(qarg)} and {type(carg)}"
7576
)
7677

0 commit comments

Comments
 (0)