Back to News
quantum-computing

I built a bare-metal, zero-allocation QEC decoder in Rust (~400ns on 17x17 with p=0.001). It's fully open source.

Reddit r/QuantumComputing (RSS)
Loading...
2 min read
0 likes
⚡ Quantum Brief
A quantum error correction (QEC) decoder named prav-core achieves sub-microsecond latency, addressing classical control bottlenecks in fault-tolerant quantum computing by replacing high-level Python/C++ decoders with bare-metal Rust implementation. The decoder uses a zero-allocation Union-Find algorithm with pre-allocated memory arenas, eliminating non-deterministic malloc calls to meet sub-500ns deadlines required before qubit dephasing on real hardware. Benchmarks show 60ns median latency for 17x17 grids at 0.1% error rates, scaling to 5.97µs for 32x32 grids, with verified memory safety via 39 Kani proofs and Morton encoding for cache optimization. Targeting embedded deployment, the Rust-based stack (#![no_std]) compiles to x86, ARM64, WASM, and Cortex-R5, aiming for 500ns execution of Distance-25 codes on commodity FPGAs. The open-source project (Apache 2.0/MIT) seeks community testing and plans Python bindings for comparison with PyMatching, focusing on real-world hardware constraints over simulation performance.
I built a bare-metal, zero-allocation QEC decoder in Rust (~400ns on 17x17 with p=0.001). It's fully open source.

Summarize this article with:

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! submitted by /u/freechoice [link] [comments]

Read Original

Tags

quantum-computing
quantum-hardware

Source Information

Source: Reddit r/QuantumComputing (RSS)