-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify error message for better Catalyst support #577
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #577 +/- ##
==========================================
- Coverage 98.95% 98.68% -0.28%
==========================================
Files 167 167
Lines 24382 23959 -423
==========================================
- Hits 24128 23644 -484
- Misses 254 315 +61 ☔ View full report in Codecov by Sentry. |
@multiphaseCFD, could you please fill-out the PR description? |
Thanks @AmintorDusko . Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, cheers @multiphaseCFD !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @multiphaseCFD! Thank you for that!
Hey Shuli, Would you like to include the patch to address the following issue as well?
@qml.qnode(dev)
def circuit():
qml.PauliX(0)
qml.PauliY(1)
qml.Hadamard(2)
qml.PauliZ(3)
return qml.var(qml.PauliX(2) @ qml.PauliY(1) @ qml.PauliZ(0))
>>> circuit()
0.99983616 |
Hey @maliasadi , just tested the circuit you mentioned above with 565387d and tests passed in C++ backend. |
Before submitting
Please complete the following checklist when submitting a PR:
All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
tests
directory!All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs
.Ensure that the test suite passes, by running
make test
.Add a new entry to the
.github/CHANGELOG.md
file, summarizing thechange, and including a link back to the PR.
Ensure that code is properly formatted by running
make format
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context:
Unify error messages of shot measurement related unsupported observables to better Catalyst.
Description of the Change:
For the moment, shot measurements support
Paulis
,Identity
andHadamard
obs andTensorProd/Hamiltonian
obs created based on above mentioned namedobs
. Error messages are thrown inside each shot measurement method. Now error messages are obs based and it will support Catalyst better.Benefits:
Possible Drawbacks:
Related GitHub Issues: