-
Notifications
You must be signed in to change notification settings - Fork 569
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
Move is_commuting
to pennylane/ops/functions
#2991
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2991 +/- ##
=======================================
Coverage 99.65% 99.65%
=======================================
Files 266 267 +1
Lines 22397 22400 +3
=======================================
+ Hits 22320 22323 +3
Misses 77 77
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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 !
Just one comment, in the documentation we have a subheading Quantum Operators
where we list operator functions like is_hermitian
and is_unitary
. It might be worth adding this to that table
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.
Ready to go 👍🏼
I need to figure out how
is_commuting
works to extend it for arithmetic ops likeControlled
.While it was created in the development of the
CommutationDAG
and used by the commutation dag,pennylane/transforms/commutation_dag.py
is a fairly non-intuitive place for a top-level functionis_commuting
.As it is a function of operators, this PR moves it to where we place our functions of operators.
No changes are made to the source code, though we should try and improve how this function works.