Repository navigation
[qec] Share Stim reset assembly in the emitter module - #532
Conversation
Both circuit builders call emit_reset_tick for the prepare-R line. Callers still choose the id list: layout order for single-block memory, sorted unique ids for lattice surgery. Checked-in Stim gold stays byte-identical. Issue 473 stays open. Headers and observable assembly stay in the builders. Co-authored-by: Arnab Ghosh <ag2583@cornell.edu>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| /// | ||
| /// Single-block memory passes layout order. Lattice surgery passes the sorted | ||
| /// unique id list. This function does not reorder. | ||
| pub(crate) fn emit_reset_tick(out: &mut String, atom_ids: &[u32]) { |
There was a problem hiding this comment.
Approve. I would merge this slice.
Both builders call emit_reset_tick for the prepare-R / TICK line. The helper writes ids in caller order and does not sort or dedup. Single-block memory still passes block.atoms in layout order. Lattice surgery still sorts and dedups before the call. An empty list still writes R then TICK, and reset_tick_keeps_caller_order locks [4, 0, 4] so a hidden reorder would fail.
The diff does not touch the checked-in Stim gold, so repetition d=3, surface d=3 Z/X, and lattice-surgery CX stay byte-identical. This function has no unwrap or expect. The PR body and commit say issue 473 stays open; there is no Fixes/Closes/Resolves keyword.
Headers and observable assembly stay in the builders, on the open issue.
Summary
Partial slice of #473. Both Stim builders call
emit_reset_tickin the emitter module for the prepare-R/TICKline. Single-block memory still passes layout order. Lattice surgery still passes the sorted unique id list. The helper does not reorder.Issue 473 stays open. Headers and observable assembly stay in the builders.
emit_stim_lattice_surgery_cxis still a long function.Behavior
RthenTICK, matching the previous inline loops.Out of scope