-
Notifications
You must be signed in to change notification settings - Fork 617
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Program capture]
qml.capture.qnode_call
works with closure variabl…
…es and consts (#6052) **Context:** When trying to get nested qfunc controls to work properly, I finally figured out what the `jaxpr.consts` actually is, and that we need it to properly handle closure variables. Unfortunately, that also means we need to go back and update the qnode primtive. **Description of the Change:** Turns the captured consts into positional arguments and add a `n_consts` keyword argument to the primitive. **Benefits:** We can handle closure variables. **Possible Drawbacks:** **Related GitHub Issues:**
- Loading branch information
Showing
3 changed files
with
33 additions
and
6 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