Reference

GradedArrays.CU1 — Type
CU1(j::Real, s::Integer = ifelse(j > zero(j), 2, 0))

An irreducible representation of U(1) ⋊ C, also called O(2): the U(1) charge j together with the representation s of charge conjugation. For j > 0 the only value is s = 2, the two-dimensional representation. For j == 0 there are two, s = 0 and s = 1, the trivial and non-trivial representations of the conjugation.

source
GradedArrays.FusedGradedMatrix — Type
FusedGradedMatrix

The block-diagonal matrix a graded array matricizes to, as returned by matricize. Its two axes are the fused codomain and domain.

source
GradedArrays.GradedArray — Type
GradedArray

An array over graded axes, storing only the symmetry-allowed blocks. Its legs are split into a codomain and a domain group, so it can also be read as a map between spaces, and it is stored as a block-diagonal matrix over the coupled sectors, with the codomain legs fused to its rows and the domain legs to its columns.

source
GradedArrays.GradedArray — Method
GradedArray(t::TK.AbstractTensorMap)

Build a GradedArray from a TensorMap, taking the per-leg external axes from its codomain and domain spaces. This copies the data.

source
GradedArrays.SU — Type
SU{N}(a::Vararg{Int})

An irreducible representation of SU(N), labelled either by its N - 1 Dynkin labels or by its N-component highest weight: SU{3}(1, 1) and SU{3}(2, 1, 0) are both the adjoint.

Dimensions and fusion need SUNRepresentations.

See also SU2.

source
GradedArrays.Sector — Type
Sector

An irreducible label of a symmetry, and the range of the degrees of freedom that label spans, so length is the sector's dimension.

Sector(s::Sector)
Sector(c::TensorKitSectors.Sector)
Sector(s1, s2, srest...)
Sector(t::Tuple)
Sector(nt::NamedTuple)
Sector(; kws...)

Two or more sectors give the product over them, positional or named. Everything that takes a sector from a caller, gradedrange and the array constructors included, routes through here.

source
GradedArrays.TensorKitSector — Type
TensorKitSector(c::TensorKitSectors.Sector)

Wrap a TensorKitSectors sector and reinterpret it as a Sector. This is what supports the symmetries TensorKitSectors defines that have no GradedArrays sector of their own, such as the anyons.

source
GradedArrays.Trivial — Type
Trivial()

The sector of the trivial group, and so the sectortype of a space carrying no symmetry. It is the unit of sectorproduct.

It is not another symmetry's trivial sector: U1(0) is the zero-charge irrep of U(1), and a U1-graded space with a single zero-charge block is not an ungraded space.

source
GradedArrays.U1 — Type
U1(charge::Real)

An irreducible representation of U(1), labelled by its charge.

source
GradedArrays.Z — Type
Z{N}(n::Integer)

An irreducible representation of the cyclic group of order N.

source
GradedArrays.Z2 — Type
const Z2 = Z{2}

The irreducible representations of the cyclic group of order two, labelled 0 and 1.

See also Z and fZ2, which is the fermionic counterpart.

source
GradedArrays.fSU2 — Type
const fSU2 = SU2 × fZ2
fSU2(j::Real) -> fSU2

Fermion spin: an SU2 spin together with its parity, which is odd exactly when 2j is odd. The parity follows from the spin, so the constructor takes only the spin.

See also SU2, fZ2 and fU1.

source
GradedArrays.fU1 — Type
const fU1 = U1 × fZ2
fU1(n::Integer) -> fU1

Fermion number: a U1 charge together with its parity, which is odd exactly when the charge is odd. The parity follows from the charge, so the constructor takes only the charge.

See also U1, fZ2 and fSU2.

source
GradedArrays.gradedrange — Method
gradedrange(xs::AbstractVector{<:Pair})

Construct a non-dual graded range from sector => multiplicity pairs, keyed by anything Sector accepts, NamedTuple keys for sector products included. Wrap the result in dual for a dual axis.

Examples

gradedrange([U1(0) => 2, U1(1) => 3])          # non-dual
dual(gradedrange([U1(0) => 2, U1(1) => 3]))    # dual
source
GradedArrays.sectorproduct — Function
sectorproduct(ss...)
×(ss...)

The Cartesian product of the symmetries of ss. Each argument is normalized with Sector first, so anything that specifies a sector can be multiplied.

A positional product absorbs factors positionally and a named one absorbs them by name. Multiplying the two together is an error. Trivial is the unit and drops out of any product.

Sector types multiply too, which is how a fused symmetry gets a name of its own, as in const fU1 = U1 × fZ2. A NamedTuple of sector types names the factors, and a Tuple or NamedTuple is also how to spell a product of one of them: (; charge = U1) × (; parity = fZ2), ×((U1,)). An empty container carries no type to name a symmetry with, so ×(()) and ×((;)) stay the empty products' values.

source
GradedArrays.with_block_indexing — Function
with_block_indexing(f, allow = true)

Run f() with block indexing of graded arrays enabled (or, with allow = false, disabled) for its dynamic extent, e.g. with_block_indexing() do ... end or with_block_indexing(false) do ... end.

Warning

Block indexing is experimental and its output type may change.

Warning

Like scalar indexing, this is a convenience, not an efficient access pattern, and should be avoided in performance-critical code.

source
GradedArrays.with_scalar_indexing — Function
with_scalar_indexing(f, allow = true)

Run f() with scalar indexing of graded arrays enabled (or, with allow = false, disabled) for its dynamic extent, e.g. with_scalar_indexing() do ... end or with_scalar_indexing(false) do ... end.

Warning

Scalar indexing is a convenience for interactive use and correctness checks, not an efficient access pattern. It should be avoided in performance-critical code, which should operate on whole blocks or the reduced data instead.

source