Miscellaneous typedefs and functions

TenNetLib.IDTypeType
const IDType = ITensors.IDType

Type of randomly generated id. It is usually UInt64.

TenNetLib.IDTensorsType
const IDTensors = Dict{IDType, ITensor}

Dictionary of key = randomly generated id and value = ITensor objects.

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