Repository navigation
Conversation
Contributor
|
david-pl
changed the base branch from
trait-2/ppvm-pauli-sum-2
to
trait-2/pauli-sum-2-loss-noise
November 23, 2026 11:58
david-pl
approved these changes
Nov 23, 2026
david-pl
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Did you run some benchmarks on 314-316 comparing against the old version?
| /// Multiplies every pair of terms, so this costs `|self| · |rhs|` word products. | ||
| /// Order matters, since Pauli words need not commute. Policies may differ; the | ||
| /// result keeps the left one. Panics if the widths differ. | ||
| impl<S, P, P2> Mul<&Sum<S, P2>> for &Sum<S, P> |
Collaborator
There was a problem hiding this comment.
Can you add a wrapper that also implements the product for owned sums?
This branch has not been deployed
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.
Completes products, projection, and readout for
ppvm-pauli-sum-2, so the enginecan run full propagation workloads (propagate an observable, then read it out).
Stacked on top of #315.
&a * &bis the distributive product(Σ aₚP)(Σ b_qQ) = Σ aₚb_q·iᵏ·PQ, with each word product's phaseiᵏabsorbedinto the coefficient. Requires coefficients with an imaginary unit (complex);
real and lossy sums have no product.
p0/p1implementProjectionasO ↦ PₘOPₘ. On the projectedqubit,
I/Zmap to(I ± Z)/2combinations;X,Y, and lost terms becomezero.
sum.trace(&pattern)sums the coefficients of matching words.A
Patternis oneSiteSet(I | X | Y | Z | L | ANY) per site;Pattern::zero_state(n)gives⟨0…0|O|0…0⟩. ApplyXfirst to read otherbasis states.
No regressions in existing gates or channels (within noise, criterion, 16k
terms × 32 qubits). Zero-state trace is 1.9–3× faster than legacy, and
p0is~10% faster.