Skip to content

Add CPU trellis decoder#268

Merged
noajshu merged 12 commits into
mainfrom
trellis-cpu-decoder
Jul 9, 2026
Merged

Add CPU trellis decoder#268
noajshu merged 12 commits into
mainfrom
trellis-cpu-decoder

Conversation

@noajshu

@noajshu noajshu commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a tesseract_trellis decoder binary and library.
I built this on a branch and opened a PR earlier (#230) but closed it because it grew too big and ocmplicted.

But I do need this tesseract trellis binary to live somewhere and anywhere now we should land it.
In the meantime at QEC26 I saw Leverrier's talk on the frontier decoder which is quite similar conceptually. There are some differences but anyways it is a nice idea and I look forward to comparing to the different future cost estimates in their paper.

Usage example:

bazel build src:tesseract_trellis

./bazel-bin/src/tesseract_trellis \
  --circuit path/to/circuit.stim \
  --sample-num-shots 1000 \
  --sample-seed 1234 \
  --threads 1 \
  --ranking-mode future-detcost \
  --beam 1024 \
  --obs-probs-out obs_probs.bin

I highly recommend to use future-detcost ranking mode to allow good performance at the smallest beam sizes.

@noajshu
noajshu marked this pull request as ready for review July 6, 2026 23:09
@noajshu
noajshu requested a review from a team as a code owner July 6, 2026 23:09
@noajshu
noajshu requested review from LalehB and mhucka and removed request for a team July 6, 2026 23:09

@mhucka mhucka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not as throughout a review as it should be; this is a long PR and I'm kind of out of my depth on the technical and C++ details. Still, I did what I could. Hopefully the comments are more helpful than annoying …

Comment thread src/tesseract_trellis_main.cc
Comment thread src/tesseract_trellis_cli_test.sh Outdated
Comment thread src/tesseract_trellis_main.cc Outdated
Comment thread src/tesseract_trellis_main.cc
Comment thread src/tesseract_trellis_main.cc
Comment thread src/tesseract_trellis.cc
Comment thread src/tesseract_trellis_main.cc
Comment thread src/tesseract_trellis_main.cc
@noajshu

noajshu commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

This is not as throughout a review as it should be; this is a long PR and I'm kind of out of my depth on the technical and C++ details. Still, I did what I could. Hopefully the comments are more helpful than annoying …

Thank you @mhucka ! This is very helpful. I addressed many of the comments.

@mhucka mhucka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last detail. Optional. Otherwise LGTM!

Comment thread src/tesseract_trellis.cc
@noajshu

noajshu commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Thanks again for the review @mhucka !

@noajshu
noajshu merged commit 2137320 into main Jul 9, 2026
15 checks passed
@noajshu
noajshu deleted the trellis-cpu-decoder branch July 9, 2026 01:34
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.

2 participants