-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stim::ReferenceSampleTree
to support loop folded reference sampling
#772
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some comments.
Nothing really blocking (thus the LGTM), but things that should probably be considered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. This all looks good. I think the only thing left worth updating is the non-RVO stuff (#772 (comment)) and cleaning up the throw away work in tortoise (#772 (comment)). But neither of those are really blocking.
Final LGTM.
Get a compressed tree representation of the reference sample by using
stim::ReferenceSampleTree::from_circuit_reference_sample(circuit)
.The reason for a tree, instead of raw run length encoding, is to support nested loops (e.g. physical surface code rounds repeating within repeated logical operations).
Example test:
Example benchmark (25 milliseconds to do a distance 31 surface code with a billion rounds):
Part of #768