-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multi-argument functions with
QNGOptimizer
(#5926)
**Context:** The `QNGOptimizer` currently only works with single-argument functions, see #5902. **Description of the Change:** This PR updates `QNGOptimizer` to work with multi-argument functions. If multiple arguments are trainable, the metric tensor and gradients are processed individually per parameter. This excludes parameter correlations between different `QNode` arguments from consideration in the update. A note about this has been added to the docstring. **Benefits:** Better support of quantum-aware optimizers (`QNGOptimizer`). **Possible Drawbacks:** **Related GitHub Issues:** Fixes #5902 [sc-66929]
- Loading branch information
Showing
4 changed files
with
109 additions
and
47 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