Skip to content

[qec] Share Stim QUBIT_COORDS emission in the emitter module - #538

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

cursor[bot] merged 1 commit into
mainfrom
cursor/stim-qubit-coords-9f6a

Conversation

@arniber21

Copy link
Copy Markdown
Owner

Summary

  • Move QUBIT_COORDS line emission into stim_emit::emit_qubit_coords.
  • Both builders call it. Lattice surgery still walks blocks in workload order.
  • 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
  • Unit test locks caller order and the shorter-slice stop
  • 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 

Both builders call stim_emit::emit_qubit_coords. Lattice surgery still walks blocks in workload order. Measure lines and closing detectors stay in the builders. 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 Ready Ready Preview Oct 1, 2026 12:19pm UTC

///
/// Single-block memory passes one block. Lattice surgery calls this once per
/// block, in workload order. Pairs stop at the shorter slice, matching `zip`.
pub(crate) fn emit_qubit_coords(out: &mut String, atoms: &[PhysicalAtomId], coords: &[(i32, i32)]) {

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 586f21a.

Both builders call stim_emit::emit_qubit_coords for QUBIT_COORDS(x, y) id. The helper keeps caller order and stops at the shorter slice, the same zip as before. Single-block memory passes one block. Lattice surgery still loops expanded.blocks in workload order and calls the helper once per block.

Measure lines and closing detectors are not in this diff; they stay in the builders. The checked-in Stim gold is not in the diff. The new function has no unwrap or expect. qubit_coords_keep_caller_order locks [4, 0] against [(1, 2), (3, 4)] and the one-pair shorter slice.

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 move measure lines or closing detectors.

@cursor
cursor Bot marked this pull request as ready for review October 1, 2026 12:21
@cursor
cursor Bot merged commit 69a4b73 into main Oct 1, 2026
22 of 23 checks passed

This branch was successfully deployed

1 active deployment
Preview — 586f21a6 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