Closed Qottmann closed 6 months ago
A more minimal version of the problem:
@qml.transforms.merge_rotations
@qml.qnode(qml.device("default.qubit"))
def circuit():
qml.RX(0.5, wires=0)
qml.RX(-0.5, wires=0)
return qml.expval(qml.PauliX(0)), qml.expval(qml.PauliY(0))
circuit()
Same fundamental problem as #5316 . This is due to tape.expand
mixing up operator expansion with measurement validation.
Related to https://github.com/PennyLaneAI/pennylane/issues/5316 Came up in https://github.com/PennyLaneAI/pennylane/pull/5396