Decoder Engine
Real-time syndrome decoding calibrated to your hardware noise model. Sub-millisecond per cycle at code distance 5–7.
MWPM and Union-Find
The Decoder Engine exposes both decoder algorithms under a common interface. You select the decoder type at configuration time based on your latency budget and accuracy requirements.
Per-device weight tuning is the key differentiator. Before each experiment run, QECSync ingests your hardware's calibration data and computes a per-edge weight matrix for the syndrome graph. This is not a one-size-fits-all approach — every device gets its own weight configuration.
The decode pipeline accepts a 3D syndrome array (space + time across measurement rounds) and returns a correction operator in Pauli notation, ready to apply to the logical qubit.
from qecsync import DecoderEngine, NoiseModel
# Build noise model from calibration data
noise = NoiseModel.from_json("cal_2024_11.json")
# Initialize MWPM decoder, code distance 5
eng = DecoderEngine(
algorithm="mwpm",
code_distance=5,
noise_model=noise
)
# Decode 10 rounds of syndrome data
result = eng.decode_rounds(syndromes, rounds=10)
→ DecoderResult(logical_correction=..., latency_ms=0.71)
Latency and accuracy by code distance
All measurements on synthetic depolarizing noise model. Real hardware performance varies.
| Code Distance | MWPM Latency | UF Latency | MWPM Accuracy | UF Accuracy | Physical Qubit Count |
|---|---|---|---|---|---|
| d = 3 | <0.2 ms | <0.1 ms | 99.2% | 98.8% | 17 |
| d = 5 | <0.7 ms | <0.3 ms | 99.6% | 99.1% | 49 |
| d = 7 | <1.8 ms | <0.6 ms | 99.8% | 99.4% | 97 |
| d = 9 | <4.2 ms | <1.1 ms | 99.9% | 99.6% | 161 |
See benchmark comparisons in detail
View BenchmarksIntegrate via API
Read the API reference for the full decoder interface specification.
API Reference →