You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# From a raw check matrix H (uniform prior p=0.1):
166
+
H = np.array([[1, 1, 0], [0, 1, 1]], dtype=np.uint8)
167
+
bm = BeliefMatching(H, p=0.05)
168
+
obs = bm.decode(syndrome)
169
+
```
170
+
171
+
### CUDA / GPU
172
+
173
+
```python
174
+
from qector_decoder_v3 import CUDABatchDecoder
175
+
176
+
# Always check availability before constructing
177
+
if CUDABatchDecoder.is_available():
178
+
dec = CUDABatchDecoder(check_to_qubits, n_qubits)
179
+
corrections = dec.batch_decode(syndromes)
180
+
else:
181
+
print("No CUDA GPU detected — use BatchDecoder for CPU batch decoding")
182
+
```
183
+
184
+
---
185
+
186
+
## Independent validation (v0.5.3)
187
+
188
+
Validated by independent automated test suite (86/87 checks on v0.5.2 baseline; all 5 API failures closed in v0.5.3, post-fix 33/33 PASS + 1 SKIP on CPU-only host).
189
+
Platform: Windows 10, AMD Ryzen 16-core, NVIDIA GTX 1660 Ti (CUDA 7.5), Python 3.11, PyMatching 2.4.0.
190
+
Full artifact: `benchmark_results/validation_v051.json`.
LookupTableDecoder is the fastest single-shot decoder on rep d=5 (precomputed table, 64 entries, O(1) lookup).
227
+
228
+
### Known limitations
229
+
230
+
-**Union-Find is ~3x less accurate than MWPM** — expected speed/accuracy trade-off.
231
+
-**Single-round code-capacity noise does not produce surface-code distance scaling.** Use circuit-level Stim DEM with `qector_sinter_decoders()` for threshold curves.
232
+
-**SparseBlossom batch may return different (but valid) corrections than single-shot on degenerate syndromes.** Benign matching degeneracy.
233
+
-**CUDABatchDecoder raises RuntimeError cleanly when no CUDA GPU is present.** Use `CUDABatchDecoder.is_available()` to check first.
234
+
235
+
---
236
+
237
+
## License
238
+
239
+
Source-available. Commercial use requires written licensing through https://www.qector.store.
0 commit comments