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

Allow wires to be passed as final positional argument #2432

Merged
merged 14 commits into from
Apr 20, 2022

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Apr 8, 2022

Currently, the initialization of Observable has logic that allows the wires to be passed as the final positional argument.

I move this logic to Operator to make it more general. This also allows us to get rid of a specific __init__ function for Observable's.

I also tidied two other chunks in the Operator initialization function while I was there.

@codecov
Copy link

codecov bot commented Apr 14, 2022

Codecov Report

Merging #2432 (979aeef) into master (c272db0) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2432      +/-   ##
==========================================
- Coverage   99.47%   99.47%   -0.01%     
==========================================
  Files         245      245              
  Lines       19495    19493       -2     
==========================================
- Hits        19393    19391       -2     
  Misses        102      102              
Impacted Files Coverage Δ
pennylane/operation.py 96.63% <100.00%> (-0.02%) ⬇️

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 c272db0...979aeef. Read the comment docs.

@albi3ro albi3ro requested a review from Jaybsoni April 14, 2022 21:57
Copy link
Contributor

@Jaybsoni Jaybsoni left a comment

Choose a reason for hiding this comment

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

Looks pretty straight forward 👍🏼

pennylane/operation.py Show resolved Hide resolved
@antalszava
Copy link
Contributor

The Codecov failure seems to be a false negative, overriding the check.

@antalszava antalszava merged commit ec5ef53 into master Apr 20, 2022
@antalszava antalszava deleted the allow-wires-in-args-Operator branch April 20, 2022 22:32
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