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

Fix deprecations that weren't caught by CI #6879

Merged
merged 8 commits into from
Jan 24, 2025
Merged

Conversation

andrijapau
Copy link
Contributor

@andrijapau andrijapau commented Jan 24, 2025

Context:

PR #6822 deprecated the arguments config and inner_transform_program to qml.execute. However, because of some bug in our CI, the qml.PennyLaneDeprecationWarning are not being treated as errors. I just happened to find this warning in our CI logs.

Description of the Change:

Promoted qml.PennyLaneDeprecationWarning to a ValueError to fish out any deprecated code. Updated said code to use qml.workflow.run instead of qml.execute.

[sc-81529]

This comment was marked as resolved.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.54%. Comparing base (721acb2) to head (ffb4540).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6879      +/-   ##
==========================================
- Coverage   99.54%   99.54%   -0.01%     
==========================================
  Files         477      477              
  Lines       45251    45246       -5     
==========================================
- Hits        45047    45042       -5     
  Misses        204      204              

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

Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

I'm going to go back and check the git history to see what this code actually needs to do.

@andrijapau andrijapau requested a review from albi3ro January 24, 2025 19:19
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

Note that I've fixed the riemannian gradient optimizer in #6882, but that might take a little longer to get in than this one.

Now I kinda want to go fix qnspsa 😬

@andrijapau andrijapau merged commit afec979 into master Jan 24, 2025
46 checks passed
@andrijapau andrijapau deleted the fix-dep-config-arg branch January 24, 2025 20:30
albi3ro added a commit that referenced this pull request Jan 27, 2025
**Context:**

When reviewing #6879 , I noticed some usage of deprecated behaviour in
`RiemannianGradientOptimizer`. So I have now fixed it.

**Description of the Change:**

Some minor reworking of `RiemannianGradientOptimizer` to take advantage
of features pennylane now provides.

**Benefits:**

Enhanced readability, maintainability, and performance.

**Possible Drawbacks:**

**Related GitHub Issues:**
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