Skip to content

Commit 1105582

Browse files
committed
eval_fallback for QASM.main
1 parent 886523e commit 1105582

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/bloqade/qasm2/emit/main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ class EmitQASM2Main(EmitQASM2Base[ast.Statement, ast.MainProgram]):
2222
def initialize(self) -> Self:
2323
super().initialize()
2424
return self
25+
26+
def eval_fallback(self, frame: EmitQASM2Frame, node: ir.Statement):
27+
return tuple(None for _ in range(len(node.results)))
2528

2629

2730
@func.dialect.register(key="emit.qasm2.main")
2831
class Func(interp.MethodTable):
29-
@interp.impl(func.Return)
30-
@interp.impl(func.ConstantNone)
31-
def ignore(self, emit: EmitQASM2Main, frame: EmitQASM2Frame, stmt):
32-
return ()
33-
3432
@interp.impl(func.Invoke)
3533
def invoke(self, emit: EmitQASM2Main, frame: EmitQASM2Frame, node: func.Invoke):
3634
name = emit.callables.get(node.callee.code)

0 commit comments

Comments
 (0)