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

Rename gradient_fn to diff_method in qml.execute #6549

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Nov 7, 2024

Context:

We use the term diff_method in the QNode and gradient_fn in qml.execute. This can cause confusion having two different terms for basically the same thing.

Description of the Change:

Deprecates the term gradient_fn and strictly uses diff_method in qml.execute.

Benefits:

Increased consistency in terminology. Opens us to preprocessing the diff_method inside of qml.execute, making it more robust and user-friendly.

Possible Drawbacks:

Deprecations can always cause problems. This is an easy change, as it can be handled by a find-replace automation, but that is always extra work.

Related GitHub Issues:

[sc-77590]

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.34%. Comparing base (e710ca6) to head (38ed6c9).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6549      +/-   ##
==========================================
+ Coverage   99.17%   99.34%   +0.16%     
==========================================
  Files         456      456              
  Lines       43254    43273      +19     
==========================================
+ Hits        42899    42989      +90     
+ Misses        355      284      -71     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
Copy link
Contributor

@andrijapau andrijapau left a comment

Choose a reason for hiding this comment

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

LGTM! Satisfying to see this discrepancy resolved. 😓

@albi3ro albi3ro enabled auto-merge (squash) November 11, 2024 16:13
@albi3ro albi3ro merged commit 8cbcfb2 into master Nov 11, 2024
44 checks passed
@albi3ro albi3ro deleted the deprecate-execute-gradient_fn branch November 11, 2024 16:33
andrijapau added a commit to PennyLaneAI/qml that referenced this pull request Nov 12, 2024
**Summary:**

Updating deprecated code that was introduced from a recent deprecation
PennyLaneAI/pennylane#6549.

[sc-77590]
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