Skip to content

Conversation

@rniczh
Copy link
Contributor

@rniczh rniczh commented Jan 12, 2026

Context:
Currently, the device default.qubit in PennyLane uses the Tree Traversal (TT) algorithm to efficiently compute mid-circuit measurements (MCM). However, this algorithm is implemented purely in Python, which limits performance optimization opportunities and integration with the Catalyst compilation pipeline.

Description of the Change:
This PR introduces the Tree Traversal algorithm as an xDSL pass in Catalyst.

  • Migrate Tree Traversal Pass from Pennylane
  • Do the canonicalization before tree traversal

Benefits:

Possible Drawbacks:

Related GitHub Issues:
[sc-104042]
PennyLaneAI/pennylane#8545

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.32%. Comparing base (4fdebcc) to head (c9cbb1b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2384      +/-   ##
==========================================
+ Coverage   97.31%   97.32%   +0.01%     
==========================================
  Files         107      107              
  Lines       12946    12946              
  Branches     1074     1074              
==========================================
+ Hits        12598    12600       +2     
+ Misses        288      287       -1     
+ Partials       60       59       -1     

☔ View full report in Codecov by Sentry.
📢 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.

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