Perform local updates
At the lowest-level of abstraction, TenNetLib.jl allows for updating the StateEnvs
for each sites/bonds manually.
Skip this part if you want to avoid lower-level abstraction.
TenNetLib.update_position!
— Methodupdate_position!(sysenv::StateEnvs, solver, pos::Int, nsite::Int, ortho::String; kwargs...)
Updates StateEnvs at position pos
by solver
.
Arguments:
sysenv::StateEnvs
solver
: Solver for update. Available ones:eig_solver
andexp_solver
.pos::Int
: Position of the bond (nsite=2
) or site (nsite=1
).nsite
of the environment. Either1
or2
for one-site or two-site update respectively.ortho::String
: Direction of the sweep. Either"left"
or"right"
.
Named arguments and their default values:
time_step::Union{Float64, ComplexF64, Nothing} = nothing
: Time step for TDVP.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"
.noise::Float64 = 0.0
.reverse_step::Bool = false
iftime_step = nothing
,true
otherwise.
Named arguments for solver
and their default values:
See the documentation of KrylovKit.jl.
ishermitian::Bool = true
.solver_tol::Float64 = 1E-14
ifeig_solver
,1E-12
ifexp_solver
.solver_krylovdim::Int = 5
ifeig_solver
,30
ifexp_solver
.solver_maxiter::Int = 2
ifeig_solver
,100
ifexp_solver
.solver_outputlevel::Int = 0
: Seeverbosity
in KrylovKit.jl.solver_eager::Bool = false
ifeig_solver
,true
ifexp_solver
.solver_check_convergence::Bool = false
ifeig_solver
,true
ifexp_solver
.
Return values:
::Float64
: Energy.::Float64
: Truncation Error.::Vector{Float64}
: SVD spectrum.