-
Notifications
You must be signed in to change notification settings - Fork 573
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
Group "utility" operations into same file. #2962
Comments
Maybe a module name that indicates that these are 'meta' operations? That is, they use the |
Hi! Can I work on this issue? |
Hi @tgag17 , |
Thanks @albi3ro! |
Heyy, is this issue still available? Please let me know!! As the related/attached PR is closed due to inactivity |
This issue is still good to go. Feel free to take this on @AnuravModak ! |
Hello @albi3ro, I've begun working on this issue, and I have a few questions. But before that, let me update you on my progress. I've relocated the Barrier and WireCut operations from Now, I'd like to know your plan regarding the movement of the corresponding test code. Should I transfer the test code from Also kindly provide the command to reformat the files according to |
Thanks for reaching out @AnuravModak :) Moving tests from Formatting with black can be done with:
and pylint can be run with
These commands can also be found in our page on Submitting a pull request |
Towards #2962 . So, this is the draft for this issue. Changes made: grouping all three ops: - Barrier - WireCut - Snapshot into a new file `pennylane/ops/meta.py`. Also, moved tests from `tests/ops/qubit/test_non_parametric_opy.py` and `tests/ops/test_snapshot.py` to a new file `tests/ops/test_meta.py`. Please let me know if i need to do anything else. --------- Signed-off-by: Anurav Modak <anurav.modak@oracle.com> Co-authored-by: Christina Lee <christina@xanadu.ai>
Closed by #4789 |
Right now,
Barrier
andWireCut
are located inpennylane/ops/qubit/non_parametric_ops.py
, even though they are not unique to qubit ops.Snapshot
is located in its own file inpennylane/ops/snapshot.py
.I propose grouping all three ops:
Barrier
WireCut
Snapshot
into a new file
pennylane/ops/utility_ops.py
. The tests should then be moved as well.I am open to a different name than "utility". Whatever term bests describes "things we mostly treat as operations but aren't really."
Update: Let's place these in
pennylane/ops/meta.py
.The text was updated successfully, but these errors were encountered: