Skip to main content

Module decoder

Module decoder 

Source
Expand description

Ultra-fast distributed surface code decoder.

Implements a graph-partitioned Minimum Weight Perfect Matching (MWPM) decoder with sublinear scaling for surface code error correction.

§Architecture

The classical control plane for QEC must decode syndromes faster than the quantum error rate accumulates new errors. For distance-d surface codes with ~d^2 physical qubits per logical qubit, the decoder must process O(d^2) syndrome bits per round within ~1 microsecond.

This module provides:

  • UnionFindDecoder: O(n * alpha(n)) amortized decoder using weighted union-find to cluster nearby defects, suitable for real-time decoding.
  • PartitionedDecoder: Tiles the syndrome lattice into independent regions for parallel decoding with boundary merging, enabling sublinear wall-clock scaling on multi-core systems.
  • AdaptiveCodeDistance: Dynamically adjusts code distance based on observed logical error rates.
  • LogicalQubitAllocator: Manages physical-to-logical qubit mapping for surface code patches.
  • benchmark_decoder: Measures decoder throughput and accuracy.

Structs§

AdaptiveCodeDistance
Dynamically adjusts code distance based on observed logical error rates.
Correction
Decoder output: a set of Pauli corrections to apply.
DecoderBenchmark
Results from benchmarking a decoder.
LogicalQubitAllocator
Allocates logical qubit patches on a physical qubit grid.
PartitionedDecoder
Partitioned decoder that tiles the syndrome lattice into independent regions for parallel decoding.
StabilizerMeasurement
A single stabilizer measurement from the surface code lattice.
SurfaceCodePatch
A surface code patch representing one logical qubit.
SyndromeData
Syndrome data from one or more rounds of stabilizer measurements.
UnionFindDecoder
Fast union-find based decoder with O(n * alpha(n)) complexity.

Enums§

PauliType
Pauli correction type.

Traits§

SurfaceCodeDecoder
Trait for surface code decoders.

Functions§

benchmark_decoder
Benchmark a decoder by generating random syndromes at a given physical error rate and measuring decode accuracy and throughput.