-
Notifications
You must be signed in to change notification settings - Fork 34
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
Update to support lightning (new device API) & the PL operator arithmetic update #638
Conversation
752d67b
to
253df82
Compare
Changes needed: PennyLaneAI/pennylane#5506 PennyLaneAI/pennylane#5478 |
[sc-60562] |
[sc-60606] |
[sc-60561] |
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 @rmoyard! 🥳
Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…talyst into lightning_new_api
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.
All good from my side 💯 you may want to wait for the second approval from the compilation team.
@rmoyard the shortcut ticket here says that this issue is related to decomposing nested operations like control and adjoint, but there are no tests that check for the decomposition of them. Is there an error in the shortcut ticket assigned to this? |
@erick-xanadu They are multiple shortcut tickets (this is the part one for the decompose ticket), the unit tests for decompose will be added by @lillian542 as the part 2, she is currently working on making the solution better. |
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 Romain!
**Context:** An initial path-of-least-resistance implementation of `decompose` was added in #638, because it was necessary to complete the task at hand in that PR. However, as it wasn't the main focus of that PR, and it was merged with the plan to fix several things if possible. This PR implements the "cleaner", more updated version of the transform. In the initial implementation: 1. There was no testing for the added decomposition of HybridOp tapes (high priority) 2. A `visited` property was temporarily added to the HybridOp class to make things easier to implement, and should be removed (if possible) 3. A lot of the code involved was almost, but not quite, identical to existing code in PL, and the duplication should be reduced (if possible) **Description of the Change:** Tests are added, and the code adjusted to fix any issues that came up. The code was refactored to use most of the comparable functionality in PennyLane instead of duplicating it in catalyst, and to remove the need for the `visited` property on `HybridOps`. **Benefits:** We made the changes to make this work more cleanly as discussed during the review process for #638. We avoid duplicate code. We have tests that confirm that the decomposition of nested tapes is working as expected.
Context:
Description of the Change:
Benefits: