-
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
Refactor Identity op to be part of qubit and cv modules #1956
Conversation
Hello. You may have forgotten to update the changelog!
|
[sc-11906] |
Codecov Report
@@ Coverage Diff @@
## master #1956 +/- ##
=======================================
Coverage 98.81% 98.81%
=======================================
Files 224 225 +1
Lines 17307 17310 +3
=======================================
+ Hits 17102 17105 +3
Misses 205 205
Continue to review full report at Codecov.
|
Co-authored-by: antalszava <antalszava@gmail.com>
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! 🎉 Thank you for catching this and tidying it. 🙂
Context: The
Identity
operation currently is added directly to theops
module, not being part of eitherops.qubit
orops.cv
, as it is common to both. However, this means there is no easy way to query which ops are supported by PennyLane on qubits only, or to selectively import them.For example, the list given by
qml.ops.qubit.ops
does not include the string"Identity"
, andfrom qml.ops.qubit import *
does not make the classIdentity
available.Description of the Change:
Identity
class to a separate file (fromops/__init__.py
).Identity
operation part of both thequbit
andcv
modules.Benefits: All supported qubit operations are now part of the
qubit
module, and similarly for the supported continuous variable operations.Possible Drawbacks:
Related GitHub Issues: