Skip to content

Add the qecp.alloc_cb and qecp.dealloc_cb ops#2867

Merged
joeycarter merged 2 commits into
mainfrom
joeycarter/qecp-alloc-dealloc-cb
May 26, 2026
Merged

Add the qecp.alloc_cb and qecp.dealloc_cb ops#2867
joeycarter merged 2 commits into
mainfrom
joeycarter/qecp-alloc-dealloc-cb

Conversation

@joeycarter
Copy link
Copy Markdown
Contributor

@joeycarter joeycarter commented May 22, 2026

Context: In order to support T gates and π/8 PPMs in the experimental QEC pipeline, in #2865 and #2866, we added support to represent the fabrication of magic states in the QEC logical layer and to deallocate single logical codeblocks. Now, we need the ability to also deallocate single physical codeblocks in the qecp layer.

Description of the Change: This PR adds the qecp.alloc_cb and qecp.dealloc_cb ops, which allocate and deallocate a single physical codeblock, respectively. This operation is available in both MLIR and in the xDSL interface to Catalyst. For example:

%0 = qecp.alloc_cb : !qecp.codeblock<1 x 7>
// %1 = operations on the physical codeblock...
qecp.dealloc_cb %1 : !qecp.codeblock<1 x 7>

[sc-119925]

@joeycarter joeycarter force-pushed the joeycarter/qecl-dealloc-cb branch from 6f95428 to 5d236c3 Compare May 25, 2026 17:36
@joeycarter joeycarter force-pushed the joeycarter/qecp-alloc-dealloc-cb branch from 76c33fe to 0215dce Compare May 25, 2026 18:39
@joeycarter joeycarter marked this pull request as ready for review May 25, 2026 18:39
Base automatically changed from joeycarter/qecl-dealloc-cb to main May 25, 2026 18:39
@joeycarter joeycarter force-pushed the joeycarter/qecp-alloc-dealloc-cb branch from 0215dce to 2d90218 Compare May 25, 2026 18:40
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.01%. Comparing base (41004b8) to head (2d90218).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2867      +/-   ##
==========================================
- Coverage   97.18%   97.01%   -0.18%     
==========================================
  Files          39      167     +128     
  Lines        4448    18828   +14380     
  Branches        0     1768    +1768     
==========================================
+ Hits         4323    18266   +13943     
- Misses        125      417     +292     
- Partials        0      145     +145     

☔ 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.

@joeycarter joeycarter merged commit 9798aa3 into main May 26, 2026
40 checks passed
@joeycarter joeycarter deleted the joeycarter/qecp-alloc-dealloc-cb branch May 26, 2026 13:22
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.

3 participants