-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
bugSomething isn't workingSomething isn't workingfrontendPull requests that update the frontendPull requests that update the frontend
Description
The following code fails to be converted by autograph, even with #1910. The reason is that prod is not explicitly listed in the transform call hotfix nor the transform object hotfix.
@qml.prod
def template(b):
if b:
qml.H(0)
qml.X(0)
@qjit(autograph=True)
@qml.qnode(qml.device("null.qubit", wires=0))
def circuit(b: bool):
qml.adjoint(template(b))
return qml.state()
File "test.py", line 12, in template
if b:
jax.errors.TracerBoolConversionError: Attempted boolean conversion of traced array with shape bool[].
This concrete value was not available in Python because it depends on the value of the argument b.
Note that there are likely other decorators similar to qml.prod
that we haven't explicitly enabled for passthrough. It might be useful to generalize the CatalystCallable
strategy in PennyLane.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfrontendPull requests that update the frontendPull requests that update the frontend