Closed albi3ro closed 3 months ago
I would expect hadamard_grad to be interchangeable with param_shift in cases where there is no explicit error
hadamard_grad
param_shift
Output gradient is simply array([0.])
array([0.])
No response
tape = qml.tape.QuantumScript([qml.RX(0.1, 0)], [qml.probs()]) batch, fn = qml.gradients.hadamard_grad(tape) fn(qml.device('default.qubit').execute(batch))
on master
Expected behavior
I would expect
hadamard_grad
to be interchangeable withparam_shift
in cases where there is no explicit errorActual behavior
Output gradient is simply
array([0.])
Additional information
No response
Source code
Tracebacks
No response
System information
Existing GitHub issues