CouplingModel

TenNetLib.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.

TenNetLib.CouplingModelType
struct 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}}: Site Indexs.
  • terms::Vector{IDTensors}: Collection of Hamiltonian terms.
source
TenNetLib.CouplingModelMethod
function CouplingModel(os::OpStrings{T1},
                       sites::Vector{Index{T2}};
                       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, T2}

Constructor of the CouplingModel from os::OpStrings and sites::Vector{Index}.

Named arguments and their default values:

  • merge::Bool = true. If true, 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.

Example:

os = OpStrings()    
for j=1:N-1
    os += 1, "Sz" => j, "Sz" => j+1
    os += 0.5, "S+" => j, "S-" => j+1
    os += 0.5, "S-" => j, "S+" => j+1
end    
H = CouplingModel(os,sites)
source
TenNetLib.CouplingModelMethod
function CouplingModel(os::OpStrings{T1},
                       mpo::MPO;
                       merge::Bool = true,
                       maxdim::Int = typemax(Int),
                       mindim::Int = 1,
                       cutoff::Float64 = Float64_threshold(),
                       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. If true, 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.
source
TenNetLib.CouplingModelMethod
function CouplingModel(mpos::MPO...)

Constructs CouplingModel from a collection of MPOs. Different MPO terms are contracted in parallel. Useful for TTN codes.

source
Base.lengthMethod
function Base.length(model::CouplingModel)

Number of sites in the system.

source
Base.copyMethod
function Base.copy(model::CouplingModel)

Shallow copy of CouplingModel.

source
Base.getindexMethod
function Base.getindex(model::CouplingModel, n)

Returns Hamiltonian terms for nth site(s) in the CouplingModel.

source
ITensors.siteindsMethod
function ITensors.siteinds(model::CouplingModel)

Returns the site Indexs of the CouplingModel.

source