catalyst
catalyst copied to clipboard
[BUG] `qml.probs` on Amazon Braket device without shots raises cryptic error
dev = qml.device("braket.local.qubit", wires=2)
@qjit
@qml.qnode(dev)
def f(x: float):
qml.PSWAP(x, wires=[0, 1])
qml.ISWAP(wires=[1, 0])
return qml.probs()
f(0.3)
The circuit raises a cryptic error that does not make it clear what the problem is:
RuntimeError: [OpenQasmRunner.hpp][Line:217][Function:Probs] Error in Catalyst Runtime: 'NoneType' object has no attribute 'items'
The same circuit with shots= set in the device works. But I also tested qml.probs without shots with just PennyLane and Braket and it seems to work, so I think there is a bug on our side.