Miscellaneous typedefs and functions
TenNetLib.Vector2 — Type
const Vector2{T} = Vector{Vector{T}}Vector of Vectors.
TenNetLib.IDType — Type
const IDType = ITensors.IDTypeType of randomly generated id. It is usually UInt64.
TenNetLib.IDTensors — Type
const IDTensors = Dict{IDType, ITensor}Dictionary of key = randomly generated id and value = ITensor objects.
TenNetLib.gen_rand_id — Function
function gen_rand_id()using Base: diffnames using Base: diffnames
Generates a random id.
TenNetLib.combineinds — Method
function 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 — Method
function 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.