Skip to main content

Crate faultscope_core

Crate faultscope_core 

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

BinaryLinearDecodingProblem
Circuit
A stabilizer-compatible circuit for forward sampling and DEM generation.
CompiledDemLogicalCountPlan
Precomputed observable layout for counting logical failures without a decoder.
CompiledDemSamplingPlan
Precomputed detector and observable layouts for repeated DEM sampling.
CompiledPauliEvent
ConcreteStabilizer
CorrectionMaskBatch
DemAttributionTrace
Read-only edge-event data used only by FaultScope’s attribution pipeline.
DemBatch
DemEventPlan
DemGenerationOptions
Controls circuit-to-DEM conversions that cannot preserve a disjoint noise channel exactly using independent DEM instructions.
DemHotspotEstimate
DemHotspotEstimator
Bit-packed detector-error-model sampler and hotspot estimator.
DemLocationGroup
DemSamplingResult
Cross-crate result of one negotiated DEM sampling pass.
Detector
Detector declaration used by detector error models.
DetectorErrorEdge
One detector error model instruction.
DetectorErrorModel
Typed detector error model.
DetectorErrorModelGenerator
Detector error model generator based on single-error propagation.
DetectorEventDemShotBatch
DetectorEventShotBatchView
DetectorGraphEstimate
DetectorGraphKey
DetectorMaskBatchView
Expr
FaultScopeNativeCorrectionBatchMutViewV4
FaultScopeNativeCorrectionMaskBatchMutViewV1
FaultScopeNativeDecoderFactoryV4
FaultScopeNativeDecoderI64SliceV1
FaultScopeNativeDecoderMaskMutViewV1
FaultScopeNativeDecoderMaskViewV1
FaultScopeNativeDecoderStatusV1
FaultScopeNativeDecoderStringViewV1
FaultScopeNativeDecoderU32SliceV1
FaultScopeNativeDecoderWorkerV4
FaultScopeNativeDetectorBatchViewV4
FaultScopeNativeDetectorEventShotBatchViewV1
FaultScopeNativeDetectorMaskBatchViewV1
FaultScopeNativePackedDetectorShotBatchViewV1
FaultScopeNativePackedObservableShotBatchMutViewV1
FaultScopeSimulator
Compiled forward bit-packed simulator.
GraphlikeDecodingProblem
GraphlikeDecompositionComponent
One graphlike component used to decompose a canonical DEM edge for decoding.
GraphlikeEdge
GraphlikeEdgeRef
Borrowed edge view over the compact graphlike representation.
HotspotEstimate
IndexedDem
IndexedDemEdge
IndexedNoiseLocation
LazyDetectorErrorModel
LocationCatalog
Boundary catalog retaining user-facing labels outside computation-heavy data.
LocationId
Dense identifier for a user-facing noise-location label.
LogicalObservable
Logical observable declaration.
Mask
NativeCompositeDecoder
NativeFusionBlossomDecoder
NativeGraphlikeDetectorCopyDecoder
NativeNoCorrectionDecoder
NoiseLocation
A named stochastic noise source attached to a circuit operation.
NpError
Error type returned by the Rust core APIs.
PackedDemShotBatch
PackedDetectorShotBatchView
PackedObservableShotBatch
PauliFrame
RuntimeCapacities
Precomputed capacities used to allocate packed sampler runtime state.
RuntimeState
SamplerObservable
Integer-indexed logical observable compiled against a sampler program.
SamplerProgram
Integer-indexed program used by the native forward sampler.
SmallRng
SparseBinaryMatrix

Enums§

DecoderCorrectionBatch
Decoder output tagged with the only two correction layouts allowed by V4.
DemEvent
Event label carried by a detector error edge.
DemObservableBatch
Observable truth in the layout fixed by the negotiated detector input format.
DetectorBatch
Owned detector syndrome storage used when a producer and decoder negotiate a layout.
DetectorBatchFormat
Detector syndrome layouts accepted by native decoders, in preference order.
DetectorBatchView
One borrowed detector-syndrome batch tagged with its physical layout.
NoiseModel
Operation
Typed circuit operation understood by the Rust core.
PauliBasis
Single-qubit Pauli measurement basis.
SamplerOperation
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§

NativeDecoderFactory
NativeDecoderWorker

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

Type Aliases§

NpResult

Unions§

FaultScopeNativeCorrectionBatchPayloadV4
FaultScopeNativeDetectorBatchPayloadV4