-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in autograph implementation for ctrl and adjoint (#6685)
**Context:** The checks in the existing implementation of autograph have handling for conversion if a _function_ is passed to `qml.ctrl` or `qml.adjoint`. Unfortunately, these checks were breaking the case where a fully initialized operator was passed to `qml.ctrl` or `qml.adjoint`, because they expect the check to always receive a callable. **Description of the Change:** We have autograph track the `_capture_adjoint_transform` and `_capture_ctrl_transform` functions instead, since at that point the function really does always receive a callable. [sc-80037] --------- Co-authored-by: andrijapau <[email protected]> Co-authored-by: Christina Lee <[email protected]> Co-authored-by: Mudit Pandey <[email protected]> Co-authored-by: Pietropaolo Frisoni <[email protected]> Co-authored-by: Yushao Chen (Jerry) <[email protected]>
- Loading branch information
1 parent
cffa08a
commit 4555833
Showing
5 changed files
with
45 additions
and
4 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