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

Move ctrl and ControlledOperation to qml.ops.op_math submodule #2656

Merged
merged 5 commits into from
Jun 8, 2022

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Jun 3, 2022

This PR moves ctrl and ControlledOperation to the new qml.ops.op_math submodule, and no longer imports the ControlledOperation class top-level, as it is purely developer-facing.

With PR #2634 , we will be adding a new version of ControlledOperation that wraps individual operators instead of entire tapes. The new wrapper will also provide more features and eventually replace the many individual controlled operations.

@albi3ro albi3ro requested a review from antalszava June 3, 2022 14:50
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #2656 (0c6e2f6) into master (f1517eb) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2656   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files         249      249           
  Lines       20228    20229    +1     
=======================================
+ Hits        20145    20146    +1     
  Misses         83       83           
Impacted Files Coverage Δ
pennylane/ops/op_math/control.py 100.00% <ø> (ø)
pennylane/transforms/__init__.py 100.00% <ø> (ø)
pennylane/__init__.py 100.00% <100.00%> (ø)
pennylane/ops/__init__.py 100.00% <100.00%> (ø)
pennylane/ops/op_math/__init__.py 100.00% <100.00%> (ø)
pennylane/transforms/defer_measurements.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1517eb...0c6e2f6. Read the comment docs.

@albi3ro albi3ro requested a review from Jaybsoni June 3, 2022 15:05
doc/releases/changelog-dev.md Outdated Show resolved Hide resolved
Copy link
Contributor

@antalszava antalszava left a comment

Choose a reason for hiding this comment

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

The overall change is looking 💯 Just a couple of small comments. 🙂

doc/releases/changelog-dev.md Show resolved Hide resolved
tests/transforms/test_split_non_commuting.py Show resolved Hide resolved
@albi3ro albi3ro requested a review from antalszava June 6, 2022 15:11
Copy link
Contributor

@antalszava antalszava 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 👍 🎉

@albi3ro albi3ro merged commit 7d7c8d9 into master Jun 8, 2022
@albi3ro albi3ro deleted the ctrl-to-op_math branch June 8, 2022 17:15
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.

2 participants