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:
- L
MPO Linear operator in MPO form.
- time
Real|tuple[Real,Real] |Sequence[Real] Integration interval, or sequence of time steps.
- state
MPS Initial guess of the ground state.
- steps
int,default= 1000 Integration steps, if not defined by t_span.
- strategy
Strategy,default=DEFAULT_STRATEGY Truncation strategy for MPO and MPS algebra.
- callback
Callable[[float,MPS],Any] |None A callable called after each iteration (defaults to None).
- L
- Returns:
- result
MPS|list[Any] Final state after evolution or values collected by callback
- result