-
Notifications
You must be signed in to change notification settings - Fork 57
Support for PauliRot and PauliMeasure in Catalyst #2145
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
Conversation
isaacdevlugt
left a comment
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 @lazypanda10117 🚀 !!
I'll make another PR to Catalyst for more docs changes once other adjacent features are merged to PennyLane :). This looks great!
**Context:** When a user places a PPR op in an adjoint qfunc (see #2145 ), the `--adjoint-lowering` pass will not correctly distribute the adjoint into the region onto PPRs, because the pass does not recognize PPRs. **Description of the Change:** Add pattern for PPR ops in adjoint lowering pass. **Benefits:** Correct behavior **Possible Drawbacks:** None
|
Does any work need to be done in this PR? |
|
The code is all done, but we are waiting for a few things to be merged first so that it is actually consistent with the documented usage. In particular, we need the following PRs:
|
|
Are there any ways to make it less dependent on its blockers? 🤔 |
This is a blocker from the documentation side, so @isaacdevlugt would probably have a better idea on how to proceed. |
Context:
There is currently no way for users to write PPRs and PPMs in the Pennylane frontend and have it lowered to the QEC dialect directly. Note that this feature is only supported when
qml.capture.enabled()is true.Description of the Change:
qml.PauliRotandqml.pauli_measurewill be converted into the appropriateqec.pprandqec.ppmoperations in the MLIR, allowing us to use the existing ppr/ppm compilation passes directly, as well as writing custom decomposition rules in terms of them.Benefits:
This allows researchers to test PPR/PPM compilation passes easily by writing circuits in terms of PPRs and PPMs and directly integrate with the Catalyst's
ppm_compilationpass (and sub-passes).Related GitHub PRs:
PennyLaneAI/pennylane#8544
[sc-101578]
[sc-102095]