Internals

TensorKit.TensorMap — Method
TK.TensorMap(fa::GradedArray)

Convert a GradedArray to a TK.TensorMap, building the codomain/domain product spaces from the per-leg axes and copying each coupled-sector block.

source
Base.fill — Method
fill(v, axs...)
fill(v, (codomain...)[, (domain...)])
fill(v, flux, (codomain...)[, (domain...)])

Like zeros, but filling every symmetry-allowed block with v (the element type is taken from v).

source
Base.getindex — Method
getindex(a::AbstractArray, ax1, axs...)

Construct a GradedArray by projecting the dense data of a onto the symmetry-allowed blocks of the graded axes (ax1, axs...), which errors if a has weight outside the allowed blocks. a is reshaped to length.((ax1, axs...)) first, so a trailing size-1 bond can be supplied implicitly. Each axis carries its own arrow, so index with dual/conj axes to set duality.

source
Base.ones — Method
ones([T=Float64,] axs...)
ones([T=Float64,] (codomain...)[, (domain...)])
ones([T=Float64,] flux, (codomain...)[, (domain...)])

Like zeros, but filling every symmetry-allowed block with ones.

source
Base.zeros — Method
zeros([T=Float64,] axs...)
zeros([T=Float64,] (codomain...)[, (domain...)])
zeros([T=Float64,] flux, (codomain...)[, (domain...)])

Construct a GradedArray over the given graded axes with every symmetry-allowed (zero-flux) block allocated and filled with zeros. Each axis may be a graded range or a vector of sector => multiplicity pairs. Passing a (codomain, domain) split builds a tensor map, storing the domain axes dual; a leading flux sector appends a multiplicity-1 leg carrying it, so the physical axes fuse to that total charge.

source