Josh Izaac
Josh Izaac
Update: rewriting the transform to use queuing also exhibits the same behaviour: ```python @qml.transform def my_quantum_transform(tape): new_operations = [] with qml.queuing.AnnotatedQueue() as q: for op in tape: if op.name ==...
Thanks to @albi3ro, we've discovered that the transform is being fully skipped when AutoGraph is enabled: ```python @qml.transform def my_quantum_transform(tape): return NotImplementedError @qml.qjit(autograph=True) def f(x): @my_quantum_transform @qml.qnode(dev) def circuit(x): qml.RY(x,...
@tzunghanjuang can this issue now be closed?
Just a note that `Hamiltonian` is marked for deprecation in PL, and is due to be replaced with https://docs.pennylane.ai/en/stable/code/api/pennylane.sum.html. Does the issue still occur with `qml.sum`? If not, this is...
Note that this does work correctly with finite-diff: ```python @qjit def f(x): @qml.qnode(dev) def g(y): qml.RX(y, wires=0) return qml.expval(qml.PauliZ(0)) return grad(lambda y: g(jnp.sin(y)) ** 2, method="fd")(x) ``` ```pycon >>> f(0.4)...
@erick-xanadu points out that the following works: ```python device = qml.device("lightning.qubit", wires=1) @qjit(keep_intermediate=True) def f(x): @qml.qnode(device) def g(y): z = jnp.cos(y) qml.RX(z, wires=0) return qml.expval(qml.PauliZ(0)) def post(y): return g(y) **...
Something to note is that `QubitUnitary` is 'differentiable' via the parameter-shift rule if it is decomposed down into parameter-shift compatible gates (this is what PL Python does iirc). In addition,...
Ah, this may actually be quite an important bug to address
Oh, it depends on the details of this bug --- if the print statements are being reordered anywhere in the QNode, that would be quite an important bug (which is...
Thanks @dime10! The context helps -- definitely lower priority, potentially does not need to be fixed at all in some cases (since the distinction of 'when' a gate is applied...