StateEnvsTTN
: A container to store the TTN and its environments
Similar to the setup for MPS, tt the lowest-level of abstraction, TenNetLib.jl defines StateEnvs
to hold a TTN and its environments to be modified in place.
Skip this part if you want to avoid lower-level abstraction.
TenNetLib.StateEnvsTTN
— Typemutable struct StateEnvsTTN{T1, T2 <: Union{EnvCouplingModelTTN,
EnvCouplingModelProjTTN}}
psi::TTN{T1}
env::T{T2}
end
Holds the TTN and the environment.
TenNetLib.StateEnvsTTN
— Methodfunction StateEnvsTTN(psi::TTN, H::CouplingModel)
Constructor of the StateEnvsTTN
from a CouplingModel
. Each terms in the CouplingModel
are contracted in parallel.
TenNetLib.StateEnvsTTN
— Methodfunction StateEnvsTTN(psi::TTN, H::CouplingModel, Ms::Vector{TTN}; weight::Float64)
Constructor of StateEnvsTTN from a CouplingModel
and a vector of TTN used for excited state search. Each terms in the CouplingModel
are contracted in parallel.
TenNetLib.getpsi
— Methodfunction getpsi(sysenv::StateEnvsTTN)
Returns (shallow copy of) the state psi
.
TenNetLib.getenv
— Methodfunction getenv(sysenv::StateEnvsTTN)
Returns (shallow copy of) the environment env
.
ITensors.position!
— Methodfunction position!(sysenv::StateEnvsTTN, node::Int2;
maxdim::Int = typemax(Int),
mindim::Int = 1,
cutoff::Float64 = Float64_threshold(),
svd_alg::String = "divide_and_conquer",
normalize::Bool = true)
Moves the orthogonality center of the TTN to node
and updates the effective Hamiltonian of the same.
Named arguments and their default values:
normalize::Bool = true
: Whether to normalize afterwards.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"
.
TenNetLib.product
— Methodfunction product(sysenv::StateEnvsTTN, v::ITensor)
Returns the Matrix-Vector
product between the environment and input ITensor v
.
Base.copy
— Methodfunction Base.copy(sysenv::StateEnvsTTN)
Shallow copy of StateEnvsTTN
.