You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The normal mechanism in PennyLane that "un-queues" a gate when supplied to a HOF like qml.adjoint does not work when the original and modified gate appear in different program scopes, such as across control flow segments. The reason is that Catalyst using different tapes for each section.
importpennylaneasqml@qml.qjit@qml.qnode(qml.device("lightning.qubit", wires=1))defcircuit(b: bool):
g=qml.H(0)
@qml.cond(b)defapply():
qml.adjoint(g)
apply()
returnqml.state()
print(circuit(1)) # should not read [1, 0]