-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The following code should error, but it does not, consistent with the .
@squin.kernel
def t_teleport_noargs():
"""
A simple T teleportation circuit that requires mid circuit control flow.
"""
ancilla = squin.qubit.new(1)[0]
target = squin.qubit.new(1)[0]
squin.gate.t(ancilla)
squin.gate.cx(target, ancilla)
if squin.qubit.measure(target):
squin.gate.s(ancilla)
squin.gate.x(ancilla)
try:
print(squin.cirq.emit_circuit(t_teleport_noargs))
raise(RuntimeError("Oops this should have errored."))
except Exception as e:
print("ERROR:",e)
Instead, it generates the following printed circuit
[ 0: ───X─── ]
0: ───[ 0: ───T─── ](no_rep_ids)───[ │ ]───────────────────
[ 1: ───@─── ](no_rep_ids)
│
1: ────────────────────────────────#2───────────────────────────M───
Metadata
Metadata
Assignees
Labels
No labels