CouplingModel
TeNLib.jl degines as struct, called the CouplingModel
, to store the Hamiltonian terms. In case of MPS based algorithms, CouplingModel
can replace MPO
without modifying rest of the code. For Tree Tensor Network (TTN) codes, only CouplingModel
can be used. Different elements of CouplingModel
are contracted in parallel.
TeNLib.CouplingModel
— Typestruct CouplingModel{T}
sites::Vector{Index{T}}
terms::Vector{IDTensors}
-end
CouplingModel
for a given OpStrings
Hamiltonian terms and sites::Vector{Index}
.
sites::Vector{Index{T}}
: SiteIndex
s.terms::Vector{IDTensors}
: Collection of Hamiltonian terms.
TeNLib.CouplingModel
— Methodfunction CouplingModel(os::OpStrings{T1},
+end
CouplingModel
for a given OpStrings
Hamiltonian terms and sites::Vector{Index}
.
sites::Vector{Index{T}}
: SiteIndex
s.terms::Vector{IDTensors}
: Collection of Hamiltonian terms.
TeNLib.CouplingModel
— Methodfunction CouplingModel(os::OpStrings{T1},
sites::Vector{Index{T2}};
merge::Bool = true,
maxdim::Int = typemax(Int),
@@ -15,11 +15,11 @@
os += 0.5, "S+" => j, "S-" => j+1
os += 0.5, "S-" => j, "S+" => j+1
end
-H = CouplingModel(os,sites)
TeNLib.CouplingModel
— Methodfunction CouplingModel(os::OpStrings{T1},
+H = CouplingModel(os,sites)
TeNLib.CouplingModel
— Methodfunction CouplingModel(os::OpStrings{T1},
mpo::MPO;
merge::Bool = true,
maxdim::Int = typemax(Int),
mindim::Int = 1,
cutoff::Float64 = Float64_threashold(),
svd_alg::String = "divide_and_conquer",
- chunksize::Int = 12) where {T1 <: Number}
Constructor of the CouplingModel
from os::OpStrings
and mpo::MPO
. Resultant CouplingModel
is the sum of os
and the mpo
.
Named arguments and their default values:
merge::Bool = true
. Iftrue
, merges all the terms having same spatial support resulting in larger virtual dimension. Otherwise, all the terms have virtual dimension one.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"
.chunksize::Int = 12
.
TeNLib.CouplingModel
— Methodfunction CouplingModel(mpos::MPO...)
Constructs CouplingModel
from a collection of MPO
s. Different MPO terms are contracted in parallel. Useful for TTN codes.
Base.length
— Methodfunction Base.length(model::CouplingModel)
Number of sites in the system.
Base.copy
— Methodfunction Base.copy(model::CouplingModel)
Shallow copy of CouplingModel
.
Base.getindex
— Methodfunction Base.getindex(model::CouplingModel, n)
Returns Hamiltonian terms for n
th site(s) in the CouplingModel
.
ITensors.siteinds
— Methodfunction ITensors.siteinds(model::CouplingModel)
Returns the site Index
s of the CouplingModel
.