forked from PennyLaneAI/pennylane
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TransformDispatcher can dispatch onto a batch of tapes (PennyLaneAI#5163
) **Context:** A primary goal for the transform project is that transforms are composable. With the current features, transforms are composable on the qnode, but they need to be more robust to compose when working with (batches of) tapes. **Description of the Change:** A new private method has been added to the `TransformDispatcher` class to dispatch transforms onto batches of tapes. Such a method is essentially the copy of `map_batch_transform`. **Benefits:** The proposed solution would lower cognitive overhead for developers working with transforms. **Possible Drawbacks:** The new method is called only if the class object is a sequence with all instances of `qml.tape.QuantumScript`. Otherwise, a previously implemented `TransformError` is raised. **Related GitHub Issues:** None. --------- Co-authored-by: Christina Lee <[email protected]>
- Loading branch information
1 parent
274d560
commit ab8c499
Showing
5 changed files
with
149 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters