Skip to content

Decomp/populate gateset from backend toml - #3221

Draft
yde773786 wants to merge 9 commits into
mainfrom
decomp/populate-gateset-from-backend-toml
Draft

yde773786 wants to merge 9 commits into
mainfrom
decomp/populate-gateset-from-backend-toml

Conversation

@yde773786

@yde773786 yde773786 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

This is a draft

Context:
Add a graph-decomposition pass based on the device toml backend.

Description of the Change:
Added @device-based-decomposition decorator to automatically run the graph-decomposition pass based on the device's target gateset. This requires running adjoint-lowering and ctrl-lowering pass first.

A DeviceBasedDecomposition pass is added that injects the three passes as required.

Tests in frontend for ensuring pass is added successfully through device preprocessing. MLIR tests added along with graph-decomposition MLIR tests, both in frontend, to have access to required PATH variables to run graph-decomposition.

Some minor issues in graph-decomposition are also addressed here.

  1. Parsing target gateset when the target gateset itself has special characters such as ( which occur with Adjoint / Ctrl gates.
  2. <n>C... -> C... in the OperatorNode.name. The id remains unaffected.
  3. Missing integration tests. Need some clarification on this, due to the current test coverage appearing to be identical to rest of the device_preprocessing injected passes.

Benefits:

  • User does not need to specify the target gateset to run graph-decomposition.

Possible Drawbacks:

  • Currently, struggles with nested adjoint and ctrl regions. The test for the pass passes only because the order in which ctrl-lowering and adjoint-lowering` are added

Related GitHub Issues:

[sc-129198]

@yde773786
yde773786 force-pushed the decomp/populate-gateset-from-backend-toml branch from 9e79eaf to 80c5d30 Compare September 14, 2026 15:22
@kipawaa

kipawaa commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

With respect to the adjoint- and control-lowering passes, there's some related discussion in #3216 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants