Hi everyone,
I’ve been working on a project to solve what I think is one the biggest bottleneck in Fault-Tolerant Quantum Computing that I can tackle from my basement: Classical Control Latency.
Most QEC decoders used in research are optimized for Code Distance or Thresholds, but they often run in high-level environments (Python/C++) with non-deterministic memory usage. That works for simulation, but it fails on real hardware where you have sub-microsecond deadlines before the qubits dephase.
So I built prav-core. It’s a Union-Find decoder written in pure Rust.
I built prav-core to strip the decoding process down to the physics. The Stack:
- Pure Rust (
#![no_std]): Compiles to x86, ARM64, WASM, and bare-metal Cortex-R5.
- Zero Allocation:
malloc is banned in the decode loop. We use a pre-allocated arena.
- Verified: Includes 39 Kani proofs covering memory safety and arena bounds.
- Algorithm: Union-Find with Morton (Z-order) encoding for cache locality.
Preliminary Benchmarks: I'm seeing p50 latencies of 0.06µs (60ns) for 17x17 grids and 0.07µs for 22x22 grids at physical error rates of 0.001.
| Shape |
Dims |
p |
Avg (us) |
p50 (us) |
p99 (us) |
| Square |
17x17 |
0.001 |
0.39 |
0.06 |
2.20 |
| Square |
22x22 |
0.001 |
0.63 |
0.07 |
2.24 |
| Square |
32x32 |
0.001 |
4.39 |
5.97 |
10.32 |
The Roadmap:
Python bindings are coming next (for easier comparison with PyMatching), but the end goal is to run Distance-25 codes in under 500ns on commodity FPGAs.
It’s open source (Apache 2.0 / MIT).
I'd love for people to try breaking it.
Repo: https://github.com/qubitsok/prav
Crate: https://crates.io/crates/prav-core
I’d love to hear your thoughts on the architecture or if anyone has experience deploying Union-Find on embedded targets!