Skip to content

Error Sparsification#254

Draft
noajshu wants to merge 22 commits into
quantumlib:mainfrom
noajshu:sparsify-errors
Draft

Error Sparsification#254
noajshu wants to merge 22 commits into
quantumlib:mainfrom
noajshu:sparsify-errors

Conversation

@noajshu
Copy link
Copy Markdown
Contributor

@noajshu noajshu commented May 21, 2026

Adds optional per-shot error sparsification to tesseract.

When enabled with --sparsify-errors, the decoder always keeps errors up to --sparsify-base-degree, then reactivates up to --sparsify-reactivate-limit higher-degree errors up to --sparsify-max-degree based on fired-detector overlap. This means we only enable high-degree errors that have a reasonable chance of actually being used.

I have tried it on p=0.001, 0.002 for the color, surface, and bicycle codes.
Recommended parameters (WIP):

  • Superdense color code:
    • k = 3, M = 2*d**2
  • Bivariate Bicycle code:
    • k = 3, M = 1000 seems good enough for the q = 144 one (the smallest with r=6)
  • Surface code:
    • k = 2, M = ?

By the way, as a note for future optimization, I think this could be improved a lot because e.g. the eneighbors can be reduced significantly. This optimization is not done here.

It would be interesting if we can discover the best k from inspecting just the DEM. Also would be good to not have to tune the max-num-errors thing

noajshu and others added 22 commits March 18, 2026 20:58
…flag

Update Python README for `strip_undecomposable_errors` option on demutil.decompose_errors
  Enables per-shot sparse error activation.

- `--sparsify-base-degree K`
  Maximum detector degree for mandatory errors. Errors with `degree <= K` are always enabled for every shot.

- `--sparsify-max-degree M`
  Maximum detector degree for optional errors that may be reactivated. Errors with `degree > M` are never enabled. If omitted, there is no max-degree limit.

- `--sparsify-reactivate-limit N`
  Maximum number of optional errors to reactivate per shot. Optional means `degree > K` and `degree <= M`.

If `--sparsify-errors` is not present, then passing any other `--sparsify-*` flag should raise a helpful argument error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant