Skip to content

About

A Julia package for arrays with graded spaces

Resources

Stars

1 star

Watchers

2 watching

Forks

Repository files navigation

GradedArrays.jl

Stable Dev Build Status Coverage Code Style Aqua

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.

Support

Flatiron Center for Computational Quantum Physics logo.

GradedArrays.jl is supported by the Flatiron Institute, a division of the Simons Foundation.

Installation instructions

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")

Examples

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 * a
b = randn(g, dual(g))
a + b
permutedims(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.

About

A Julia package for arrays with graded spaces

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages