Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deprecated gradient_kwargs usage #1480

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

andrijapau
Copy link
Contributor

Context:

As of PennyLaneAI/pennylane#6828, gradient_kwargs is now a positional keyword argument for the QNode. This means you can not simply express,

qml.QNode(func, dev, h=1)

instead, you must deliberately specify,

qml.QNode(func, dev, gradient_kwargs={"h":1})

Description of the Change:

Updated any deprecated code that was found.

Benefits: Consistency with code-base.

Possible Drawbacks: None identified.

[sc-81531]

Copy link
Contributor

@joeycarter joeycarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andrijapau!

Generally speaking, we don't include changelog entries if the only changes were to tests. Feel free to keep your name in the contributors list though! 🚀

It may also be necessary to update the version of PennyLane in the .dep-versions file after the PL nightly release with the changes is available:

# pennylane=0.41.0-dev1

assuming the syntax qml.QNode(f, device, diff_method="finite-diff", h=0.1) is no longer supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants