Skip to content

Marginalize two-qubit pauli error on lost partners - #284

Merged
david-pl merged 2 commits into
mainfrom
david/paulierror2-marginalization
Nov 6, 2026
Merged

david-pl merged 2 commits into
mainfrom
david/paulierror2-marginalization

Conversation

@david-pl

@david-pl david-pl commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 12:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A normalized channel can panic in debug builds after partner loss or leakage because floating-point rounding pushes a derived marginal above 1, violating a strict assertion.

1 open issue
What changed in this PR

This PR makes two-qubit Pauli noise apply the marginal channel to a surviving qubit when its partner is lost, updating the tableau and Pauli-sum backends.

Changes:

  • Apply marginal Pauli and depolarizing noise to survivors, including leaked partners in the tableau backend.
  • Add regression tests for survivor behavior and loss-aware coefficient scaling.
  • Update comparison tests to document TableauSum’s unchanged no-op behavior.
File Description
crates/​ppvm-tableau/​src/​tableau_like.rs Compute and apply survivor marginals; update channel documentation.
crates/​ppvm-tableau/​src/​noise.rs Test lost and leaked partners and survivor flip rates.
crates/​ppvm-tableau-sum/​tests/​sampler_vs_pure.rs Adjust expectations for differing backend loss behavior.
crates/​ppvm-pauli-sum/​tests/​loss.rs Test marginal coefficient scaling and both-lost cases.
crates/​ppvm-pauli-sum/​src/​sum/​noise.rs Treat lost slots as identity when scaling survivor terms.

Review effort: Balanced

Comment thread crates/ppvm-tableau/src/tableau_like.rs Resolved
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-11-06 13:00 UTC

Summed marginals of a normalized two-qubit channel can round to 1 + eps,
tripping the debug probability check on a lost/leaked partner.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 12:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the survivor-noise marginalization changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@david-pl
david-pl enabled auto-merge (squash) November 6, 2026 12:55
@david-pl
david-pl merged commit 7d9f0e6 into main Nov 6, 2026
15 checks passed
@david-pl
david-pl deleted the david/paulierror2-marginalization branch November 6, 2026 13:00
@github-actions github-actions Bot mentioned this pull request Nov 6, 2026
david-pl pushed a commit that referenced this pull request Nov 6, 2026
## 🤖 New release

* `ppvm-traits`: 0.2.0 -> 0.2.1
* `ppvm-pauli-word`: 0.2.0 -> 0.2.1
* `ppvm-pauli-sum`: 0.2.0 -> 0.2.1 (✓ API compatible changes)
* `ppvm-sym`: 0.2.0 -> 0.2.1
* `ppvm-tableau`: 0.2.0 -> 0.2.1 (✓ API compatible changes)
* `stim-parser`: 0.2.0 -> 0.2.1
* `ppvm-stim`: 0.2.0 -> 0.2.1
* `ppvm-tableau-sum`: 0.2.0 -> 0.2.1 (✓ API compatible changes)
* `vihaco-circuit-isa`: 0.2.0 -> 0.2.1
* `ppvm-vihaco`: 0.2.0 -> 0.2.1
* `ppvm-tui`: 0.2.0 -> 0.2.1
* `ppvm-cli`: 0.2.0 -> 0.2.1

<details><summary><i><b>Changelog</b></i></summary><p>












## `ppvm-cli`

<blockquote>

##
[0.2.1](v0.2.0...v0.2.1)
- 2026-11-06

### Other

- Marginalize two-qubit pauli error on lost partners
([#284](#284))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants