perf(lindblad): skip the second hop and corrector when hop 2 admits nothing - #230
Merged
Merged
Conversation
…othing With admit_basis set, once the basis has reached max_basis the first leakage admission fills the whole room admit - |basis|, so the second leakage call ran with room = 0 and admitted nothing in every capped step while still evaluating all its candidates, and the corrector then repeated the predictor exactly on the same basis and input. pc_step and pc_step_orbit_rep now skip the second leakage pass when room = 0 and reuse the predicted state whenever the second hop admitted no string. Results are bit-identical; skipped phases report 0 in PcStepTimings. Default behaviour is otherwise unchanged: capped steps still carry no second-order admission, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
david-pl
approved these changes
Sep 28, 2026
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.
Stacked on #222 (
split/5-kossakowski).Summary
With
admit_basisset, once the basis has reachedmax_basisthe first leakage admission fills the whole roomadmit − |basis|. The second leakage call then ran with room = 0 and admitted nothing in every capped step, while still evaluating all its candidates, and the corrector repeated the predictor exactly on the same basis and input.pc_stepandpc_step_orbit_repnow skip the second leakage pass when room = 0 and reuse the predicted state whenever the second hop admitted no string. Results are bit-identical; skipped phases report 0 inPcStepTimings. Default behaviour is otherwise unchanged: capped steps still carry no second-order admission, as before.Single commit,
crates/ppvm-lindblad/src/step.rsonly.Measurements
pc_stepon the two-leg XY ladder with a local probe (not part of this PR): L = 41 rungs (N = 82),max_basis = 2^18,admit_basis = 3·2^18, dt = 0.1, 25 steps, 4 threads,drop_tol = 0. Apple M4 MacBook Air (fanless, so wall times are only comparable within a rep).In the base, 21 of the 25 steps are capped and the second hop (leakage2 + expm2) accounts for 53% of the wall time (34.5 of 65.2 s).
Tests:
cargo test -p ppvm-lindbladpasses (8/8) with this change stacked together with the blocked-CSC PR; not yet run on this branch alone (CI will).🤖 Generated with Claude Code