Symmetry sectors
A sector is an irreducible label of a symmetry, such as a U(1) charge or an SU(2) spin. length of a sector is its dimension.
using GradedArrays: SU2, U1
length(U1(1)), length(SU2(1//2))(1, 2)Sectors grade a space. For more information on graded spaces and arrays, see Graded arrays.
Available sectors
| Sector | Symmetry | Example |
|---|---|---|
Trivial | none | Trivial() |
Z, Z2 | cyclic group of order N | Z{3}(1), Z2(1) |
U1 | U(1) | U1(-1) |
SU2 | SU(2) | SU2(1//2) |
SU | SU(N) | SU{3}(1, 1) |
CU1 | U(1) ⋊ C, also called O(2) | CU1(1) |
fZ2 | fermion parity | fZ2(true) |
fU1 | fermion number | fU1(1) |
fSU2 | fermion spin | fSU2(1//2) |
The fermionic sectors take only a charge, and the parity follows from it.
using GradedArrays: fSU2, fU1, fZ2
fU1(1), fSU2(1//2), fZ2(true)(fU1(1), fSU2(1/2), fZ2(1))GradedArrays.Sector — Type
SectorAn 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.
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.
GradedArrays.Z — Type
Z{N}(n::Integer)An irreducible representation of the cyclic group of order N.
GradedArrays.Z2 — Type
const Z2 = Z{2}The irreducible representations of the cyclic group of order two, labelled 0 and 1.
GradedArrays.U1 — Type
U1(charge::Real)An irreducible representation of U(1), labelled by its charge.
GradedArrays.SU2 — Type
SU2(j::Real)An irreducible representation of SU(2), labelled by its spin.
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.
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.
GradedArrays.fZ2 — Type
fZ2(isodd::Bool)Fermion parity, the fermionic analog of Z2.
GradedArrays.fU1 — Type
const fU1 = U1 × fZ2
fU1(n::Integer) -> fU1Fermion 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.
GradedArrays.fSU2 — Type
const fSU2 = SU2 × fZ2
fSU2(j::Real) -> fSU2Fermion 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.
Products of sectors
sectorproduct creates products of symmetry sectors, which can also be written as ×. Trivial is its unit and drops out of any product.
using GradedArrays: SU2, Sector, U1, sectorproduct, ×
sectorproduct(U1(1), SU2(1//2))(U1(1) × SU2(1/2))U1(1) × SU2(1//2)(U1(1) × SU2(1/2))sectorproduct/× also works on types, for example fU1 is an alias for U1 × fZ2.
using GradedArrays: fZ2
U1 × fZ2fU1 (alias for GradedArrays.TupleSectorProduct{Tuple{U1, fZ2}})Sector gives another way to make the same product.
Sector(U1(1), SU2(1//2)) == U1(1) × SU2(1//2)trueYou can also name the factors of a product instead of ordering them.
Sector(; charge = U1(1), spin = SU2(1//2))(charge = U1(1), spin = SU2(1/2))Sector is used to convert to sector types in functions such as gradedrange:
using GradedArrays: gradedrange
gradedrange([
(charge = U1(0), spin = SU2(0)) => 1, (charge = U1(1), spin = SU2(1//2)) => 2,
])5-element GradedOneTo{(; charge = U1) × (; spin = SU2), …} with indices gradedrange([(charge = U1(0), spin = SU2(0)) => 1, (charge = U1(1), spin = SU2(1/2)) => 2]):
sectors: [(charge = U1(0), spin = SU2(0)), (charge = U1(1), spin = SU2(1/2))]
1
2
3
4
5GradedArrays.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.
TensorKitSectors compatibility
Every sector here has a counterpart in TensorKitSectors.jl. Sector converts a TensorKitSectors sector, and TensorKitSectors.Sector converts one back.
using GradedArrays: Sector
using TensorKitSectors: TensorKitSectors, SU2Irrep
Sector(SU2Irrep(1//2)), TensorKitSectors.Sector(SU2(1//2))(SU2(1/2), Irrep[SU₂](1/2))Fusion rules and other sector data come from TensorKitSectors through that conversion.
SU is the exception. Its sector data comes from SUNRepresentations.jl through a package extension. A graded space over SU sectors needs that package loaded.