-
Notifications
You must be signed in to change notification settings - Fork 642
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
Fixes Wires
objects as wire labels bug
#6933
Conversation
qml.wires.Wires
initializationWires
objects as wire labels
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6933 +/- ##
=======================================
Coverage 99.59% 99.59%
=======================================
Files 480 480
Lines 45517 45521 +4
=======================================
+ Hits 45332 45336 +4
Misses 185 185 ☔ View full report in Codecov by Sentry. |
Wires
objects as wire labelsWires
objects as wire labels
Wires
objects as wire labelsWires
objects as wire labels
Wires
objects as wire labelsWires
objects as wire labels bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have in test suite the third example where tuples do not get flattened out ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good to me! Thanks for fixing this bug!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks flawless to me! 🥇
Only one question, maybe for @isaacdevlugt: since we are changing the wires visualization, should we mark this as a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @andrijapau !
Co-authored-by: Isaac De Vlugt <[email protected]>
This reverts commit e0b2174. ### Before submitting Please complete the following checklist when submitting a PR: - [x] All new features must include a unit test. If you've fixed a bug or added code that should be tested, add a test to the test directory! - [x] All new functions and code must be clearly commented and documented. If you do make documentation changes, make sure that the docs build and render correctly by running `make docs`. - [x] Ensure that the test suite passes, by running `make test`. - [x] Add a new entry to the `doc/releases/changelog-dev.md` file, summarizing the change, and including a link back to the PR. - [x] The PennyLane source code conforms to [PEP8 standards](https://www.python.org/dev/peps/pep-0008/). We check all of our code against [Pylint](https://www.pylint.org/). To lint modified files, simply `pip install pylint`, and then run `pylint pennylane/path/to/file.py`. When all the above are checked, delete everything above the dashed line and fill in the pull request template. ------------------------------------------------------------------------------------------------------------ **Context:** Due to non-negligible performance impacts, PR #6933 is to be reverted. Flattening each wire contents introduced overheads between 5-60% in benchmarking, and will be reassessed for support in a follow-up release. **Description of the Change:** As above. **Benefits:** Restores lost performance. **Possible Drawbacks:** Reintroduces incompatibility for nesting of wires **Related GitHub Issues:** [sc-87017]
Context:
Prior to this PR we had the following behaviour,
Description of the Change:
Add handling to
_process
that dissolves anyWires
objects that survived to that point. This results in improved behaviour like,Benefits:
Better visualization of wire objects.
Possible Drawbacks: Wire objects will look slightly different depending on your workflow.
Related GitHub Issues: Fixes #6669
[sc-79749]