-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move device preprocessing to inner execute (#5791)
**Context:** If there is a gradient transform, we want device preprocessing to happen within the ml boundary, i.e., in `inner_execute`, to avoid applying the gradient transform on transformed tapes produced by device preprocessing. **Description of the Change:** 1. Adds a `inner_transform` keyword to `qml.execute` 2. Update `QNode._execute_component` and `qml.execute` to add device preprocessing to the inner transform program if the `gradient_fn` is a gradient transform. **Related GitHub Issues:** [sc-59107] --------- Co-authored-by: David Wierichs <[email protected]> Co-authored-by: Christina Lee <[email protected]>
- Loading branch information
1 parent
f0bc612
commit 4eb803a
Showing
13 changed files
with
210 additions
and
53 deletions.
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
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
Oops, something went wrong.