Repository navigation
[qec] Share Stim observable assembly in the emitter module - #534
Conversation
Both Stim builders call stim_emit::emit_observable_include for OBSERVABLE_INCLUDE record offsets. Headers stay in the builders. Checked-in Stim gold stays byte-identical. Issue 473 stays open. Co-authored-by: Arnab Ghosh <ag2583@cornell.edu>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| /// `obs_atoms` id must appear in that window; the first match wins. The | ||
| /// trailing newline is left to the caller so lattice surgery can append | ||
| /// frame-byproduct `rec` targets on the same line. | ||
| pub(crate) fn emit_observable_include( |
There was a problem hiding this comment.
Approve. I would merge this slice.
Both builders call emit_observable_include for the OBSERVABLE_INCLUDE prefix and the rec[-(d - pos)] offsets. The helper does not write the trailing newline. Single-block memory still pushes that newline itself. Lattice surgery still appends X-frame byproduct rec targets on the same line, then the newline at the loop below. Headers stay in the builders.
The search is the first match, same as the old .position() loops. observable_include_writes_record_offsets locks [30, 10] against a [10, 20, 30] window as rec[-1] rec[-3], and a missing atom is MissingDataMeasurement. The diff does not touch the checked-in Stim gold. This function has no unwrap or expect. The PR body and commit say issue 473 stays open; there is no Fixes/Closes/Resolves keyword.
The builders are still over the ~80 line target. That stays on the open issue.
Summary
Partial slice of #473. Issue 473 stays open.
OBSERVABLE_INCLUDErecord-offset assembly intostim_emit::emit_observable_include.emit_stim_single_block_memoryandemit_stim_lattice_surgery_cxcall it.Builders are still longer than the ~80 line target, and a new round kind is still a registry arm.
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