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

Remove AllWires validation and associated tests #6373

Merged
merged 5 commits into from
Oct 10, 2024

Conversation

andrijapau
Copy link
Contributor

@andrijapau andrijapau commented Oct 9, 2024

Context:

Pennylane checks every operator in the initial tape such that if op.num_wires == AllWires and op.wires and device.wires, then op.wires == device.wires.

This is an edge case that kinda only applies to GlobalPhase. And it really is fine if GlobalPhase has wires that are only part of the device wires. We kinda ignore global phase wires anyway.

Description of the Change:

Removes code block for validation and accompanying tests.

Benefits: Prevents future performance issues and deals with GlobalPhase edge case.

Possible Drawbacks: None

[sc-72066]

@andrijapau andrijapau marked this pull request as ready for review October 9, 2024 18:06
@andrijapau andrijapau changed the title [WIP] Remove AllWires validation and associated tests Remove AllWires validation and associated tests Oct 9, 2024
@andrijapau andrijapau changed the title Remove AllWires validation and associated tests [WIP] Remove AllWires validation and associated tests Oct 10, 2024
@andrijapau andrijapau marked this pull request as draft October 10, 2024 12:55
@andrijapau andrijapau changed the title [WIP] Remove AllWires validation and associated tests Remove AllWires validation and associated tests Oct 10, 2024
@andrijapau andrijapau marked this pull request as ready for review October 10, 2024 13:07
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.39%. Comparing base (222dd4b) to head (27eb1a2).
Report is 327 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6373      +/-   ##
==========================================
- Coverage   99.40%   99.39%   -0.01%     
==========================================
  Files         446      446              
  Lines       42366    42362       -4     
==========================================
- Hits        42112    42107       -5     
- Misses        254      255       +1     

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

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.

❤️

@andrijapau andrijapau self-assigned this Oct 10, 2024
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 merged commit 7026b9e into master Oct 10, 2024
37 checks passed
@andrijapau andrijapau deleted the remove-allwires-validation branch October 10, 2024 19:23
austingmhuang pushed a commit that referenced this pull request Oct 23, 2024
**Context:**

Pennylane checks every operator in the initial tape such that if
`op.num_wires == AllWires and op.wires and device.wires`, then `op.wires
== device.wires`.

This is an edge case that kinda only applies to GlobalPhase. And it
really is fine if GlobalPhase has wires that are only part of the device
wires. We kinda ignore global phase wires anyway.

**Description of the Change:**

Removes code block for validation and accompanying tests. 

**Benefits:** Prevents future performance issues and deals with
`GlobalPhase` edge case.

**Possible Drawbacks:** None

[sc-72066]
mudit2812 pushed a commit that referenced this pull request Nov 11, 2024
**Context:**

Pennylane checks every operator in the initial tape such that if
`op.num_wires == AllWires and op.wires and device.wires`, then `op.wires
== device.wires`.

This is an edge case that kinda only applies to GlobalPhase. And it
really is fine if GlobalPhase has wires that are only part of the device
wires. We kinda ignore global phase wires anyway.

**Description of the Change:**

Removes code block for validation and accompanying tests. 

**Benefits:** Prevents future performance issues and deals with
`GlobalPhase` edge case.

**Possible Drawbacks:** None

[sc-72066]
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