Miscellaneous typedefs and functions
TenNetLib.Vector2
— Typeconst Vector2{T} = Vector{Vector{T}}
Vector
of Vector
s.
TenNetLib.IDType
— Typeconst IDType = ITensors.IDType
Type of randomly generated id. It is usually UInt64
.
TenNetLib.IDTensors
— Typeconst IDTensors = Dict{IDType, ITensor}
Dictionary of key
= randomly generated id and value
= ITensor
objects.
TenNetLib.gen_rand_id
— Functionfunction gen_rand_id()
Generates a random id.
TenNetLib.combineinds
— Methodfunction combineinds(inds::Vector{Index};
maxdim::Union{Nothing, Int} = nothing,
maxqnblocks::Union{Nothing, Int} = nothing,
kwargs...)
Combine a vector of Index
into one (like ITensors.jl's combiner
). maxdim
is be the maximum dimension of the output Index
, maxqnblocks
represents maximum number of QN blocks to retain in the output Index
.
TenNetLib.indexintersection
— Methodfunction indexintersection(inds1::Vector{Index}, inds2::Vector{Index};
maxdim::Union{Nothing, Int} = nothing,
maxqnblocks::Union{Nothing, Int} = nothing,
kwargs...)
Performs set intersection of two vectors of Index
. maxdim
is be the maximum dimension of the output Index
, maxqnblocks
represents maximum number of QN blocks to retain in the output Index
.