-
Notifications
You must be signed in to change notification settings - Fork 623
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…#6828) **Context:** `gradient_kwargs` is now a positional keyword argument for the `QNode`. This means you can not simply express, ```python qml.QNode(func, dev, h=1) ``` instead, you must deliberately, ```python qml.QNode(func, dev, gradient_kwargs={"h":1}) ``` This allows easier and cleaner input validation. This PR could have wide-spread impact as it is very common to just specify `gradient_kwargs` casually as additional kwargs. ### **Eco-System** - [x] Catalyst: PennyLaneAI/catalyst#1480 - [x] Lightning: PennyLaneAI/pennylane-lightning#1045 - [x] QML Demos: No instances of deprecated code found. ### **Plugins** - [x] Pennylane-AQT: No instances of deprecated code found. - [x] Pennylane-Qiskit: No instances of deprecated code found. - [x] Pennylane-IonQ: No instances of deprecated code found. - [x] Pennylane-Qrack: No instances of deprecated code found. - [x] Pennylane-Cirq: No instances of deprecated code found. - [x] Pennylane-Qulacs: No instances of deprecated code found. **Description of the Change:** Allow additional kwargs for now to ensure same functionality, but raise a deprecation warning. Append those additional kwargs to the internal gradient_kwargs dictionary. **Benefits:** Improved input validation for users. **Possible Drawbacks:** Might have missed some eco-system changes. Especially with CI **sometimes** not raising `PennyLaneDeprecationWarning`s as errors 😢 . [sc-81531] --------- Co-authored-by: Christina Lee <christina@xanadu.ai>
- Loading branch information
1 parent
875ae11
commit 8a12fa5
Showing
22 changed files
with
434 additions
and
260 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
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.