Skip to main content

Crate bloq_stim

Crate bloq_stim 

Source
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§

BloqStimOptions
Options for noise, input validation, and whole-program moment alignment.
BloqStimSegments
Emitted Stim text split into the shared header and one chunk per node.
IsolatedTAttemptArtifacts
Physical sampling circuits and their shared causal decoding companion.
IsolatedTAttemptManifest
Index data shared by all isolated-attempt circuit variants.
IsolatedTFrameRecipe
One output-frame correction recipe for an isolated T attempt. The corrected bit XORs measurement parity, sign, and the GAP decoder flip.
IsolatedTFrontierSheet
One terminal stabilizer sheet appended to the causal companion.
PlanStim
One lowered plan: its Stim text and where its measurements landed.
PlanStimOptions
How emit_plan_stim should render a plan.
StimSegment
One node’s slice of a segmented emission: its Stim text plus where that text sits in the program’s measurement record stream.

Enums§

InputTrust
Whether an emission entry point checks its input program first.
StimDialect
The two spellings emission can produce for a non-Clifford T gate.
StimEmissionError
Reason the static Stim backend could not emit a program.
StimNoiseError
Reason a program could not be emitted with stim-side noise.
StimVerifyError
Reason a chunk failed stim-based flow verification.

Constants§

HONEST_T_TAG
The tag marking an S that is really a T.
STIM_FILE_EXTENSION
Default extension for Stim circuit text.

Traits§

StimFlowVerifier
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 Bloq into Stim text, noiseless and trusting the program to be well-formed (InputTrust::Trusted).
emit_bloq_stim_segments
Linearize a Bloq into per-node Stim chunks (see BloqStimSegments), 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_segments under explicit BloqStimOptions.
emit_bloq_stim_with
emit_bloq_stim under explicit BloqStimOptions.
emit_bloq_stim_with_stim_noise
Emit program as Stim text with noise applied 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] and S_DAG[HONEST_T] becomes the T/T_DAG it 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.