-
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.
Reset qnode after execution error (#5449)
**Context:** While investigating Issue #5442, I was getting really confused by why my tensorflow execution was giving a torch error. I realized that when the execution fails, we do not properly reset `QNode.interface` back to `"auto"`. **Description of the Change:** Pulls a block of the code to a helper method so that we can wrap it in a `try-finally` block. **Benefits:** We can continue using a qnode after a failure has occured during execution. **Possible Drawbacks:** **Related GitHub Issues:** [sc-60047] --------- Co-authored-by: Astral Cai <[email protected]>
- Loading branch information
Showing
3 changed files
with
84 additions
and
29 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