Repository navigation
Conversation
MSRudolph
requested review from
AlexSchuckert and
Roger-luo
and
a balanced review from Copilot
November 3, 2026 10:40
Contributor
|
The candidate position table and source ordering are rebuilt by every proposal and unused by selection, so holding them through the exponential only raised its peak allocation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Final truncation allocated a fresh magnitude array alongside the retained Taylor scratch. The real predictor-corrector step lends that scratch to the rank cap instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The crate's word type was ppvm_pauli_word::PauliWord, which also stores the register size and a cached hash, making a 128-qubit word 48 bytes. Word now holds only the X and Z planes (32 bytes); the register size comes from the model and hashes are computed on demand with the same digest and ordering, so hash-table iteration order is unchanged. ppvm_pauli_sum symmetry routines still take the general type, exposed as GeneralWord, with conversions at that boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With words no longer caching their hash, each action term would be hashed again for sorting and again for every basis-index probe. The action plan now emits each output word with its hash, and the sort and index lookups (get_hashed) reuse it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ries With only Hermitian Pauli jumps, the off-diagonal generator is real antisymmetric term by term, so the unit cache keeps each connected pair once and the product applies it in both directions with opposite signs. Pairs are grouped into block-to-block tiles with 16-bit block-local positions and a 16-bit term code (32-bit when the model has more terms), making an entry 6 bytes instead of 8 for every directed connection. Entry storage is sized to the block's count with 1/16 headroom rather than doubled, and the exponential's shift and norm bound are reduced while streaming rows instead of from a per-row array. Products agree with the general generator to rounding, not bit for bit, because each row sums its parents in a different order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
I think this is better to be merged after the main refactor gets in - the new trait system gives more flexibility in choosing different |
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.
Continuous-time Pauli propagation (CTPP) steps reuse their storage, and candidate selection for the support is modularized. With the default streaming proposer, the measured ladder cases run 18–32% faster and use 61–65% less peak memory than the original
mainbaseline. On the dephased ring, peak memory falls by 67%, with no measurable runtime improvement. The optional shortlist proposer reduces runtime by 28–46% and peak memory by 57–76% across these cases.Streaming remains the default. Shortlist is faster on the larger cases, but uses more memory than streaming on the ladder and changes the retained support. Both use magnitude-based retention.
Design
CandidateProposeris the interface for selecting which candidate strings to admit. Callers can supply a strategy through the existing step methods.ShortlistScoreProposershortlists candidates by individual Hamiltonian contributions, then ranks them by full signed leakage.StreamingProposerremains the default. General dissipators use it automatically.LindbladSpecreuses candidate lookup tables, source-order storage, generator connections, and exponential work arrays across step calls. Callers can own this storage throughPcStepWorkspace.ppvm-lindblad'sWordstores only the X and Z bit planes, 32 bytes at 128 qubits instead of 48. The number of qubits comes from the model. Hashes are computed when needed and match the generalPauliWord's hashes and ordering, so hash-table order is unchanged.ppvm_pauli_sumsymmetry routines still take the general type, exposed asGeneralWord, with conversions at that boundary.Benchmarks vs the original
mainbaselineMeasured on 2026-11-09 after removing forward-looking retention: median of three fresh, interleaved runs per implementation, Apple arm64 on AC power, mimalloc (the allocator the Python extension uses), 6 threads,
MIMALLOC_PURGE_DELAY=0. Each case uses dt=0.1, retained support limit B and admission cap 3B. Times measure propagation; build time is excluded. Memory is OS-reported peak RSS.The baseline is the original PR control at
342e3234. Both current proposers use the same binary built from the reverted working tree. Both models evolve a magnetization operator in the Heisenberg picture.Default: streaming
Values show baseline → current.
Optional: shortlist-and-score
Values show the same baseline → current with shortlist selected.
For comparison across string representations, S = 56·B bytes: 7 MiB at B=2^17 and 28 MiB at B=2^19. Differences below about 5% are not treated as resolved performance gains.
Numerical agreement
These comparisons measure agreement with the original baseline, rather than accuracy against an exact reference. Neither current proposer is bit-identical to that baseline. All three repeats reproduce identical numerical trajectories within each implementation and case.