Decomp/generic rule lowering - #3053
Open
kipawaa wants to merge 33 commits into
Open
Conversation
paul0403
reviewed
Jul 23, 2026
Contributor
|
Hello. You may have forgotten to update the changelog!
|
paul0403
reviewed
Jul 23, 2026
Co-authored-by: Paul <79805239+paul0403@users.noreply.github.com>
Co-authored-by: Paul <79805239+paul0403@users.noreply.github.com>
kipawaa
force-pushed
the
decomp/generic-rule-lowering
branch
from
July 29, 2026 17:41
4ddbc97 to
af0e384
Compare
TODO: update PennyLane version once TestPyPI uploads resume **Context:** Decomposition rule lowering requires correctly mapping parameters, which cannot be done reliably with the current `DecomposableGate` interface. **Description of the Change:** Update the `DecomposableGate` interface to return dictionaries (`llvm::StringMap`s) of data, to permit reconstruction. **Benefits:** python-decompositions are improved. **Possible Drawbacks:** **Related GitHub Issues:** [sc-125812] --------- Co-authored-by: paul0403 <paulhaochen.wang@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context:
Description of the Change:
This PR provides the core infrastructure changes for
Operator2support in Catalyst. This is centred on thepython_decompositionfunction, which lowers all of the decomposition for a givenOperator2instance. Precompiled, trace-time and on-demand decomposition rules will all be lowered through this utility, providing a unified and universal decomposition rule lowering system. We provide the generic utilities needed by each of the lowering pathways, as well as a unified testing infrastructure with mockOperator2instances.Benefits:
Possible Drawbacks:
This PR deprecates the legacy interface for decomposition.
Note also that tests using any PennyLane operators will fail until the ops are migrated to PL Operator2, since callbacks are only supported for
Operator2instances (required for graph IDs).Related GitHub Issues:
[sc-122043]
[sc-122018]