Expand description
Circuit vocabulary embedded by Bloq IR templates and annotations.
Execution backends depend on bloq_ir alone and use this module instead of
reaching through the IR to its bloq_circuit implementation dependency. The
glob is deliberate: the whole vocabulary travels together, and enumerating it
here would only add a second list to keep in step with bloq_circuit.
The few circuit types that appear in bloq_ir’s own signatures
(Basis, CoordinateOverflowError, FlattenLimits) are also at the
crate root, so those have two paths on purpose — the root one so a signature
is nameable without this module, this one so a backend can take the lot.
Re-exports§
pub use bloq_circuit::Basis;pub use bloq_circuit::Pauli;pub use bloq_circuit::PauliBasis;
Modules§
- prelude
- The most commonly used items, for
use bloq_circuit::prelude::*.
Structs§
- BodyId
- Index of a
CircuitBodywithin aCoordCircuit. - Chunk
- A circuit fragment paired with the stabilizer flows crossing its boundaries — the unit the compiler composes into a full program.
- Circuit
Body - An ordered list of operations — the entry block of a circuit or the body of
a
Op::Repeat. - Completed
Flow - A matched flow ready to emit as a detector.
- Conditional
Correction - One feedforward correction inside
Op::ConditionalPauli. - Coord
Circuit - A quantum circuit whose qubits are addressed by 2-D lattice coordinates rather than dense integer indices.
- Coordinate
Overflow Error - A coordinate plus layout offset does not fit the signed 32-bit lattice.
- Detector
Parity - A mod-2 sum of
DetectorTerms and a constant sign bit — the parity a detector or observable checks. - Detector
Slices - The full slice table for a segmented straight-line circuit.
- Expanded
Measurement Columns - Where each measurement id lands once every
Op::Repeatis unrolled — the result ofCoordCircuit::expanded_measurement_columns. - Flatten
Limits - Work allowed when materializing a circuit’s repeated operation stream.
- Flow
- A stabilizer flow: a Pauli boundary condition
startpropagated through a chunk toend, together with the measurements it accumulates. - Flow
Engine - Tracks open flows and completed detectors while chunks are appended.
- FlowKey
- A borrowed, translated open-flow boundary key.
- Loop
Carried Detector State - A detector state carried between iterations of a repeated body.
- Loop
State Id - Identifies a loop-carried detector state threaded across iterations of a repeated body.
- Meas
Record - A measurement id paired with the qubit coordinate it measured.
- Meas
Registry - Allocator and lookup table for a circuit’s measurement ids.
- Noise
Model - Circuit-level Pauli noise probabilities materialized by
NoiseModel::noisy_circuit. - Offset
Flows - A chunk’s flows plus their absolute XY placement offset.
- Pauli
Map - A sparse, phaseless map from qubit coordinate to non-identity
Pauli. Compose maps with^; exact product phases are discarded. - Pauli
MapIter - Borrowing iterator over a
PauliMap’s sorted(coordinate, pauli)entries. - Pending
Loop Detector States - Loop-carried detector states opened for a loop body, awaiting their
nextparity once the body’s closing flows are known. - Region
Break - A recorded anticommutation: the region could not continue past this point.
- Region
Term - One qubit of a tracked region and the Pauli it carries there.
- Residual
Flow - A boundary flow left open after residual composition.
- Slice
Detector - A detector to track: an opaque id and the measurement ids whose parity it sums. Ids live in the input op stream’s id space.
- Slice
Region Seed - A Pauli contribution to a tracked region at an exact segment boundary.
Enums§
- Chunk
OrLoop - A chunk or a loop of chunks (for repeated syndrome extraction rounds).
- Circuit
Error - An error building, validating, or lowering a
CoordCircuit. - Composed
Chain - A completed flow classified for detector synthesis.
- Detector
Term - One term of a
DetectorParity: either a measurement outcome or a loop-carried state. - Detslice
Error - A failure preparing the op stream for reverse tracking.
- Flatten
Event - A replay step produced by
CoordCircuit::flatten. - Flow
Error - A failure while matching stabilizer flows across chunk boundaries.
- Flow
Marker - How a completed flow chain’s parity is consumed downstream.
- Gate
Type - A quantum gate, named after its Stim mnemonic.
- Measurement
Frame Error - An overflow or out-of-range condition while accounting for the
measurements a repeated (
REPEAT) circuit body contributes. - Op
- A single coordinate-addressed circuit operation.
- Region
Break Kind - Why a region stopped propagating backward.
Functions§
- checked_
translate_ coordinate - Translate one coordinate without wrapping outside the signed 32-bit lattice.
- detector_
slices_ with_ seeds - Track detecting and logical regions with positioned Pauli contributions.
- measurement_
gate_ name - The Stim gate name that measures in
basis. - translate_
detector_ coords - Offsets a detector’s first two coordinates by a layout offset, leaving any further coordinates untouched.
Type Aliases§
- Detector
Coords - Coordinates attached to a detector annotation, almost always an
(x, y)pair; kept inline so the thousands of detector ops a compile produces do not heap-allocate their coordinates. - Detector
Region - The region terms one detector’s region covers at one moment.
- Flow
Engine Measurements - Measurements carried by an open or completed flow.
- Flow
Measurements - The measurement ids a
Flowcarries, kept inline for the common small case.