[qec] Share Stim circuit headers in the emitter module - #536
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| /// | ||
| /// The three lines match the checked-in Stim gold, including the surface | ||
| /// schedule note on repetition circuits. | ||
| pub(crate) fn emit_single_block_header( |
There was a problem hiding this comment.
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.
Summary
stim_emit.QUBIT_COORDS, measure lines, and closing detectors stay in the builders.Refs #473
Test plan
cargo test -p quon_qecincludingstim_structure_matches_checked_in_goldcargo clippy -p quon_qec --all-targets -- -D warningsnpx @taskless/cli@0.9.0 checkon the changed files