Skip to content

Conversation

@noajshu
Copy link
Contributor

@noajshu noajshu commented Jun 10, 2025

Fix #20 by adding --det-order-bfs argument.
Apparently it can improve performance for the same LER as well:

Before change:
bazel build src:all && time ./bazel-bin/src/tesseract --pqlimit 200000 --beam 15 --beam-climbing --num-det-orders 16  --sample-num-shots 10000 --det-order-seed 13267562 --circuit testdata/colorcodes/r\=9\,d\=9\,p\=0.002\,noise\=si1000\,c\=superdense_color_code_X\,q\=121\,gates\=cz.stim --sample-seed 717347  --threads 60  --print-stats
num_shots = 10000 num_low_confidence = 0 num_errors = 52 total_time_seconds = 64829.16896500005

After change:
bazel build src:all && time ./bazel-bin/src/tesseract --pqlimit 200000 --beam 5 --num-det-orders 20  --sample-num-shots 10000 --det-order-seed 13267562 --circuit testdata/colorcodes/r\=9\,d\=9\,p\=0.002\,noise\=si1000\,c\=superdense_color_code_X\,q\=121\,gates\=cz.stim --sample-seed 717347  --threads 60 --det-order-bfs
num_shots = 10000 num_low_confidence = 2 num_errors = 26 total_time_seconds = 46809.56727799983

Plus a few updates for the visualizer, now it should load a default logfile automatically!

noajshu and others added 19 commits June 5, 2025 15:14
…s-in-src/common.cc

Fix zero-probability handling
…cument-changes

Add configurable test modes
…and-tesseract-decoder

Add docs links to README
…ing-algorithm

Add BFS detector ordering option
…dex.html-for-default-visualizatio

Add BFS detector coordinate logging
Add the default logfile for the visualizer
@noajshu noajshu requested a review from LalehB June 10, 2025 04:50
Copy link
Collaborator

@LalehB LalehB left a comment

Choose a reason for hiding this comment

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

LGTM!
Thanks Noah 👍🏻
btw is viz/logfile.json the file with the color code example?

@noajshu
Copy link
Contributor Author

noajshu commented Jun 10, 2025

btw is viz/logfile.json needed?
This is needed in order for the html to be able to load a default file for visualization. It is on the smaller side so I figured it would be OK to store in the github.

@noajshu noajshu merged commit af02125 into quantumlib:main Jun 10, 2025
3 checks passed
@noajshu
Copy link
Contributor Author

noajshu commented Jun 10, 2025

also tried without the dfs det order and the tighter beam settings:

time ./bazel-bin/src/tesseract --pqlimit 200000 --beam 5 --num-det-orders 20  --sample-num-shots 10000 --det-order-seed 13267562 --circuit testdata/colorcodes/r\=9\,d\=9\,p\=0.002\,noise\=si1000\,c\=superdense_color_code_X\,q\=121\,gates\=cz.stim --sample-seed 717347  --threads 60 

num_shots = 10000 num_low_confidence = 5 num_errors = 43 total_time_seconds = 55060.10312700005

@noajshu
Copy link
Contributor Author

noajshu commented Jun 13, 2025

BTW -- adding --no-revisit-dets like in the paper did not help the older version of det ordering:

bazel build src:all && time ./bazel-bin/src/tesseract --no-revisit-dets --pqlimit 200000 --beam 15 --beam-climbing --num-det-orders 16  --sample-num-shots 10000 --det-order-seed 13267562 --circuit testdata/colorcodes/r\=9\,d\=9\,p\=0.002\,noise\=si1000\,c\=superdense_color_code_X\,q\=121\,gates\=cz.stim --sample-seed 717347  --threads 60  --print-stats

# run 1
num_shots = 10000 num_low_confidence = 0 num_errors = 47 total_time_seconds = 62430.72689600012
# run 2
num_shots = 10000 num_low_confidence = 0 num_errors = 52 total_time_seconds = 65866.87115100007

With the --det-order-bfs it is of course faster as reported above:

bazel build src:all && time ./bazel-bin/src/tesseract --pqlimit 200000 --beam 5 --num-det-orders 20  --sample-num-shots 10000 --det-order-seed 13267562 --circuit testdata/colorcodes/r\=9\,d\=9\,p\=0.002\,noise\=si1000\,c\=superdense_color_code_X\,q\=121\,gates\=cz.stim --sample-seed 717347  --threads 60 --det-order-bfs

num_shots = 10000 num_low_confidence = 2 num_errors = 26 total_time_seconds = 47688.57385300003

and with the --det-order-bfs and --no-revisit-dets it is the best

bazel build src:all && time ./bazel-bin/src/tesseract --pqlimit 200000 --beam 5 --num-det-orders 20  --sample-num-shots 10000 --no-revisit-dets --det-order-seed 13267562 --circuit testdata/colorcodes/r\=9\,d\=9\,p\=0.002\,noise\=si1000\,c\=superdense_color_code_X\,q\=121\,gates\=cz.stim --sample-seed 717347  --threads 60 --det-order-bfs

num_shots = 10000 num_low_confidence = 0 num_errors = 27 total_time_seconds = 40312.73824599993

noajshu added a commit that referenced this pull request Aug 7, 2025
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.

out_of_range error

2 participants