Reference

GradedArrays.AbelianBlocksType
AbelianBlocks{T,N,A<:AbelianGradedArray{T,N}} <: AbstractArray{AbelianSectorArray,N}

Lazy view of an AbelianGradedArray's block storage, following the BlockArrays convention: getindex delegates to view(parent, Block.(I)...) (shares data), setindex! copies into the existing view.

source
GradedArrays.AbelianGradedArrayType
AbelianGradedArray{T,N,D<:AbstractArray{T,N},S<:SectorRange} <: AbstractGradedArray{T,N}

A graded array that stores non-zero blocks in a dictionary keyed by block indices. Each axis is a GradedOneTo carrying sectors, sector lengths, and a dual flag.

Blocks are stored as plain dense arrays of type D (default Array{T,N}). Accessing a block via a[Block(i,j)] returns a AbelianSectorArray wrapping the data with the appropriate sectors.

source
GradedArrays.AbelianSectorArrayType
AbelianSectorArray{T,N,A,S} <: AbstractSectorArray{T, N}

Unfused N-D data tensor for abelian symmetries. Stores one SectorRange per axis, plus a dense data array. Implements the Wigner-Eckart decomposition: the full tensor is the Kronecker product of an AbelianSectorDelta (structural) with the data array (reduced matrix elements).

source
GradedArrays.AbelianSectorDeltaType
AbelianSectorDelta{T,N,S<:SectorRange} <: AbstractSectorDelta{T, N}

Unfused N-D structural tensor for abelian symmetries. Stores one SectorRange per axis. For abelian symmetries, every element equals one(T) (the Kronecker delta selection rule).

source
GradedArrays.AbstractSectorDeltaType
AbstractSectorDelta{T,N} <: AbstractArray{T,N}

Abstract supertype for structural (Kronecker/identity) tensors associated to sector labels. Concrete subtypes:

  • AbelianSectorDelta: unfused N-D abelian structural tensor (product of Kronecker deltas)
  • SectorIdentity: fused 2D structural factor (identity matrix per coupled sector)
source
GradedArrays.DataType
Data{N}

Block-data indexing type analogous to BlockArrays.Block{N}. Indexing a graded array with Data(i, j, ...) accesses the raw data array for that block, without sector metadata wrappers.

source
GradedArrays.FusedGradedMatrixType
FusedGradedMatrix{T,D<:AbstractMatrix{T},S<:SectorRange}

Block-diagonal matrix produced by matricizing an AbstractGradedArray. Each stored block corresponds to a coupled sector that lives on both the codomain and the domain.

Fields:

  • codomain::Dictionary{S,Int} — codomain (row) axis, mapping each sector to its row-block size. Keys are sorted and unique. Sectors are stored non-dual (codomain convention).
  • domain::Dictionary{S,Int} — domain (column) axis, mapping each sector to its column-block size. Keys are sorted and unique. Stored non-dual; the actual axis is dual (the keys are dualed by axes(m, 2)).
  • blocks::Dictionary{S,D} — stored data blocks, keyed by sector. Each key must be in both codomain and domain, and size(blocks[s]) must equal (codomain[s], domain[s]).
source
GradedArrays.FusedGradedMatrixMethod
FusedGradedMatrix(sectors::Vector{S}, blocks::Vector{D})

Build a FusedGradedMatrix whose codomain and domain carry the same sector list. codomain[sectors[i]] is size(blocks[i], 1) and domain[sectors[i]] is size(blocks[i], 2).

source
GradedArrays.FusedGradedMatrixMethod
FusedGradedMatrix(a::AbelianGradedMatrix{T})

Convert a 2D block-sparse AbelianGradedArray (as produced by matricize) into a FusedGradedMatrix. The codomain dict comes from the row axis sectors and lengths; the domain dict comes from dual.(domain_axis_sectors) and lengths. Stored entries of a populate blocks.

source
GradedArrays.FusedGradedVectorType
FusedGradedVector{T,D<:AbstractVector{T},S<:SectorRange}

Block-structured 1-D graded array produced by a sector-preserving operation on a FusedGradedMatrix (e.g. svd_vals, eig_vals, eigh_vals).

Fields:

  • axis::Dictionary{S,Int} — axis layout, mapping each sector to its block size. Keys are sorted and unique. Stored non-dual (codomain convention).
  • blocks::Dictionary{S,D} — stored data blocks, keyed by sector. Keys are a subset of keys(axis) and length(blocks[s]) == axis[s].
source
GradedArrays.FusedGradedVectorMethod
FusedGradedVector(sectors::Vector{S}, blocks::Vector{D})

Build a FusedGradedVector whose axis and blocks carry the same sector list. axis[sectors[i]] is length(blocks[i]).

source
GradedArrays.GradedOneToType
GradedOneTo{S<:SectorRange}

Represents a graded axis — a collection of sectors with sector lengths and a dual flag. This is the axis type for AbelianGradedArray.

Stores non-dual SectorRange values in nondual_sectors, sector lengths, and a single isdual flag. The sectors accessor applies the isdual flag on the fly.

source
GradedArrays.SectorIdentityType
SectorIdentity{T,S<:SectorRange} <: AbstractSectorDelta{T, 2}

Fused 2D structural factor for a single coupled sector. By Schur's lemma, the structural part of each block in the fused (matricized) basis is the identity matrix for the irrep. Carries no free data — completely determined by the sector. The codomain axis is non-dual, the domain axis is dual.

source
GradedArrays.SectorMatrixType
SectorMatrix{T,D<:AbstractMatrix{T},S<:SectorRange} <: AbstractSectorArray{T, 2}

Fused 2D data matrix for a single coupled sector. One block of a FusedGradedMatrix. In the representation-theoretic sense, this is an element of HomG(Vc, W_c) for coupled sector c — the reduced matrix element (degeneracy/multiplicity tensor) after Schur's lemma has factored out the structural part (SectorIdentity).

The codomain (row) axis is non-dual; the domain (column) axis is dual. The stored SectorRange is always non-dual (codomain convention).

source
GradedArrays.SectorOneToType
SectorOneTo{S<:SectorRange}

Represents one sector's index space — a SectorRange (sector label + dual flag) paired with a data length (multiplicity). This is the building block for GradedOneTo.

Stores a SectorRange and a data length. The isdual accessor is derived from the stored SectorRange.

source
GradedArrays.SectorRangeType
SectorRange(sector::TKS.Sector, isdual::Bool)

Unit range with elements of type Int that additionally stores a sector to denote the grading. Equivalent to Base.OneTo(length(sector)). Additionally holds a flag to denote the duality.

source
GradedArrays.SectorVectorType
SectorVector{T, D<:AbstractVector{T}, S<:SectorRange} <: AbstractSectorArray{T, 1}

A single sector with a data vector. Analogous to SectorMatrix but for 1-D data (eigenvalues, singular values, etc.). Each element is a symmetry scalar — there is no Wigner-Eckart structural factor; the sector label simply identifies which block the values belong to.

The stored SectorRange is always non-dual (codomain convention).

source
Base.zerosMethod
zeros(T, axs::GradedOneTo...)

Create an AbelianGradedArray{T} with all allowed (zero-flux) blocks filled with zeros.

source
GradedArrays.contraction_twist!Method
contraction_twist!(a::AbelianSectorArray, ndims_codomain::Int) -> a

Apply the twist convention for the supertrace formalism of fermionic contractions. This means that $⟨i| ⋅ |j⟩ = δᵢⱼ$, and $|i⟩ ⋅ ⟨j| = θᵢⱼ δᵢⱼ$. Here, $θᵢⱼ = ±1$ is defined as the phase from applying a self-crossing, which is always $1$ for bosonic symmetries, but can be $-1$ for odd fermion charges.

Equivalent to twist!(a, (i for i in 1:ndims_codomain if isdual(a, i))). A no-op unless BraidingStyle(sectortype(a)) is Fermionic.

See also twist!.

source
GradedArrays.dataMethod
data(sa::AbstractSectorArray)

Return the raw data array underlying the sector array.

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

Generic fallback that converts sector keys via to_sector before constructing GradedOneTo. This supports NamedTuple keys (for sector products) and other non-standard key types.

source
GradedArrays.gradedrangeMethod
gradedrange(xs::AbstractVector{<:Pair{<:SectorRange, <:Integer}})

Construct a GradedOneTo from pairs of SectorRange to multiplicities. All SectorRange values must have the same isdual flag. Non-dual inputs produce a non-dual axis; dual inputs produce a dual axis.

Examples

gradedrange([U1(0) => 2, U1(1) => 3])     # non-dual
gradedrange([U1(0)' => 2, U1(1)' => 3])   # dual
source
GradedArrays.twist!Method
twist!(a::AbstractGradedArray, dims) -> a

Scale data(a) in place by prod(twist(sectoraxes(a, i)) for i in dims). Here, twist is defined as -1 for odd-parity fermionic charges and +1 otherwise.

This is a no-op unless BraidingStyle(sectortype(a)) is Fermionic.

See also contraction_twist!.

source