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

qml.execute no longer accepts mcm_config argument #6807

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

andrijapau
Copy link
Contributor

@andrijapau andrijapau commented Jan 10, 2025

Context:

Further qml.workflow clean-up. This enables qml.execute to mimic the signature of QNode. This ensures that we don't get incompatible configurations because we have two different entry points.

Description of the Change:

Eco-System

Plugins

  • Pennylane-AQT: No instances of deprecated code found.
  • Pennylane-Qiskit: No instances of deprecated code found.
  • Pennylane-IonQ: No instances of deprecated code found.
  • Pennylane-Qrack: No instances of deprecated code found.
  • Pennylane-Cirq: No instances of deprecated code found.
  • Pennylane-Qulacs: No instances of deprecated code found.

Introduce kwargs postselect_mode and mcm_method to qml.execute signature. Raise deprecation warning to user if they try to use mcm_config kwarg.

Side-effect: Had to xfail any tests that had to do with Catalyst since they assume certain keys from the QNode.execute_kwargs. Will be reverted in #6873.

Benefits:

Keyword parity with qml.QNode.

Possible Drawbacks: None identified.

[sc-80541]

This comment was marked as resolved.

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.

We should also add an entry to deprecations.rst.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.54%. Comparing base (61dbc71) to head (a7a73b7).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6807      +/-   ##
==========================================
- Coverage   99.59%   99.54%   -0.05%     
==========================================
  Files         477      477              
  Lines       45233    45237       +4     
==========================================
- Hits        45050    45033      -17     
- Misses        183      204      +21     

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

Co-authored-by: Yushao Chen (Jerry) <[email protected]>
Copy link
Contributor

@JerryChen97 JerryChen97 left a comment

Choose a reason for hiding this comment

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

LGTM!

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