-
Notifications
You must be signed in to change notification settings - Fork 615
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
Make qml.math.jax_argnums_to_tape_trainable
private
#6609
Conversation
…om/PennyLaneAI/pennylane into move-jax-argnums-to-tape-trainable
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6609 +/- ##
==========================================
- Coverage 99.45% 99.45% -0.01%
==========================================
Files 450 450
Lines 42088 42087 -1
==========================================
- Hits 41857 41856 -1
Misses 231 231 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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, nice cleanup ! 😍
Co-authored-by: Pietropaolo Frisoni <[email protected]> Co-authored-by: David Wierichs <[email protected]>
**Context:** The `math` module should only depend on autoray, numpy, and all the various ML frameworks. We have one method though, `jax_argnums_to_tape_trainable`, that introduces a qnode dependency into the math module. This function is only used in `transform_program.py` as an implementation detail. **Description of the Change:** Moves `jax_argnums_to_tape_trainable` to `transform_program.py` and makes it private. **Benefits:** Cleaner dependency tree in pennylane. **Possible Drawbacks:** It could technically be considered a breaking change, but I really don't think such a function needs to be part of the public `math` interface. If we really wanted to make it part of the official `math` interface, we should have at least tested it. **Related GitHub Issues:** --------- Co-authored-by: Pietropaolo Frisoni <[email protected]> Co-authored-by: David Wierichs <[email protected]>
Context:
The
math
module should only depend on autoray, numpy, and all the various ML frameworks.We have one method though,
jax_argnums_to_tape_trainable
, that introduces a qnode dependency into the math module. This function is only used intransform_program.py
as an implementation detail.Description of the Change:
Moves
jax_argnums_to_tape_trainable
totransform_program.py
and makes it private.Benefits:
Cleaner dependency tree in pennylane.
Possible Drawbacks:
It could technically be considered a breaking change, but I really don't think such a function needs to be part of the public
math
interface. If we really wanted to make it part of the officialmath
interface, we should have at least tested it.Related GitHub Issues: