seemps.evolution.euler#

seemps.evolution.euler(L: MPO, time: float | tuple[float | int | floating | integer, float | int | floating | integer] | Sequence[float | int | floating | integer] | NDArray, state: MPS, steps: int = 1000, strategy: Strategy = DEFAULT_STRATEGY, callback: Callable[[float, MPS], Any] | None = None)[source]#

Solve d|state>/dt = L|state> using the Euler method.

Integrates a linear ODE using the update

\[\psi(t_{n+1}) = \psi(t_{n}) + \delta t L \psi(t_{n}).\]

The time denotes the integration interval.

  • If it is a single number T, the initial condition is \(t=0\) and the evolution proceeds in steps of \(\delta{t}=T/N\) where N=steps.

  • If time is a tuple, it contains the initial and final time, and the number of integration steps is deduced from N=steps as \(\delta{t}=T/N\)

  • If time is a sequence of numbers, starting with the initial condition, and progressing in time steps time[n+1]-time[n].

The Euler algorithm is a very bad integrator and is offered only for illustrative purposes.

Parameters:
LMPO

Linear operator in MPO form.

timeReal | tuple[Real, Real] | Sequence[Real]

Integration interval, or sequence of time steps.

stateMPS

Initial guess of the ground state.

stepsint, default = 1000

Integration steps, if not defined by t_span.

strategyStrategy, default = DEFAULT_STRATEGY

Truncation strategy for MPO and MPS algebra.

callbackCallable[[float, MPS], Any] | None

A callable called after each iteration (defaults to None).

Returns:
resultMPS | list[Any]

Final state after evolution or values collected by callback