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 pipeline=None with qml.compile #7004

Merged
merged 4 commits into from
Feb 25, 2025
Merged

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Feb 25, 2025

Context:

Currently, qml.compile has a default of pipeline=None, where None implies (commute_controlled, cancel_inverses, merge_rotations, remove_barrier). This is confusing, as None usually means "nothing".

Description of the Change:

Sets the default value to (commute_controlled, cancel_inverses, merge_rotations, remove_barrier) and deprecates passing pipeline=None.

Benefits:

Easier to determine default value from the call siganture.

Possible Drawbacks:

Just to make sure this looks good in the docs.

Screenshot 2025-02-25 at 12 03 08 PM

Is a deprecation.

Related GitHub Issues:

[sc-85186]

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.

Thanks! This makes a lot more sense now. 😅

Copy link
Contributor

@Alex-Preciado Alex-Preciado 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!! Thank you so much @albi3ro 🚀

@albi3ro albi3ro enabled auto-merge (squash) February 25, 2025 17:45
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.59%. Comparing base (4a5d44f) to head (98e86c5).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7004   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files         483      483           
  Lines       46066    46119   +53     
=======================================
+ Hits        45881    45934   +53     
  Misses        185      185           

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

@albi3ro albi3ro merged commit 2f5a6ad into master Feb 25, 2025
46 checks passed
@albi3ro albi3ro deleted the pipeline-default-value branch February 25, 2025 18:24
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