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, possibly time-dependent. The state psi
is given as MPS or MPO.
A high-level function organizing TDVP simulations is yastn.tn.mps.tdvp_()
. For examples, see TDVP.
The TDVP splits the exponentiation into local operation on 1 or 2 tensors 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, 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) – ‘1j’ for real time evolution, 1 for imaginary time evolution. Default is 1j.
method (str) – Algorithm to use in (‘1site’, ‘2site’, ’12site’)
order (str) – Order of Suzuki-Trotter decomposition in (‘2nd’, ‘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'
.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)