-
Notifications
You must be signed in to change notification settings - Fork 586
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
Replacing map_batch_transform
in source code
#5212
Replacing map_batch_transform
in source code
#5212
Conversation
map_batch_transform
in source code
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5212 +/- ##
==========================================
- Coverage 99.68% 99.68% -0.01%
==========================================
Files 396 396
Lines 36661 36387 -274
==========================================
- Hits 36547 36272 -275
- Misses 114 115 +1 ☔ View full report in Codecov by Sentry. |
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.
good stuff 👏 pls link the associated story to track this as in progress too:)
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!
Co-authored-by: Christina Lee <christina@xanadu.ai>
Context: In the PennyLane source code, the
map_batch_transform
method is currently used in several locations. However, a new functionality has recently been added toTransformDispatcher
so that transforms can be dispatched onto a batch of tapes (see #5163).Description of the Change: We replace the current usage of
map_batch_transform
in the source code, taking advantage of the new method_batch_transform
implemented in theTransformDispatcher
class.Benefits: Implementing transforms over a batch of tapes without resorting to
map_batch_transform
is much more straightforward.Possible Drawbacks: The new method in
TransformDispatcher
replacingmap_batch_transform
is called only if the transform is applied on a sequence consisting ofqml.tape.QuantumScript
instances. Finally, compared tomap_batch_transform
, the new method returns atuple
as a first variable (instead of alist
).Related GitHub Issues: None
[sc-56689]