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
In the latest version of PennyLane (0.36.0-dev), new opmath is enabled by default. Observables made with @ will now be instances of Prod instead of Tensor. This will not work:
qml.expval(qml.PauliX(0) @ qml.PauliY(1))
because the pennylane-braket plugin currently do not know how to handle Prod.
Solution
In translation.py, add
@_translate_observable.register
def _(t: qml.ops.Prod):
return reduce(lambda x, y: x @ y, [_translate_observable(factor) for factor in t.operands])
should make it work with new opmath.
The text was updated successfully, but these errors were encountered:
Describe the feature you'd like
In the latest version of PennyLane (0.36.0-dev), new opmath is enabled by default. Observables made with
@
will now be instances ofProd
instead ofTensor
. This will not work:because the pennylane-braket plugin currently do not know how to handle
Prod
.Solution
In
translation.py
, addshould make it work with new opmath.
The text was updated successfully, but these errors were encountered: