Skip to content

[WIP] fix: preserve nested operator parameters and wires during decomposition - #3416

Open
andrijapau wants to merge 23 commits into
mainfrom
fix/gqsp-bug
Open

andrijapau wants to merge 23 commits into
mainfrom
fix/gqsp-bug

Conversation

@andrijapau

@andrijapau andrijapau commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Note

Generated with the support of Codex, still reviewing myself.

Context:

Catalyst can retain an abstract nested operator when lowering decomposition rules instead of reconstructing it from the actual operands. For GQSP, this leaves symbolic wire placeholders in the generated IR and blocks binary compilation.

Description of the Change:

Reconstruct hybrid arguments from their parameter and wire operands before invoking decomposition rules, preserving the compiler’s operand ordering.

Benefits:

Enables GQSP binary compilation with the correct nested operator parameters and wires. Regression tests cover parameterized and multiwire operators and compare compiled results against reference execution.

Possible Drawbacks:

Adds reconstruction logic for hybrid arguments that must remain consistent with the operator lowering’s operand layout.

[sc-135523]

@andrijapau andrijapau changed the title fix: preserve nested operator parameters and wires during decomposition [WIP] fix: preserve nested operator parameters and wires during decomposition Oct 29, 2026
@andrijapau
andrijapau changed the base branch from main to codex/remove-adjoint-lazy October 29, 2026 18:18
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.25%. Comparing base (b8f71a2) to head (2fd1f70).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3416   +/-   ##
=======================================
  Coverage   96.25%   96.25%           
=======================================
  Files         177      177           
  Lines       21699    21725   +26     
  Branches     2162     2167    +5     
=======================================
+ Hits        20886    20912   +26     
  Misses        629      629           
  Partials      184      184           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from codex/remove-adjoint-lazy to main October 29, 2026 19:33
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