A Julia package for arrays with graded (blocked) spaces, such as those invariant under group actions. Built on top of, and compatible with, TensorKit.jl.
GradedArrays.jl is supported by the Flatiron Institute, a division of the Simons Foundation.
This package resides in the ITensor/ITensorRegistry local registry.
In order to install, simply add that registry through your package manager.
This step is only required once.
julia> using Pkg: Pkg
julia> Pkg.Registry.add(url="https://github.com/ITensor/ITensorRegistry")or:
julia> Pkg.Registry.add(url="git@github.com:ITensor/ITensorRegistry.git")if you want to use SSH credentials, which can make it so you don't have to enter your Github ursername and password when registering packages.
Then, the package can be added as usual through the package manager:
julia> Pkg.add("GradedArrays")A GradedArray is an array over spaces graded by symmetry sectors, and it stores only the
blocks the symmetry allows. Build the spaces from sector => multiplicity pairs and pass
them to the standard Julia array constructors.
using GradedArrays: U1, dual, gradedrange
g = gradedrange([U1(0) => 1, U1(1) => 2])
a = randn(g, dual(g))dual gives the dual of a space. zeros, ones, and fill work the same way, and allocate
only the allowed blocks.
zeros(g, dual(g))A GradedArray supports many basic array operations, such as multiplication by a scalar,
addition, and permutation of the dimensions.
2 * ab = randn(g, dual(g))
a + bpermutedims(a, (2, 1))For the symmetries that are available, see Symmetry sectors. For more information on graded spaces and arrays, see Graded arrays.
This page was generated using Literate.jl.