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

Deprecate inner_transform_program and config arguments to qml.execute #6822

Merged
merged 20 commits into from
Jan 16, 2025

Conversation

andrijapau
Copy link
Contributor

@andrijapau andrijapau commented Jan 14, 2025

Context:

If users want this level of detail for execution they can use qml.workflow.run. This is done so we can have better signature parity with QNode.

Also, shuffled around the kwargs of qml.execute to match QNode better. Also added better typing.

[sc-81529]

This comment was marked as resolved.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.60%. Comparing base (9684cbd) to head (db58281).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6822   +/-   ##
=======================================
  Coverage   99.60%   99.60%           
=======================================
  Files         476      476           
  Lines       45190    45194    +4     
=======================================
+ Hits        45011    45015    +4     
  Misses        179      179           

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

pennylane/workflow/execution.py Show resolved Hide resolved
pennylane/workflow/execution.py Outdated Show resolved Hide resolved
@andrijapau andrijapau requested a review from astralcai January 15, 2025 17:05
doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
Copy link
Contributor

@lillian542 lillian542 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@andrijapau andrijapau enabled auto-merge (squash) January 16, 2025 17:37
@andrijapau andrijapau merged commit d842487 into master Jan 16, 2025
46 checks passed
@andrijapau andrijapau deleted the dep-execute-kwargs branch January 16, 2025 19:45
andrijapau added a commit that referenced this pull request 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]
andrijapau added a commit that referenced this pull request Jan 28, 2025
**Context:**

Removes unnecessary `replace` that survived after some updates made in
#6822. This code just redundantly sets the `interface` and
`derivative_order` right after it is set a bit earlier.

**Benefits:** Neater code.

**Possible Drawbacks:** None.
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