qscat.evolution

Time propagators for d/dt psi = -i H psi with complex, possibly non-Hermitian H. The order-N diagonal-Padé stepper generalizes Crank–Nicolson (order 1); order 3 is what makes the time-dependent cross sections converge.

make_cn_stepper

Build a Crank-Nicolson stepper for Hamiltonian H and time step dt.

make_pade_stepper

Build an order-order diagonal-Pade stepper for d/dt psi = -i H psi.

make_sparse_cn_stepper

Sparse Crank-Nicolson stepper -- the sparse sibling of make_cn_stepper.

pade_roots

The order diagonal-Pade denominator roots of exp(z) (see module docstring).

Time propagation (Crank-Nicolson, …).

Public API:
  • make_cn_stepper – Crank-Nicolson propagator for the time-dependent Schrodinger equation, d/dt psi = -i H psi, for a general (possibly non-Hermitian) complex Hamiltonian matrix H. See docs/physics/n2-td-cross-section.md for the N2 resonance application.

  • make_sparse_cn_stepper – the sparse sibling for large sparse H, factoring once with SparseLU.

  • make_pade_stepper – order-N diagonal-Pade generalization of the sparse CN stepper (order 1 == Crank-Nicolson); O(dt^(2N+1)) per step, for the higher-order accuracy the TD cross section needs to converge to the TI oracle. pade_roots exposes the denominator roots.

qscat.evolution.make_cn_stepper(H, dt)[source]

Build a Crank-Nicolson stepper for Hamiltonian H and time step dt.

Parameters:
  • H (ndarray) – (n, n). Hamiltonian matrix (complex, possibly non-Hermitian).

  • dt (float) – Time step.

Returns:

stepper – Advances a state vector psi by one time step dt.

Return type:

Callable[[ndarray], ndarray]

qscat.evolution.make_pade_stepper(H, dt, order=3)[source]

Build an order-order diagonal-Pade stepper for d/dt psi = -i H psi.

H must be square and sparse (complex; ECS complex-symmetric is fine, no Hermiticity assumed). The order denominators (I + i H dt / r_i) are each factored once with qscat.linalg.SparseLU; every returned stepper(psi) applies the product prod_i (I + iHdt/r_i)^{-1} (I - iHdt/r_i) in one pass. order=1 is exactly make_sparse_cn_stepper. The factors commute (all are rational functions of H), so their application order is immaterial.

Default order 3: order 1 (Crank-Nicolson) is documented above to under-converge long propagations; pass order=1 (or use make_sparse_cn_stepper) to get CN explicitly.

Parameters:
Return type:

Callable[[NDArray[complexfloating[Any, Any]]], NDArray[complex128]]

qscat.evolution.make_sparse_cn_stepper(H, dt)[source]

Sparse Crank-Nicolson stepper – the sparse sibling of make_cn_stepper.

Same Cayley form (I + i H dt/2) psi_{n+1} = (I - i H dt/2) psi_n, but A = I + i H dt/2 is factored once with qscat.linalg.SparseLU and each step is a single sparse back-substitution. For the ~1e4-1e5-dimension sparse Hamiltonians this targets, dense factorization is infeasible; the dense make_cn_stepper is retained as this function’s differential oracle.

H must be square and sparse. Complex symmetric (ECS) H is fine – no Hermiticity is assumed.

Parameters:
  • H (spmatrix)

  • dt (float)

Return type:

Callable[[NDArray[complexfloating[Any, Any]]], NDArray[complex128]]

qscat.evolution.pade_roots(order)[source]

The order diagonal-Pade denominator roots of exp(z) (see module docstring).

order=1 is Crank-Nicolson (single real root 2). Raises ValueError for an order not in the table (1-4).

Parameters:

order (int)

Return type:

NDArray[complex128]