|
| 1 | +# QECTOR Decoder v3 |
| 2 | + |
| 3 | +**Source-available Rust/Python quantum error correction decoding platform.** |
| 4 | + |
| 5 | +QECTOR Decoder v3 provides a Python package backed by a native Rust extension for quantum error correction research and validation workflows. It includes PyMatching-compatible MWPM validation, Union-Find decoding, belief-matching experiments, BP-OSD/qLDPC workflows, batch decoding, and optional GPU backend checks where the release build and target machine support them. |
| 6 | + |
| 7 | +Website: https://www.qector.store |
| 8 | +Repository: https://github.com/GuillaumeLessard/qector-decoder |
| 9 | +Commercial licensing: https://www.qector.store |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +```bash |
| 16 | +pip install qector-decoder-v3 |
| 17 | +``` |
| 18 | + |
| 19 | +Supported package target for the public release workflow: |
| 20 | + |
| 21 | +- Python 3.9 to 3.13 |
| 22 | +- Linux x86_64 wheels |
| 23 | +- Windows x64 wheels |
| 24 | +- macOS arm64 wheels |
| 25 | +- Source distribution for custom/source builds |
| 26 | + |
| 27 | +Optional research and validation extras: |
| 28 | + |
| 29 | +```bash |
| 30 | +# Stim, Sinter, PyMatching, LDPC and belief-matching ecosystem |
| 31 | +pip install "qector-decoder-v3[stim]" |
| 32 | + |
| 33 | +# Benchmark and plotting harness |
| 34 | +pip install "qector-decoder-v3[bench]" |
| 35 | + |
| 36 | +# Full validation environment |
| 37 | +pip install "qector-decoder-v3[all]" |
| 38 | +``` |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## Quick start |
| 43 | + |
| 44 | +```python |
| 45 | +import numpy as np |
| 46 | +from qector_decoder_v3 import UnionFindDecoder, BlossomDecoder |
| 47 | + |
| 48 | +check_to_qubits = [[0, 1], [1, 2], [2, 3], [3, 4]] |
| 49 | +n_qubits = 5 |
| 50 | +syndrome = np.array([0, 1, 0, 0], dtype=np.uint8) |
| 51 | + |
| 52 | +fast = UnionFindDecoder(check_to_qubits, n_qubits) |
| 53 | +print(fast.decode(syndrome)) |
| 54 | + |
| 55 | +mwpm = BlossomDecoder(check_to_qubits, n_qubits) |
| 56 | +print(mwpm.decode(syndrome)) |
| 57 | +``` |
| 58 | + |
| 59 | +Batch decoding: |
| 60 | + |
| 61 | +```python |
| 62 | +import numpy as np |
| 63 | +from qector_decoder_v3 import BatchDecoder, CUDABatchDecoder |
| 64 | + |
| 65 | +checks = [[0, 1], [1, 2], [2, 3], [3, 4]] |
| 66 | +syndromes = np.random.randint(0, 2, size=(4096, 4), dtype=np.uint8) |
| 67 | + |
| 68 | +cpu = BatchDecoder(checks, n_qubits=5) |
| 69 | +corrections = cpu.parallel_batch_decode(syndromes) |
| 70 | + |
| 71 | +if CUDABatchDecoder.is_available(): |
| 72 | + gpu = CUDABatchDecoder(checks, n_qubits=5) |
| 73 | + corrections = gpu.batch_decode(syndromes) |
| 74 | +``` |
| 75 | + |
| 76 | +Stim workflow: |
| 77 | + |
| 78 | +```python |
| 79 | +import stim |
| 80 | +from qector_decoder_v3 import BlossomDecoder |
| 81 | +from qector_decoder_v3.stim_compat import stim_circuit_to_check_matrix |
| 82 | + |
| 83 | +circuit = stim.Circuit.generated( |
| 84 | + "surface_code:rotated_memory_z", |
| 85 | + distance=5, |
| 86 | + rounds=5, |
| 87 | + after_clifford_depolarization=0.005, |
| 88 | +) |
| 89 | + |
| 90 | +checks, n_qubits = stim_circuit_to_check_matrix(circuit) |
| 91 | +decoder = BlossomDecoder(checks, n_qubits) |
| 92 | +``` |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +## Included decoder families |
| 97 | + |
| 98 | +| Module | Primary use | Status | |
| 99 | +|---|---|---| |
| 100 | +| `UnionFindDecoder` | Fast approximate decoding | Stable public API | |
| 101 | +| `FastUnionFindDecoder` | Optimized Union-Find path | Stable public API | |
| 102 | +| `BlossomDecoder` | Exact MWPM / PyMatching-parity validation | Stable public API | |
| 103 | +| `SparseBlossomDecoder` | Faster near-optimal matching | Experimental | |
| 104 | +| `BeliefMatching` | Correlated-noise accuracy experiments | Research/accuracy mode | |
| 105 | +| `BpOsdDecoder` | LDPC and qLDPC workflows | Experimental | |
| 106 | +| `BatchDecoder` / `CPUBatchDecoder` | CPU Monte Carlo sweeps | Stable public API | |
| 107 | +| `CUDABatchDecoder` | CUDA batch decoding | Runtime/build dependent | |
| 108 | +| `OpenCLBatchDecoder` | OpenCL batch decoding | Runtime/build dependent | |
| 109 | +| `stim_compat` | Stim circuit and DEM conversion | Stable utility | |
| 110 | +| `sinter_compat` | Sinter custom decoder integration | Stable utility | |
| 111 | +| `rest_api` | Local decoding service | Local/partner review only | |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +## Evidence-backed positioning |
| 116 | + |
| 117 | +QECTOR Decoder v3 is positioned as a source-available QEC R&D platform, not as a blanket replacement for every mature decoder in every workload. |
| 118 | + |
| 119 | +The repository includes public benchmark artifacts and reproduction scripts for: |
| 120 | + |
| 121 | +- PyMatching-parity logical-error-rate checks on selected surface-code workloads |
| 122 | +- belief-matching accuracy experiments on selected workloads |
| 123 | +- GPU bit-identity checks against CPU output on a tested NVIDIA machine |
| 124 | +- native memory profiling for selected decoder paths |
| 125 | + |
| 126 | +Important boundaries: |
| 127 | + |
| 128 | +- PyMatching remains faster for standard MWPM latency in the checked-in comparison artifacts. |
| 129 | +- Belief-matching is an accuracy/research mode and is much slower in the provided experiments. |
| 130 | +- GPU availability and performance depend on wheel build features, drivers, hardware, and runtime checks. |
| 131 | +- OpenCL support must be confirmed on the target machine or built under the appropriate licensed/custom configuration. |
| 132 | +- REST/API surfaces are for local experiments or controlled review unless separately hardened. |
| 133 | + |
| 134 | +Full methodology, reproducibility notes, and benchmark artifacts are in the GitHub repository: |
| 135 | + |
| 136 | +https://github.com/GuillaumeLessard/qector-decoder |
| 137 | + |
| 138 | +--- |
| 139 | + |
| 140 | +## GPU availability check |
| 141 | + |
| 142 | +```python |
| 143 | +from qector_decoder_v3 import CUDABatchDecoder, OpenCLBatchDecoder |
| 144 | + |
| 145 | +print("CUDA:", CUDABatchDecoder.is_available()) |
| 146 | +print("OpenCL:", OpenCLBatchDecoder.is_available()) |
| 147 | +``` |
| 148 | + |
| 149 | +Do this before making any hardware-specific performance claim. |
| 150 | + |
| 151 | +--- |
| 152 | + |
| 153 | +## Licensing |
| 154 | + |
| 155 | +QECTOR Decoder v3 is source-available. |
| 156 | + |
| 157 | +Personal, academic, educational and non-commercial research use is allowed under the repository license. Company use, funded institutional work, SaaS, hosted API deployment, OEM integration, redistribution, paid consulting, or commercial benchmarking requires a commercial license. |
| 158 | + |
| 159 | +Commercial licensing: |
| 160 | + |
| 161 | +https://www.qector.store |
| 162 | + |
| 163 | +Contact: |
| 164 | + |
| 165 | +admin@qector.store |
| 166 | + |
| 167 | +--- |
| 168 | + |
| 169 | +## Citation |
| 170 | + |
| 171 | +```bibtex |
| 172 | +@software{lessard2026qector, |
| 173 | + author = {Guillaume Lessard}, |
| 174 | + title = {{QECTOR Decoder v3}: Rust/Python Quantum Error Correction Decoding Platform}, |
| 175 | + year = {2026}, |
| 176 | + version = {0.5.0}, |
| 177 | + url = {https://www.qector.store}, |
| 178 | + note = {Source-available. Commercial license required for commercial use.} |
| 179 | +} |
| 180 | +``` |
0 commit comments