[BUG] qml.probs
incorrect output order when using custom eigendecomposition
#2761
Labels
bug 🐛
Something isn't working
Expected behavior
Providing an observable to
qml.probs
works all the time, even with observables likeqml.Hermitian
.Actual behavior
Using
qml.probs(op=qml.Hadamard(0))
we get[0.14644661 0.85355339]
, whereas withwe get
[0.85355339 0.14644661]
(probs reversed).Additional information
qml.Hermitian
is an example of an observable that computes its eigendecomposition on the fly to create its diagonalizing gates. However, the order in which the eigenvectors and eigenvalues are computed may not correspond to the order of basis states that we assume in PennyLane.Source code
Tracebacks
No response
System information
Existing GitHub issues
The text was updated successfully, but these errors were encountered: