[BUG] qml.Hermitian doesn't work with probs (neither do operator arithmetic observables) #6878
Open
1 task done
Labels
bug 🐛
Something isn't working
Expected behavior
Option 1:
qml.probs() outputs the correct probabilities when using qml.Hermitian as an observable (or operator arithmetic observables).
Option 2:
Since using probs with Hermitian renders incorrect results it should be clearly stated in the docs for Hermitian and probs that the combination of them is not supported. Same for operator arithmetic observables, unless we find an efficient way to make them work together.
Ideally users should get an error when using qml.Hermitian together with qml.probs
Actual behavior
The probabilities are sometimes in the wrong order and sometimes just fully incorrect.
Additional information
This seems related to issue #2761.
Source code
Tracebacks
System information
Name: PennyLane Version: 0.40.0 Summary: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network. Home-page: https://github.com/PennyLaneAI/pennylane Author: Author-email: License: Apache License 2.0 Location: /usr/local/lib/python3.11/dist-packages Requires: appdirs, autograd, autoray, cachetools, diastatic-malt, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, tomlkit, typing-extensions Required-by: PennyLane_Lightning Platform info: Linux-6.1.85+-x86_64-with-glibc2.35 Python version: 3.11.11 Numpy version: 1.26.4 Scipy version: 1.13.1 Installed devices: - lightning.qubit (PennyLane_Lightning-0.40.0) - default.clifford (PennyLane-0.40.0) - default.gaussian (PennyLane-0.40.0) - default.mixed (PennyLane-0.40.0) - default.qubit (PennyLane-0.40.0) - default.qutrit (PennyLane-0.40.0) - default.qutrit.mixed (PennyLane-0.40.0) - default.tensor (PennyLane-0.40.0) - null.qubit (PennyLane-0.40.0) - reference.qubit (PennyLane-0.40.0)
Existing GitHub issues
The text was updated successfully, but these errors were encountered: