Performing TDVP

TDVPEngine

TenNetLib.jl defines a struct, called TDVPEngine, to store essential data during TDVP sweeps.

TenNetLib.TDVPEngineType
mutable struct TDVPEngine{T <: Union{ProjMPO,
                                     ProjMPOSum2,
                                     ProjMPO_MPS2,
                                     ProjMPOSum_MPS,
                                     ProjCouplingModel,
                                     ProjCouplingModel_MPS}}

Holds the MPS state, SweepData, and absolute elpased time for TDVP simulations.

  • sysenv::StateEnvs: Holds the state psi and environments PH.
  • swdata::SweepData: Holds the historical data after each (full)sweep.
  • abstime::Float64: Absolute elapsed time.
source
TenNetLib.TDVPEngineMethod
function TDVPEngine(psi::MPS, H::{T}) where T <: Union{MPO, Vector{MPO}, CouplingModel}

Constructor of the TDVPEngine from different forms of Hamiltonians.

source
TenNetLib.TDVPEngineMethod
function TDVPEngine(psi::MPS, H::T, Ms::Vector{MPS};
                    weight::Float64) where T <: Union{MPO, Vector{MPO}, CouplingModel}

Constructor of TDVPEngine from different forms of Hamiltonians and a vector of MPS.

source
TenNetLib.maxchiMethod
function maxchi(engine::TDVPEngine)

Returns the maximum bond/link dimension of the state psi.

source
TenNetLib.totalerrorMethod
function totalerror(engine::TDVPEngine)

Returns the sum of the truncation errors of all the sweeps performed.

source
TenNetLib.krylov_extend!Method
function krylov_extend!(engine::TDVPEngine{ProjMPO}; kwargs...)

Performs Global Subspace Expansion.

Arguments and their default values:

  • extension_krylovdim::Int = 3: Number of Krylov vectors used for GSE.
  • extension_applyH_cutoff::Float64 = Float64_threshold(): Cutoff for the application the MPO to the MPS.
  • extension_applyH_maxdim::Int = maxlinkdim(psi) + 1: Maximum bond/link dimension of the resulting MPS after the application of the MPO to the MPS.
  • extension_cutoff::Float64 = 1E-10: Cutoff for the basis extension step in GSE.
source
TenNetLib.updateH!Method
function updateH!(engine::TDVPEngine, H::T;
                  recalcEnv::Bool = true) where T <: Union{MPO, Vector{MPO}, CouplingModel}

Update Hamiltonian H in engine::TDVPEngine. If recalcEnv = false, it reuses previous environments. recalcEnv = false is only defined when the TDVPEngine is created from a single MPO.

source
TenNetLib.updateH!Method
function updateH!(engine::TDVPEngine, H::T, Ms::Vector{MPS};
                  weight::Float64,
                  recalcEnv::Bool = true) where T <: Union{MPO, Vector{MPO}, CouplingModel}

Update Hamiltonian H in engine::TDVPEngine. recalcEnv = false is not supported.

source
Base.copyMethod
Base.copy(engine::TDVPEngine)

Shallow copy of TDVPEngine.

source

tdvpsweep!

Following function performs one TDVP sweep.

TenNetLib.tdvpsweep!Function
tdvpsweep!(engine::TDVPEngine, time_step::Union{Float64, ComplexF64}; 
           nsite::Union{Int, String} = "dynamic", 
           solver = exp_solver,
           kwargs...)::Nothing

Performs one TDVP sweep. Computes ψ' = exp(time_step * H) * ψ. Therefore, for real-time dynamics with step dt, time_step should be -im * dt.

Arguments:

  • engine::TDVPEngine.
  • time_step::Union{Float64, ComplexF64}.
  • nsite::Union{Int, String} = "dynamic": For two or one site sweeps, nsite=2 or nsite=1 respectively. For nsite="dynamic", dynamic_fullsweep! is performed.
  • solver = exp_solver: Only exp_solver is supported now.

Named arguments and their default values:

  • normalize::Bool = true: Whether to normalize after update.
  • maxdim::Int = typemax(Int): Maximum bond dimension after SVD truncation.
  • mindim::Int = 1: Minimum bond dimension after SVD truncation.
  • cutoff::Float64 = Float64_threshold(): Cutoff for SVD truncation.
  • svd_alg::String = "divide_and_conquer".
  • outputlevel::Int = 1. If 0 prints no information, for 1 outputs after every fullsweep, if 2 prints at every update step.
  • eigthreshold::Float64 = 1E-12. Only applicable for nsite = "dynamic" (see dynamic_fullsweep!).
  • extendat::Union{Nothing, Int} = nothing: If specified, at every extendatth sweep, Global Subspace Expansion is performed followed by a pure one-site sweep if typeof(sysenv) == StateEnvs{ProjMPO}, else performs a full two-site sweep. Only applicable for nsite = "dynamic" (see dynamic_fullsweep!).

Named arguments for solver and their default values:

See the documentation of KrylovKit.jl.

  • ishermitian::Bool = true.
  • solver_tol::Float64 = 1E-12.
  • solver_krylovdim::Int = 30.
  • solver_maxiter::Int = 100.
  • solver_outputlevel::Int = 0.: See verbosity in KrylovKit.jl.
  • solver_eager::Bool = true.
  • solver_check_convergence::Bool = true.

Arguments for Global Subspace Expansion and their default values:

Only applicable for nsite = "dynamic" (see dynamic_fullsweep!).

  • extension_krylovdim::Int = 3: Number of Krylov vectors used for GSE.
  • extension_applyH_cutoff::Float64 = Float64_threshold(): Cutoff for the application the MPO to the MPS.
  • extension_applyH_maxdim::Int = maxlinkdim(psi) + 1: Maximum bond/link dimension of the resulting MPS after the application of the MPO to the MPS.
  • extension_cutoff::Float64 = 1E-10: Cutoff for the basis extension step in GSE.
source