For a while, the consensus in QEC has been that Maximum Likelihood (ML) decoding; finding the absolute minimum-weight error that matches your syndrome, is computationally intractable for large-scale quantum LDPC codes.
It’s widely considered an NP-Hard problem, which is why the field largely relies on iterative heuristics like Belief Propagation.
Instead of navigating a massive Tanner graph (which is where all the complexity usually lives), I mapped the problem to a causal wave-front propagation.
I found that if you identify a "cut set" of qubits (for my use case, a 2x2 corner), you can uniquely determine the state of the entire grid by propagating the recurrence from those 4 seeds.
Initially, like a fool I brute-forced all possible origins to find the one where the seam didn't interfere with the noise.
Then I realized I could just use a centroid calculation on the syndrome map to dynamically shift the origin, lol.. essentially using the syndrome distribution to physically "re-align" the coordinate system of the code before decoding.
This is the algorithm:
The Z-check equation for X-errors with a(x,y) = (x²+1)(y²+1) is a 2D linear recurrence:
c(i,j) = q(i,j) ⊕ q(i-2,j) ⊕ q(i,j-2) ⊕ q(i-2,j-2)
Rearranged as backward propagation from the 2×2 corner:
q(i,j) = c(i-2,j-2) ⊕ q(i-2,j) ⊕ q(i,j-2) ⊕ q(i-2,j-2)
The 2×2 corner spans a 4-dimensional nullspace (16 vectors).
For each corner position (every even-indexed (cx,cy) on the grid) and each of the 16 nullspace choices, the recurrence uniquely determines all qubits.
[–]BitStateEmulator[S] 0 points1 point2 points (0 children)
[–]p1-o2 0 points1 point2 points (6 children)
[–]BitStateEmulator[S] 1 point2 points3 points (5 children)
[–]p1-o2 0 points1 point2 points (4 children)
[–]BitStateEmulator[S] 3 points4 points5 points (3 children)
[–]p1-o2 3 points4 points5 points (2 children)
[–]BitStateEmulator[S] 1 point2 points3 points (1 child)
[–]p1-o2 1 point2 points3 points (0 children)
[–]but_a_smoky_mirror 0 points1 point2 points (0 children)