Skip to content

Commit cae010f

Browse files
committed
Re-introduce fallback
1 parent d3b41f5 commit cae010f

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/bloqade/cirq_utils/emit/base.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ def emit_block(self, frame: EmitCirqFrame, block: ir.Block) -> cirq.Circuit:
223223
def reset(self):
224224
pass
225225

226+
def eval_fallback(self, frame: EmitCirqFrame, node: ir.Statement) -> tuple:
227+
return tuple(None for _ in range(len(node.results)))
228+
226229

227230
@func.dialect.register(key="emit.cirq")
228231
class __FuncEmit(MethodTable):
@@ -248,17 +251,6 @@ def emit_invoke(self, emit: EmitCirq, frame: EmitCirqFrame, stmt: func.Invoke):
248251
"If you called the emit_circuit method, that should have happened, please report this issue."
249252
)
250253

251-
@impl(func.Return)
252-
def return_(self, emit: EmitCirq, frame: EmitCirqFrame, stmt: func.Return):
253-
# NOTE: should only be hit if ignore_returns == True
254-
return ()
255-
256-
@impl(func.ConstantNone)
257-
def emit_constant_none(
258-
self, emit: EmitCirq, frame: EmitCirqFrame, stmt: func.ConstantNone
259-
):
260-
return ()
261-
262254

263255
@py.indexing.dialect.register(key="emit.cirq")
264256
class __Concrete(interp.MethodTable):

0 commit comments

Comments
 (0)