Skip to content

Loss decoding based on Pauli envelope - #166

Open
Yue Wu (yuewuo) wants to merge 197 commits into
mainfrom
feature-90-pauli-envelop-loss
Open

Yue Wu (yuewuo) wants to merge 197 commits into
mainfrom
feature-90-pauli-envelop-loss

Conversation

@yuewuo

@yuewuo Yue Wu (yuewuo) commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Adds end-to-end Pauli-envelope loss decoding support:

  • Compiles configurable gate-loss policies into causal loss graphs while preserving herald identity across gadgets and decode windows.
  • Adds language support for the Pauli-envelope data that can is output by the annotator and can be inspected or edited by user
  • Adds coordinator strategies to ignore loss, convert it into shot-scoped edge reweights, or pass structured LossInfo to loss-aware decoders.
  • Supports decoder capability negotiation, persistent graph reuse, and random imputation of lost measurement outcomes.
  • Includes a herald-aware MLE reference decoder, updated protobuf/Python/CLI APIs, comprehensive tests, and tutorial documentation.

Yue Wu and others added 30 commits June 18, 2026 10:36
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>
Yue Wu and others added 14 commits September 16, 2026 14:18
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
Comment thread deq/deq_runtime/src/coordinator/loss_handler.rs
Juan M. Bello-Rivas and others added 3 commits September 17, 2026 19:00
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>
Comment thread deq/deq_runtime/src/decoder/mle_loss_decoder.py
Juan M. Bello-Rivas and others added 3 commits September 18, 2026 13:25
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>
Comment on lines 461 to 465
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; }
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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).

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.

5 participants