feat(#162): use exponential action for relaxation trajectories - #175
Draft
marcohost33-maker wants to merge 12 commits into
Draft
marcohost33-maker wants to merge 12 commits into
marcohost33-maker wants to merge 12 commits into
Conversation
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.
Summary
Stacked on PR #174, which establishes the fail-closed trajectory-domain contract. This PR changes only the propagation method and adds backend/audit evidence.
SciPy documents
scipy.sparse.linalg.expm_multiplyas computing the actionexp(tA) Bdirectly, with an interval API for evenly spaced times. LiouScope now uses that action instead of materialising the full denseexpm(tL)matrix.Backend contract
linspacegrids -> oneexpm_multiply(..., start, stop, num)interval call;t=0state is restored explicitly;diagnose()remains dense-only: this PR does not claim sparse-native orchestration or sparse steady-state solving.Fail-closed preservation
PR #174 remains the prerequisite. Before entering the action algorithm LiouScope checks that
L*tand its 1-norm are representable. Runtime failures or non-finite action outputs raiseUnrepresentableTrajectoryError. The astronomical #156 fixture is therefore still a domain refusal rather than a hang/NaN.No physics cutoff is introduced: the preflight refuses only non-finite represented entries or an unrepresentable mathematical 1-norm.
Numerical audit
RelaxationResultgains additive/defaulted fields:trajectory_backend;trajectory_max_trace_error;trajectory_max_hermiticity_defect;trajectory_min_eigenvalue.These are measurements, not repair operations. Negative positivity drift is recorded; no eigenvalue clipping is performed.
Discrimination
scipy.linalg.expm(L*t) @ rho0reference on uniform and non-uniform grids;t=0;L -> cL, t -> t/c;benchmarks/issue162_expm_action.pyruns full dense expm and action in separate processes, reporting elapsed time, peak RSS and relative error.Scientific / release impact
This is a numerical methodology change, not a mathematical-model change. Floating-point trajectories can move at round-off level relative to full dense expm, so README / CHANGELOG / CITATION are updated. No D1-D24 definition, classifier threshold, manifest field or schema changes.
Dependency
Must not merge before #174. Once #174 is integrated, this stack should be rebuilt/rebased non-destructively from then-current main if required by base movement.
Test plan
Refs #156. Closes #162 when merged after #174.