Skip to content

Commit dc2f58d

Browse files
committed
Fix callgraph issue on kirin 0.17.17 (#463)
1 parent 0343846 commit dc2f58d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ requires-python = ">=3.10"
1313
dependencies = [
1414
"numpy>=1.22.0",
1515
"scipy>=1.13.1",
16-
"kirin-toolchain~=0.17.0",
16+
"kirin-toolchain~=0.17.17",
1717
"rich>=13.9.4",
1818
"pydantic>=1.3.0,<2.11.0",
1919
"pandas>=2.2.3",

src/bloqade/qasm2/emit/target.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ def emit(self, entry: ir.Method) -> ast.MainProgram:
129129
cg = CallGraph(entry)
130130
target_gate = EmitQASM2Gate(self.gate_target)
131131

132-
for _, fn in cg.defs.items():
132+
for _, fns in cg.defs.items():
133+
if len(fns) != 1:
134+
raise ValueError("Incorrect callgraph")
135+
136+
(fn,) = fns
133137
if fn is entry:
134138
continue
135139

0 commit comments

Comments
 (0)