pub struct UnionFindDecoder { /* private fields */ }Expand description
Fast union-find based decoder with O(n * alpha(n)) complexity.
The algorithm:
- Extract defects (syndrome bit flips between consecutive rounds).
- Build a defect graph where edges connect nearby defects weighted by Manhattan distance.
- Grow clusters from each defect using weighted union-find, merging clusters whose boundaries touch.
- For each odd-parity cluster, assign Pauli corrections along the shortest path to the nearest boundary.
This is significantly faster than full MWPM while achieving near-optimal correction for moderate error rates (p < 1%).
Implementations§
Trait Implementations§
Source§impl SurfaceCodeDecoder for UnionFindDecoder
impl SurfaceCodeDecoder for UnionFindDecoder
Source§fn decode(&self, syndrome: &SyndromeData) -> Correction
fn decode(&self, syndrome: &SyndromeData) -> Correction
Decode a syndrome and return the inferred correction.
Auto Trait Implementations§
impl Freeze for UnionFindDecoder
impl RefUnwindSafe for UnionFindDecoder
impl Send for UnionFindDecoder
impl Sync for UnionFindDecoder
impl Unpin for UnionFindDecoder
impl UnsafeUnpin for UnionFindDecoder
impl UnwindSafe for UnionFindDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more