Loss decoding based on Pauli envelope - #166
Yue Wu (yuewuo) wants to merge 197 commits into
Conversation
Merges 8 commits from main including PR #84 (@REPROPAGATE). Conflict resolution: - compose_builder.py: kept HEAD (local @REPROPAGATE implementation is a superset of main's; includes _translate_compose_conditionals). - jit_annotate.py: kept HEAD (CONDITIONAL R<j> emission block). - jit_noise_builder.py: merged error message wording (main's 'or' + HEAD's extra_clause). - teleportation.deq fixture: kept HEAD (additional Teleporatation2 test compose). - test_compose_repropagate.py: kept HEAD (added TestTranslateComposeConditionals class). - jit_library_builder_test.py: kept both (HEAD's 8 compose_conditional tests + main's 3 build_jit_program tests are non-overlapping). Known integration issues (to fix in follow-up commits): - 9 tests fail due to divergent @REPROPAGATE implementations between HEAD's f526417 and main's PR #84. The basis-freedom check in jit_noise_builder.py:1788 doesn't see row_extra_descs for CONDITIONAL contributions in the merged code. - 2 runtime test files fail to collect (deq_runtime needs maturin rebuild for main's new APIs).
Co-authored-by: Yue Wu <yuewu4@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…t, fix swapped Clifford gates (#100) Co-authored-by: jbellorivas <jbellorivas@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Juan M. Bello-Rivas <jbellorivas@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…er (#172) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
A formal model of quantum error correction protocols. Authored-by: Adam Paetznick <adpaetzn@microsoft.com>
…lop-loss # Conflicts: # .ado/stages/build.yaml # .github/workflows/build.yaml
Use union rather than parity across parent-child loss sites. Keep parity unchanged for independent toggles. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> (cherry picked from commit dc5f0a4eadab29b26dafd9fd82c7a34fef2f5bef)
Update the overlap expectation and add the certain-parent/child regression. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The loss-aware ILP required a hyperedge to be selected whenever it arose from an ordinary error. Pauli-envelope semantics instead combine ordinary-error and loss contributions with exclusive or, so matching contributions cancel. Allow the ordinary and loss contributions to cancel when the loss is selected. Add regressions showing that this restores feasibility for the probability-one example and makes the subunit example choose no net edges instead of the three-edge cycle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the feasible endpoint assignment and the finite-probability cost comparison directly beside their regressions so reviewers do not need the external audit proofs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Describe each regression using only its graph, probabilities, detector parity, and expected decoder output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| for (size_t ei : best) { | ||
| for (size_t orig = 0; orig < original_error_map.size(); ++orig) { | ||
| if (original_error_map[orig] == ei) { result.push_back(orig); break; } | ||
| } | ||
| } |
There was a problem hiding this comment.
Tesseract merges hyperedges that flip the same detectors: a hyperedge coming from the Pauli envelope with probability zero might be merged with another identical hyperedge having nonzero probability. The Tesseract interface may return the hyperedge with probability zero because the mapping from a merged hyperedge back to the original hyperedges ignores their probabilities.
There was a problem hiding this comment.
Fixed by ff39a8b
Tesseract previously mapped every selected merged error to its first original member, even when that edge's current probability was zero. Preserve original costs across construction and reweighting, then track the lowest-cost member of each merged group. The regression covers loaded probabilities, shot-scoped reweighting, and restoration of the loaded probabilities. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| self.use_loaded_reweights, | ||
| ) | ||
| .await | ||
| .unwrap(); |
There was a problem hiding this comment.
I think the coordinator at this stage does not have to panic because decode_projected will return a Result that could be handled. I think the same happens earlier in this coordinator and in the monolithic one.
In general, I remain uneasy about the usage of unwrap (see last paragraph of the section Shortcuts for Panic on Error).
Adds end-to-end Pauli-envelope loss decoding support: