-
Notifications
You must be signed in to change notification settings - Fork 575
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
[unitaryHACK] Deprecated qml.inv() #1325
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1325 +/- ##
=======================================
Coverage 98.16% 98.16%
=======================================
Files 148 148
Lines 11450 11452 +2
=======================================
+ Hits 11240 11242 +2
Misses 210 210
Continue to review full report at Codecov.
|
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.
Thanks for this contribution @tgag17! 🎉
Just two small things before this can be merged in:
-
Don't forget to add a link/description of this change to the changelog! And to add your name to the 'Contributors' section 🙂
-
It would be good to add a test to ensure that the warning is working correctly. This test can be added to tests/test_utils.py, to the
TestInv
class. In particular, thewith pytest.warns(UserWarning, match="warning message"): #code that raises a warning
context manager allows easy testing of whether warnings are raised. The PyTest documentation has some more info here: https://docs.pytest.org/en/stable/warnings.html#warns
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Thanks for the review and helping out with the tests @josh146! I have made the required commits |
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.
Thanks for this great contribution @tgag17! This is merge ready from my end 🙂
Context:
Deprecated qml.inv().
Description of the Change:
Added warnings in the documentation and code
Benefits:
Want to shift users to qml.adjoint() as it is a more general function
Related GitHub Issues:
Fixes #1195