Expand description
Rust core types for FaultScope.
This crate is the Python-independent home for FaultScope’s circuit, detector error model, and hotspot data model. The PyO3 crate is responsible for adapting these types to Python and for the remaining Python callback integration while the algorithms are migrated here.
Re-exports§
pub use dem::collect_dem_event_plan;pub use dem::collect_dem_event_plan_with_options;pub use dem::detectors_from_circuit;pub use dem::generate_dem_edges;pub use dem::generate_dem_edges_from_event_plan;pub use dem::generate_dem_edges_with_options;pub use dem::observables_from_circuit;pub use dem::DemEventPlan;pub use dem::DemGenerationOptions;pub use dem::DetectorErrorModelGenerator;pub use dem::LazyDetectorErrorModel;pub use dem_problem::log_likelihood_ratio;pub use dem_problem::BinaryLinearDecodingProblem;pub use dem_problem::GraphlikeDecodingProblem;pub use dem_problem::GraphlikeDecompositionComponent;pub use dem_problem::GraphlikeEdge;pub use dem_problem::GraphlikeEdgeRef;pub use dem_problem::IndexedDem;pub use dem_problem::IndexedDemEdge;pub use dem_problem::SparseBinaryMatrix;pub use dem_problem::NATIVE_GRAPHLIKE_PROBLEM_ABI_NAME;pub use dem_problem::NATIVE_GRAPHLIKE_PROBLEM_ABI_VERSION;pub use dem_problem::NATIVE_GRAPHLIKE_PROBLEM_CAPSULE_METHOD;pub use dem_problem::NATIVE_GRAPHLIKE_PROBLEM_CAPSULE_NAME;
Structs§
- Binary
Linear Decoding Problem - Circuit
- A stabilizer-compatible circuit for forward sampling and DEM generation.
- Compiled
DemLogical Count Plan - Precomputed observable layout for counting logical failures without a decoder.
- Compiled
DemSampling Plan - Precomputed detector and observable layouts for repeated DEM sampling.
- Compiled
Pauli Event - Concrete
Stabilizer - Correction
Mask Batch - DemAttribution
Trace - Read-only edge-event data used only by FaultScope’s attribution pipeline.
- DemBatch
- DemEvent
Plan - DemGeneration
Options - Controls circuit-to-DEM conversions that cannot preserve a disjoint noise channel exactly using independent DEM instructions.
- DemHotspot
Estimate - DemHotspot
Estimator - Bit-packed detector-error-model sampler and hotspot estimator.
- DemLocation
Group - DemSampling
Result - Cross-crate result of one negotiated DEM sampling pass.
- Detector
- Detector declaration used by detector error models.
- Detector
Error Edge - One detector error model instruction.
- Detector
Error Model - Typed detector error model.
- Detector
Error Model Generator - Detector error model generator based on single-error propagation.
- Detector
Event DemShot Batch - Detector
Event Shot Batch View - Detector
Graph Estimate - Detector
Graph Key - Detector
Mask Batch View - Expr
- Fault
Scope Native Correction Batch MutView V4 - Fault
Scope Native Correction Mask Batch MutView V1 - Fault
Scope Native Decoder Factory V4 - Fault
Scope Native Decoder I64Slice V1 - Fault
Scope Native Decoder Mask MutView V1 - Fault
Scope Native Decoder Mask View V1 - Fault
Scope Native Decoder Status V1 - Fault
Scope Native Decoder String View V1 - Fault
Scope Native Decoder U32Slice V1 - Fault
Scope Native Decoder Worker V4 - Fault
Scope Native Detector Batch View V4 - Fault
Scope Native Detector Event Shot Batch View V1 - Fault
Scope Native Detector Mask Batch View V1 - Fault
Scope Native Packed Detector Shot Batch View V1 - Fault
Scope Native Packed Observable Shot Batch MutView V1 - Fault
Scope Simulator - Compiled forward bit-packed simulator.
- Graphlike
Decoding Problem - Graphlike
Decomposition Component - One graphlike component used to decompose a canonical DEM edge for decoding.
- Graphlike
Edge - Graphlike
Edge Ref - Borrowed edge view over the compact graphlike representation.
- Hotspot
Estimate - Indexed
Dem - Indexed
DemEdge - Indexed
Noise Location - Lazy
Detector Error Model - Location
Catalog - Boundary catalog retaining user-facing labels outside computation-heavy data.
- Location
Id - Dense identifier for a user-facing noise-location label.
- Logical
Observable - Logical observable declaration.
- Mask
- Native
Composite Decoder - Native
Fusion Blossom Decoder - Native
Graphlike Detector Copy Decoder - Native
NoCorrection Decoder - Noise
Location - A named stochastic noise source attached to a circuit operation.
- NpError
- Error type returned by the Rust core APIs.
- Packed
DemShot Batch - Packed
Detector Shot Batch View - Packed
Observable Shot Batch - Pauli
Frame - Runtime
Capacities - Precomputed capacities used to allocate packed sampler runtime state.
- Runtime
State - Sampler
Observable - Integer-indexed logical observable compiled against a sampler program.
- Sampler
Program - Integer-indexed program used by the native forward sampler.
- Small
Rng - Sparse
Binary Matrix
Enums§
- Decoder
Correction Batch - Decoder output tagged with the only two correction layouts allowed by V4.
- DemEvent
- Event label carried by a detector error edge.
- DemObservable
Batch - Observable truth in the layout fixed by the negotiated detector input format.
- Detector
Batch - Owned detector syndrome storage used when a producer and decoder negotiate a layout.
- Detector
Batch Format - Detector syndrome layouts accepted by native decoders, in preference order.
- Detector
Batch View - One borrowed detector-syndrome batch tagged with its physical layout.
- Noise
Model - Operation
- Typed circuit operation understood by the Rust core.
- Pauli
Basis - Single-qubit Pauli measurement basis.
- Sampler
Operation - Executable instruction in a compact sampler program.
- TagValue
Constants§
- NATIVE_
DECODER_ BATCH_ FORMAT_ EVENTS - NATIVE_
DECODER_ BATCH_ FORMAT_ MASKS - NATIVE_
DECODER_ BATCH_ FORMAT_ PACKED - NATIVE_
DECODER_ FACTORY_ FLAG_ THREAD_ SAFE - NATIVE_
DECODER_ PLUGIN_ ABI_ NAME - NATIVE_
DECODER_ PLUGIN_ ABI_ VERSION - NATIVE_
DECODER_ PLUGIN_ CAPSULE_ METHOD - NATIVE_
DECODER_ PLUGIN_ CAPSULE_ NAME - NATIVE_
DECODER_ PLUGIN_ ENTRY_ POINT_ GROUP - NATIVE_
DECODER_ PLUGIN_ STATUS_ ERROR - NATIVE_
DECODER_ PLUGIN_ STATUS_ OK - NATIVE_
GRAPHLIKE_ PROBLEM_ ABI_ NAME - NATIVE_
GRAPHLIKE_ PROBLEM_ ABI_ VERSION - NATIVE_
GRAPHLIKE_ PROBLEM_ CAPSULE_ METHOD - NATIVE_
GRAPHLIKE_ PROBLEM_ CAPSULE_ NAME - TWO_
QUBIT_ DEPOLARIZING_ EVENTS
Traits§
Functions§
- bernoulli_
mask - choose_
weighted_ event - collect_
dem_ event_ plan - collect_
dem_ event_ plan_ with_ options - Compile a DEM event plan with explicit disjoint-channel handling options.
- compile_
pauli_ channel_ events - compile_
sampler_ program_ ref - Compile a borrowed operation tree into the canonical compact sampler program.
- compute_
packed_ estimate - Compute forward-sampler hotspots using dense location ids throughout.
- convert_
detector_ batch - Convert a detector syndrome without changing its detector ID order or GF(2) value.
- detectors_
from_ circuit - Infer detector declarations from detector operations in a circuit.
- expand_
circuit_ operations - for_
each_ bernoulli_ event - generate_
dem_ edges - generate_
dem_ edges_ from_ event_ plan - Generate DEM edges from a precompiled integer event plan.
- generate_
dem_ edges_ with_ options - Generate DEM edges with explicit disjoint-channel handling options.
- log_
likelihood_ ratio - logical_
residual_ loss_ mask_ native - mask_
corrections_ to_ packed - observables_
from_ circuit - Infer logical observable declarations from observable include operations.
- packed_
corrections_ to_ masks - packed_
residual_ failure_ count - Count shots whose packed observable bits disagree with packed corrections.
- positive_
unit_ f64 - random_
bit_ mask - run_
sampler_ program - Execute a previously compiled compact sampler program.
- select_
detector_ batch_ format - Select the first decoder preference a producer can emit without conversion. If there is no direct intersection, the decoder’s first preference wins.
- set_
shot_ bit - validate_
decoder_ batch_ formats - Validate a decoder’s ordered format preference metadata.
- validate_
decoder_ detector_ ids - Validate the ordered detector input layout exposed by a decoder.
- validate_
decoder_ observable_ ids - Validate the ordered logical-observable output layout exposed by a decoder.
- word_
count