Skip to content

[qec] Share Stim circuit headers in the emitter module - #536

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/stim-round-header-9f6a
Oct 1, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/stim-round-header-9f6a

Conversation

@arniber21

Copy link
Copy Markdown
Owner

Summary

  • Move the single-block and lattice-surgery Stim comment headers into stim_emit.
  • Both builders call those helpers. QUBIT_COORDS, measure lines, and closing detectors stay in the builders.
  • Checked-in Stim gold stays byte-identical.

Refs #473

Test plan

  • cargo test -p quon_qec including stim_structure_matches_checked_in_gold
  • Header unit tests lock the gold preambles
  • cargo clippy -p quon_qec --all-targets -- -D warnings
  • npx @taskless/cli@0.9.0 check on the changed files
  • Ubuntu and macOS fmt · clippy · build · test
Open in Web Open in Cursor 

Move the single-block and lattice-surgery Stim comment headers into stim_emit so both builders call them. Checked-in Stim gold stays byte-identical.

Refs #473

Co-authored-by: Arnab Ghosh <ag2583@cornell.edu>
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
quon Building Building Preview Oct 1, 2026 10:55am UTC

///
/// The three lines match the checked-in Stim gold, including the surface
/// schedule note on repetition circuits.
pub(crate) fn emit_single_block_header(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. I would merge this slice on ad02922.

Both builders call the emitter module for the comment headers: emit_single_block_header and emit_lattice_surgery_header. The preamble text matches the previous format strings, including the surface-schedule note on repetition circuits. QUBIT_COORDS loops, the final MZ/MX lines, and the closing-detector assembly stay in the builders.

The diff does not touch the checked-in Stim gold. The header unit tests lock the repetition d=3 and lattice-surgery d=3 preambles. The new helpers have no unwrap or expect.

Title, body, and the commit mention the issue only as Refs #473. They do not use fixes/closes/resolves, and they do not say the issue stays open. This slice does not take the rest of 473.

@cursor
cursor Bot marked this pull request as ready for review October 1, 2026 10:58
@cursor
cursor Bot merged commit 4888fef into main Oct 1, 2026
22 of 23 checks passed

This branch was successfully deployed

1 active deployment
Preview — ad029222 Deployed Oct 1, 2026 by vercel[bot]
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