-
Notifications
You must be signed in to change notification settings - Fork 42
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
TOML files update #826
TOML files update #826
Conversation
Hello. You may have forgotten to update the changelog!
|
@dime10 , please let me know if you want a different flag name. I think this is appropriate. |
Co-authored-by: Ali Asadi <[email protected]>
Hey @erick-xanadu, could you please update your branch? (merge master) |
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 Erick!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #826 +/- ##
===========================================
- Coverage 96.94% 86.52% -10.43%
===========================================
Files 113 17 -96
Lines 18012 1914 -16098
===========================================
- Hits 17462 1656 -15806
+ Misses 550 258 -292 ☔ View full report in Codecov by Sentry. |
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.
LGTM, but please update the change log.
@vincentmr , done! |
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.
LGTM, cheers @erick-xanadu .
This reverts commit cfc3006.
**Context:** We would like Catalyst to optimize the first instance of `qml.StatePrep` by just setting the state vector in PennyLane lightning. **Description of the Change:** To achieve this, we set a flag in the TOML files where it denotes whether the value for the flag `skip_initial_state_prep` used during decomposition. This flag is already in PennyLane and will skip the initial state preparation. There are other ways to achieve this but this is the least invasive way to do so. Some other alternatives that were discussed: 1. Adding StatePrep to the list of supported operations: this is not a good idea as it would lead StatePrep to not be decomposed ever. 2. Creating a new operation and map StatePrep directly into this new operation only in the context of Catalyst. This would lead to setting this new `qml` Operation in the list of supported operations on the device, even though it would never be seen except when using with Catalyst. The way this was achieved was not to create a new `qml` Operation, only an JAXPR/MLIR operation and bind `StatePrep` to this JAXPR operation and lower it through MLIR. So, no new `qml` operations. **Benefits:** Optimization **Possible Drawbacks:** More flags. No one likes flags. **Related GitHub Issues:** Will be followed by this PennyLaneAI/catalyst#955 pull request in Catalyst. [sc-69069] --------- Co-authored-by: ringo-but-quantum <[email protected]> Co-authored-by: Ali Asadi <[email protected]>
Context: We would like Catalyst to optimize the first instance of
qml.StatePrep
by just setting the state vector in PennyLane lightning.Description of the Change: To achieve this, we set a flag in the TOML files where it denotes whether the value for the flag
skip_initial_state_prep
used during decomposition. This flag is already in PennyLane and will skip the initial state preparation.There are other ways to achieve this but this is the least invasive way to do so. Some other alternatives that were discussed:
qml
Operation in the list of supported operations on the device, even though it would never be seen except when using with Catalyst.The way this was achieved was not to create a new
qml
Operation, only an JAXPR/MLIR operation and bindStatePrep
to this JAXPR operation and lower it through MLIR. So, no newqml
operations.Benefits: Optimization
Possible Drawbacks: More flags. No one likes flags.
Related GitHub Issues: Will be followed by this PennyLaneAI/catalyst#955 pull request in Catalyst.
[sc-69069]