Time-dependent variational principle (TDVP)#
TDVP algorithm is suitable to perform exponentiation of some operator \(\hat H\) acting on a state \(\Psi(t_0)\),
producing \(\Psi(t)=T e^{-u\int^{t_1}_{t_0} \hat H(w) dw} \Psi(t_0)\), with \(T\) indicating time ordering.
The algorithm allows to use MPO operator H
, which can be either hermitian or non-hermitian, and possibly time-dependent.
The state psi
is given as MPS or MPO.
A high-level function organizing TDVP simulations is yastn.tn.mps.tdvp_()
.
See examples at Sudden quench in a free-fermionic model and
Quench across a quantum critical point in a transverse Ising chain.
The TDVP splits the exponentiation into local operation acting on 1 or 2 sites depending on method='1site'
or '2site'
similar to
DMRG, following Suzuki-Trotter decomposition of given order
.
The '2site'
, although more expensive, is one of the ways to dynamically expand the MPS virtual dimensions, controlled by opts_svd
.
We also provide method='12site'
that performs 2-site operations only for bonds that have the potential to be expanded, based on their bond dimension and Schmidt spectrum.
- yastn.tn.mps.tdvp_(psi, H, times=(0, 0.1), dt=0.1, u=1j, method='1site', order='2nd', opts_expmv=None, opts_svd=None, normalize=True, subtract_E=False, precompute=False, progressbar=False, yield_initial=False)[source]#
Iterator performing TDVP sweeps to solve \(\frac{d}{dt} |\psi(t)\rangle = -uH|\psi(t)\rangle\),
- Parameters:
psi (Mps) – Initial state. It is updated during execution. It is first canonized to the first site, if not provided in such a form. Resulting state is also canonized to the first site.
H (yastn.tn.mps.MpsMpoOBC | Sequence | Callable) – Evolution generator given either as (sum of) MPO for time-independent problem or as a function returning (sum of) MPO for time-dependent problem, i.e.
Callable[[float], Mpo]
orCallable[[float], Sequence[Mpo]]
, seeEnv()
.time (float64 or tuple(float64)) – Initial and final times; can also provide intermediate times for snapshots returned by the iterator. If only the final time is provided, initial time is set to 0.
dt (double) – Time step. It is adjusted down to have an integer number of time-steps to reach the next snapshot.
u (number) – for real time evolution
u=1j
, for imaginary time evolutionu=1
. The default is 1j.method (str) – Algorithm to use among ‘1site’, ‘2site’, ’12site’.
order (str) – Order of Suzuki-Trotter decomposition, ‘2nd’ or ‘4th’. 4th order step is composed of five 2nd order steps.
opts_expmv (dict) – Options passed to
yastn.expmv()
, in particular whether H is hermitian. Unspecified options use defaultyastn.expmv()
settings. If there is information from previous time-steps stored under the hood, the initial guess of the size of krylov space opts_expmv[‘ncv’] is overriden.opts_svd (dict) – Options passed to
yastn.linalg.svd()
used to truncate virtual spaces inmethod='2site'
and'12site'
.normalize (bool) – Whether to normalize the result to unity using 2-norm. If
False
, keeps track of the norm. The default isTrue
.subtract_E (bool) – Whether to subtract the instantaneous energy from the Hamiltonian while performing local updates. The default is
False
.precompute (bool) – Controls MPS-MPO-MPS contraction order. If
False
, use an approach optimal for a single matrix-vector product calculation during iterative Krylov-space building, scaling as O(D^3 M d + D^2 M^2 d^2). IfTrue
, uses less optimal contraction order, scaling as O(D^3 M d^2 + D^2 M^2 d^2). However, the latter allows precomputing and reusing part of the diagram during consecutive iterations. Which one is more efficient depends on the parameters. The default isFalse
.progressbar (bool) – Whether to show the progress bar toward the next snapshot. The default is
False
.yield_initial (bool) – Whether to yield the initial state before performing evolution. The default is
False
.
- Returns:
NamedTuple with fields:
ti
initial time of the time-interval.tf
current time.time_independent
whether the Hamiltonian is time-independent.dt
time-step used.steps
number of time-steps in the last time-interval.
- Return type:
TDVP_out(NamedTuple)