Handling of trailing enqueues on realtime paths - #784
Draft
eliotheinrich wants to merge 1 commit into
Draft
Conversation
…g enqueues Signed-off-by: Eliot Heinrich <eheinrich@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The current realtime path is inconsistent when the trailing measurements are not referenced by any detectors. Decoders fire once
num_msyn_per_decodesyndromes are accumulated, but if further syndromes are enqueued after this point, the syndrome buffer is corrupted, depending on the realtime path followed.On the decoding server, any enqueue while
shot_state == rseult_readyimmediately reset the state tocolleting, discarding pending correction result before the client can retrieve it.On the in-process path (i.e.
decoder::enqueue_syndrome), the decoder firing setsmsyn_buffer_index = 0, so trailing measurements were written into the syndrome buffer at index 0. Ifreset_decoderis not called, the next shot is silently corrupted.This PR fixes the decoding server path by introducing a
total_circuit_measurementsfield to thedecoderclass, allowing for the decoder to absorb trailing measurements without disturbing the corrections result. The budget defaults tonum_msyn_per_decode(i.e. no trailing measurements), and the caller can set it higher when circuits produce trailing syndromes. The total number of measurements is available as a field of the decoder context.Runtime / performance impact
N/A
Self-review checklist
Please confirm each item before requesting review. Check
[x]or strikethrough and explain.
Before requesting review
Scope and size
(if so, an issue has been raised).
Tests
just when it is missing.
EXPECT_*/assertchecks areinsufficient for algorithmic correctness.
Documentation
tracked.
Code style
snake_casevscamelCase) forthe area being modified.
Dependencies
OSRB tickets filed.