Algorithms
Ground state computation
Using DMRG, we can compute ground states for States and Simulations
ITensorMPS.dmrg
— Functiondmrg(hamiltonian, ::State; options...)
dmrg(hamiltonian, ::Simulation; options...)
optimize for ground state of the given Hamiltonian starting with state / simulation using dmrg.
Note that Dmrg does not work for mixed representations.
Options
nsweeps
: number of sweepsobserver!
: observer (seeDmrgObserver
)limits
: constraints on the mps (cutoff
and `maxdim may be vectors with different values for each sweep)- others identical to ITensorMPS.dmrg
TensorMixedStates.DmrgObserver
— Typestruct DmrgObserver
DmrgObserver(sim, measurements, period, tol)
an observer for dmrg which makes and outputs measurements every period steps and stops it when energy improvements are smaller than tol
Time evolution
Using TDVP or ApproxW, we can do time evolution (Hamiltonian or Lindbladian)
ITensorMPS.tdvp
— Functiontdvp(evolver, t, ::State; options...)
tdvp(evolver, t, ::Simulation; options...)
do time evolution with tdvp algorithm on a state / sim for the given time t. Also see TdvpObserver
Options
nsweeps
: number sweeps to do (time step = t / nsweeps)coefs
: coefficients for time dependent evolvern_expand
: do expansion steps every n_expand steps (default 0 means no expansion)n_hermitianize
: make hermitian (for mixed states) every n_hermitianize steps (default 0 for no corrections)- others are identical to ITensorMPS.tdvp
TensorMixedStates.approx_W
— Functionapprox_W(evolver, t, ::State; options...)
approx_W(evolver, t, ::Simulation; options...)
time evolution using approximation WI or WII at a given order. Also see ApproxWObserver
Options
coefs
: coefficients for time dependent evolutionn_hermitianize
: make hermitian (for mixed states) every n_hermitianize steps (default 0 for no corrections)nsweeps
: number of steps (time step is t / nsweeps)order
: order of approximationw
: 1 or 2 for WI or WIIobserver!
: observer (see ApproxWObserver)time_start
: the simulation time at the beginning of evolutionlimits
: MPS constraints
TensorMixedStates.TdvpObserver
— Typestruct TdvpObserver
TdvpObserver(sim, measurements, period)
an observer for tdvp which make measurements every period steps
TensorMixedStates.ApproxWObserver
— Typestruct ApproxWObserver
ApproxWObserver(sim, measurements, period)
an observer for approx_W which make measurements every period steps
Gate application
ITensors.apply
— Functionapply(op, ::State; limits::Limits)
apply(mps, ::State; limits::Limits)
apply(op, ::Simulation; limits::Limits)
Apply the given gates to the state and truncate the result according to limits. It is much more efficient to apply all the gates in a single call to apply.
Examples
apply(CZ(1,3)*H(2)*CNOT(3,4), state)