Expand description
Stim text backend for the bloq pipeline.
Linearizes a compiled bloq_ir::Bloq program (or a lower-level
bloq_circuit coordinate circuit) into Stim’s .stim circuit text.
The verify feature additionally exposes stim-based flow verification.
Modules§
- prelude
- The most commonly used items, for
use bloq_stim::prelude::*.
Structs§
- Bloq
Stim Options - Options for noise, input validation, and whole-program moment alignment.
- Bloq
Stim Segments - Emitted Stim text split into the shared header and one chunk per node.
- IsolatedT
Attempt Artifacts - Physical sampling circuits and their shared causal decoding companion.
- IsolatedT
Attempt Manifest - Index data shared by all isolated-attempt circuit variants.
- IsolatedT
Frame Recipe - One output-frame correction recipe for an isolated T attempt.
The corrected bit XORs measurement parity,
sign, and the GAP decoder flip. - IsolatedT
Frontier Sheet - One terminal stabilizer sheet appended to the causal companion.
- Plan
Stim - One lowered plan: its Stim text and where its measurements landed.
- Plan
Stim Options - How
emit_plan_stimshould render a plan. - Stim
Segment - One node’s slice of a segmented emission: its Stim text plus where that text sits in the program’s measurement record stream.
Enums§
- Input
Trust - Whether an emission entry point checks its input program first.
- Stim
Dialect - The two spellings emission can produce for a non-Clifford
Tgate. - Stim
Emission Error - Reason the static Stim backend could not emit a program.
- Stim
Noise Error - Reason a program could not be emitted with
stim-side noise. - Stim
Verify Error - Reason a chunk failed stim-based flow verification.
Constants§
- HONEST_
T_ TAG - The tag marking an
Sthat is really aT. - STIM_
FILE_ EXTENSION - Default extension for Stim circuit text.
Traits§
- Stim
Flow Verifier - Checks that a circuit fragment carries its declared stabilizer flows.
Functions§
- clifft_
to_ stim_ text - Rewrite Clifft circuit text so Stim can parse it.
- emit_
annotated_ stim - Emits a flat coordinate circuit as standalone Stim text.
- emit_
bloq_ stim - Linearizes a
Bloqinto Stim text, noiseless and trusting the program to be well-formed (InputTrust::Trusted). - emit_
bloq_ stim_ segments - Linearize a
Bloqinto per-node Stim chunks (seeBloqStimSegments), noiseless and trusting the program. - emit_
bloq_ stim_ segments_ pair - Emit the same program twice, clean and with
noise, as(clean, noisy). - emit_
bloq_ stim_ segments_ with emit_bloq_stim_segmentsunder explicitBloqStimOptions.- emit_
bloq_ stim_ with emit_bloq_stimunder explicitBloqStimOptions.- emit_
bloq_ stim_ with_ stim_ noise - Emit
programas Stim text withnoiseapplied to each node’s chunk separately. - emit_
isolated_ t_ attempts - Emit one flattened attempt of the unique isolated-T RUS body.
- emit_
plan_ stim - Lower one node’s emission plan to standalone Stim text.
- stim_
to_ clifft_ text - Rewrite Stim circuit text back into Clifft: every
S[HONEST_T]andS_DAG[HONEST_T]becomes theT/T_DAGit stands for. - write_
stim_ tag - Append a bracketed Stim instruction tag, escaping delimiters and line breaks. Shared by circuit emission and tools that rewrite existing Stim text.