Quantum numbers

Quantum numbers can be considered as the conserved labels for the bases of a Hilbert space when a quantum system hosts some symmetries. Here we only implement Abelian quantum numbers because non-Abelian ones are far more complicated yet much less used.

AbelianQuantumNumber

RepresentationSpace

Manual

QuantumLattices.QuantumNumbers.AbelianGradedSpaceType
AbelianGradedSpace(quantumnumbers::AbstractVector{<:AbelianQuantumNumber}, dimensions::AbstractVector{<:Integer}, dual::Bool=false; ordercheck::Bool=false, duplicatecheck::Bool=false, degeneracycheck::Bool=false)

Construct an Abelian graded space.

Here:

  • quantumnumbers specifies the Abelian quantum numbers labeling the irreducible representations of the corresponding Abelian group which must be sorted in the ascending order. Such an ordering should be manually guaranteed by the user. When and only when the keyword argument ordercheck is true, the constructor will check whether this condition is satisfied and raise an error if it doesn't. Besides, quantumnumbers must not contain duplicate Abelian quantum numbers, manually guaranteed by the user as well. This condition can be checked when and only when both ordercheck==true and duplicatecheck==true. An error will be raised if this check fails.
  • dimensions specifies the degenerate dimensions of the corresponding Abelian quantum numbers. Apparently, each degenerate dimension must be positive, which should also be manually guaranteed by the user. When and only when the keyword argument degeneracycheck is true, the constructor will check whether this condition is satisfied and raise an error if it doesn't.
  • dual specifies whether the graded space is the dual representation of the corresponding Abelian group, which roughly speaking, can be viewed as the direction of the arrow of the Abelian quantum numbers labeling the irreducible representations. We assume dual==true corresponds to the in-arrow and dual==false corresponds to the out-arrow.
source
QuantumLattices.QuantumNumbers.AbelianGradedSpaceMethod
AbelianGradedSpace(pairs; dual::Bool=false)
AbelianGradedSpace(pairs::Pair...; dual::Bool=false)
AbelianGradedSpace{QN}(pairs; dual::Bool=false) where {QN<:AbelianQuantumNumber}
AbelianGradedSpace{QN}(pairs::Pair...; dual::Bool=false) where {QN<:AbelianQuantumNumber}

Construct an Abelian graded space.

In this function, the Abelian quantum numbers will be sorted automatically, therefore, their orders need not be worried. Duplicate and dimension checks of the quantum numbers are also carried out and errors will be raised if either such checks fails.

source
QuantumLattices.QuantumNumbers.AbelianQuantumNumberProdMethod
AbelianQuantumNumberProd{T}(vs::Vararg{Number, N}) where {N, T<:NTuple{N, SimpleAbelianQuantumNumber}}
AbelianQuantumNumberProd{T}(vs::NTuple{N, Number}) where {N, T<:NTuple{N, SimpleAbelianQuantumNumber}}

Construct a Deligne tensor product of simple Abelian quantum numbers by their values.

source
QuantumLattices.QuantumNumbers.MomentumType
const Momentum = AbelianQuantumNumberProd{<:Tuple{Vararg{ℤ}}}
const Momentum₁{N} = AbelianQuantumNumberProd{Tuple{ℤ{N}}}
const Momentum₂{N₁, N₂} = AbelianQuantumNumberProd{Tuple{ℤ{N₁}, ℤ{N₂}}}
const Momentum₃{N₁, N₂, N₃} = AbelianQuantumNumberProd{Tuple{ℤ{N₁}, ℤ{N₂}, ℤ{N₃}}}

Type alias for the Abelian quantum numbers of 1d, 2d and 3d momentum.

source
QuantumLattices.QuantumNumbers.Momentum₁Method
Momentum₁{N}(k::Integer) where N
Momentum₂{N}(k₁::Integer, k₂::Integer) where N
Momentum₂{N₁, N₂}(k₁::Integer, k₂::Integer) where {N₁, N₂}
Momentum₃{N}(k₁::Integer, k₂::Integer, k₃::Integer) where N
Momentum₃{N₁, N₂, N₃}(k₁::Integer, k₂::Integer, k₃::Integer) where {N₁, N₂, N₃}

Construct 1d, 2d and 3d momentum.

source
Base.:+Method
+(qn::AbelianQuantumNumber) -> typeof(qn)

Overloaded + operator for AbelianQuantumNumber.

source
Base.:+Method
+(qn₁::QN, qn₂::QN, qns::QN...) where {QN<:AbelianQuantumNumberProd} -> QN

Overloaded + operator for AbelianQuantumNumberProd.

Note

To ensure type stability, two AbelianQuantumNumberProd can be added together if and only if they are of the same type.

source
Base.:+Method
+(qn₁::QN, qn₂::QN, qns::QN...) where {QN<:SimpleAbelianQuantumNumber} -> QN

Overloaded + operator for SimpleAbelianQuantumNumber.

Note

To ensure type stability, two SimpleAbelianQuantumNumber can be added together if and only if they are of the same type.

source
Base.:-Method
-(qn::AbelianQuantumNumberProd) -> typeof(qn)
-(qn₁::QN, qn₂::QN) where {QN<:AbelianQuantumNumberProd} -> QN

Overloaded - operator for AbelianQuantumNumberProd.

Note

To ensure type stability, a AbelianQuantumNumberProd can be subtracted by another AbelianQuantumNumberProd if and only if they are of the same type.

source
Base.:-Method
-(qn::SimpleAbelianQuantumNumber) -> typeof(qn)
-(qn₁::QN, qn₂::QN) where {QN<:SimpleAbelianQuantumNumber} -> QN

Overloaded - operator for SimpleAbelianQuantumNumber.

Note

To ensure type stability, a SimpleAbelianQuantumNumber can be subtracted by another SimpleAbelianQuantumNumber if and only if they are of the same type.

source
Base.adjointMethod
adjoint(gs::AbelianGradedSpace) -> typeof(gs)

Get the dual of an Abelian graded space.

source
Base.cumsumMethod
cumsum(rs::RepresentationSpace, i::Union{Integer, CartesianIndex}) -> Int

Get the accumulative degenerate dimension up to the ith Abelian quantum number contained in a representation space.

source
Base.cumsumMethod
cumsum(gs::AbelianGradedSpace{QN}, qn::QN) where {QN<:AbelianQuantumNumber} -> Int

Get the accumulative dimension of an Abelian graded space up to a certain Abelian quantum number contained in an Abelian graded space.

source
Base.getindexMethod
getindex(gs::AbelianGradedSpace, indexes::AbstractVector{<:Integer}) -> typeof(gs)
getindex(gs::AbelianGradedSpace{QN}, quantumnumbers::AbstractVector{QN}) where {QN<:AbelianQuantumNumber} -> AbelianGradedSpace{QN}

Get a subset of an Abelian graded space.

source
Base.getindexMethod
getindex(::Type{Abelian}, ::Type{T}) where {T<:AbelianQuantumNumber} -> Type{T}

Overloaded [] for Abelian, i.e., the support of syntax Abelian[T] where T<:AbelianQuantumNumber, which is helpful for the construction of tensor producted Abelian quantum numbers.

source
Base.inMethod
in(qn::QN, gs::AbelianGradedSpace{QN}) where {QN<:AbelianQuantumNumber} -> Bool

Check whether an Abelian quantum number is contained in an Abelian graded space.

source
Base.invFunction
inv(qn::AbelianQuantumNumber, bool::Bool=true) -> typeof(qn)

Get the inverse of an Abelian quantum number qn if bool is true. Otherwise, return qn itself.

source
Base.lengthMethod
length(gs::AbelianGradedSpace) -> Int

Get the number of inequivalent irreducible representations (i.e., the Abelian quantum numbers) of an Abelian graded space.

source
Base.mergeMethod
merge(rs::AbelianGradedSpaceProd) -> Tuple{AbelianGradedSpace{eltype(rs)}, Dict{eltype(rs), Vector{NTuple{rank(rs), eltype(rs)}}}}

Get the decomposition of the direct product of several Abelian graded spaces and its corresponding fusion processes.

For a set of Abelian graded spaces (gs₁, gs₂, ...), their direct product space can contain several equivalent irreducible representations because for different sets of Abelian quantum numbers (qn₁, qn₂, ...) where qnᵢ∈gsᵢ, the fusion, i.e., ⊗(qn₁, qn₂, ...) may give the same result qn. This function returns the decomposition of the direct product of (gs₁, gs₂, ...) as well as all the fusion processes of each quantum number contained in the decomposition.

source
Base.pairsMethod
pairs(rs::RepresentationSpace, ::typeof(dimension)) -> RepresentationSpacePairs
pairs(rs::RepresentationSpace, ::typeof(range)) -> RepresentationSpacePairs

Return an iterator that iterates over the pairs of the Abelian quantum numbers and their corresponding (slices of the) degenerate dimensions contained in a representation space.

source
Base.rangeMethod
range(gs::AbelianGradedSpace, qn::CartesianIndex) -> UnitRange{Int}
range(gs::AbelianGradedSpace{QN}, qn::QN) where {QN<:AbelianQuantumNumber} -> UnitRange{Int}

Get the slice of the degenerate dimension of an Abelian quantum number contained in an Abelian graded space.

source
Base.rangeMethod
range(rs::AbelianGradedSpaceProd, i::CartesianIndex) -> AbstractVector{Int}

Get the slice of the degenerate dimension of the ith Abelian quantum number in the direct product of several Abelian graded spaces.

source
Base.rangeMethod
range(rs::AbelianGradedSpaceSum, i::CartesianIndex) -> UnitRange{Int}

Get the slice of the degenerate dimension of the ith Abelian quantum number in the direct sum of several Abelian graded spaces.

source
Base.rangeMethod
range(rs::RepresentationSpace, i::Integer)

Get the slice of the degenerate dimension of the ith Abelian quantum number contained in a representation space.

source
Base.rangeMethod
range(rs::AbelianGradedSpaceProd{N, QN}, qns::NTuple{N, QN}) where {N, QN<:AbelianQuantumNumber} -> AbstractVector{Int}

Get the slice of the degenerate dimension of the Abelian quantum number fused by qns in the direct product of several Abelian graded spaces.

source
Base.splitMethod
split(target::QN, rs::AbelianGradedSpaceProd{N, QN}; nmax::Real=20) where {N, QN<:AbelianQuantumNumber} -> Set{NTuple{N, QN}}

Find a set of splittings of the target Abelian quantum number with respect to the direct product of several Abelian graded spaces.

source
Base.zeroMethod
zero(qn::AbelianQuantumNumber) -> typeof(qn)
zero(::Type{QN}) where {QN<:AbelianQuantumNumber} -> QN

Get the zero Abelian quantum number.

source
LinearAlgebra.rankMethod
rank(qn::AbelianQuantumNumberProd) -> Int
rank(::Type{<:AbelianQuantumNumberProd}) -> Int

Get the rank of a Deligne tensor product of simple Abelian quantum numbers.

source
LinearAlgebra.rankMethod
rank(rs::CompositeAbelianGradedSpace) -> Int
rank(::Type{<:CompositeAbelianGradedSpace{N}}) where N -> Int

Get the number of Abelian graded spaces in the direct sum.

source
QuantumLattices.:⊕Method
⊕(gses::AbelianGradedSpace...) -> AbelianGradedSpaceSum
⊕(gs::AbelianGradedSpace, rs::AbelianGradedSpaceSum) -> AbelianGradedSpaceSum
⊕(rs::AbelianGradedSpaceSum, gs::AbelianGradedSpace) -> AbelianGradedSpaceSum
⊕(rs₁::AbelianGradedSpaceSum, rs₂::AbelianGradedSpaceSum) -> AbelianGradedSpaceSum

Get the direct sum of some Abelian graded spaces.

source
QuantumLattices.:⊗Method
⊗(gses::AbelianGradedSpace...) -> AbelianGradedSpaceProd
⊗(gs::AbelianGradedSpace, rs::AbelianGradedSpaceProd) -> AbelianGradedSpaceProd
⊗(rs::AbelianGradedSpaceProd, gs::AbelianGradedSpace) -> AbelianGradedSpaceProd
⊗(rs₁::AbelianGradedSpaceProd, rs₂::AbelianGradedSpaceProd) -> AbelianGradedSpaceProd

Get the direct product of some Abelian graded spaces.

source
QuantumLattices.:⊗Method
⊗(qns::AbelianQuantumNumber...) -> eltype(qns)

Get the direct product of some AbelianQuantumNumbers.

source
QuantumLattices.:⊠Method
⊠(qns::SimpleAbelianQuantumNumber...) -> AbelianQuantumNumberProd
⊠(qn₁::SimpleAbelianQuantumNumber, qn₂::AbelianQuantumNumberProd) -> AbelianQuantumNumberProd
⊠(qn₁::AbelianQuantumNumberProd, qn₂::SimpleAbelianQuantumNumber) -> AbelianQuantumNumberProd
⊠(qn₁::AbelianQuantumNumberProd, qn₂::AbelianQuantumNumberProd) -> AbelianQuantumNumberProd

Deligne tensor product of Abelian quantum numbers.

source
QuantumLattices.:⊠Method
⊠(QNS::Type{<:SimpleAbelianQuantumNumber}...) -> Type{AbelianQuantumNumberProd{Tuple{QNS...}}}
⊠(::Type{QN}, ::Type{AbelianQuantumNumberProd{T}}) where {QN<:SimpleAbelianQuantumNumber, T<:Tuple{Vararg{SimpleAbelianQuantumNumber}}} -> Type{AbelianQuantumNumberProd{Tuple{QN, fieldtypes(T)...}}}
⊠(::Type{AbelianQuantumNumberProd{T}}, ::Type{QN}) where {T<:Tuple{Vararg{SimpleAbelianQuantumNumber}}, QN<:SimpleAbelianQuantumNumber} -> Type{AbelianQuantumNumberProd{Tuple{fieldtypes(T)...}, QN}}
⊠(::Type{AbelianQuantumNumberProd{T₁}}, ::Type{AbelianQuantumNumberProd{T₂}}) where {T₁<:Tuple{Vararg{SimpleAbelianQuantumNumber}}, T₂<:Tuple{Vararg{SimpleAbelianQuantumNumber}}} -> Type{AbelianQuantumNumberProd{Tuple{fieldtypes(T₁)..., fieldtypes(T₂)...}}}

Deligne tensor product of Abelian quantum numbers.

source
QuantumLattices.QuantumNumbers.findindexMethod
findindex(position::Integer, gs::AbelianGradedSpace, guess::Integer) -> Int

Find the index of an Abelian quantum number in an Abelian graded space beginning at guess whose position in the complete dimension range is position.

source
QuantumLattices.QuantumNumbers.periodMethod
period(qn::AbelianQuantumNumberProd, i::Integer) -> Number
period(::Type{AbelianQuantumNumberProd{T}}, i::Integer) where {T<:Tuple{Vararg{SimpleAbelianQuantumNumber}}} -> Number

Get the period of the ith simple Abelian number contained in a Deligne tensor product.

source
QuantumLattices.QuantumNumbers.periodMethod
period(qn::SimpleAbelianQuantumNumber) -> Number
period(::Type{QN}) where {QN<:SimpleAbelianQuantumNumber} -> Number

The period of a simple Abelian quantum number.

source
QuantumLattices.QuantumNumbers.periodsMethod
periods(qn::AbelianQuantumNumber) -> Tuple{Vararg{Number}}
periods(::Type{QN}) where {QN<:AbelianQuantumNumber} -> Tuple{Vararg{Number}}

The periods of Abelian quantum numbers.

source
QuantumLattices.QuantumNumbers.regularize!Method
regularize!(quantumnumbers::Vector{<:AbelianQuantumNumber}, dimensions::Vector{Int}; check::Bool=false) -> Tuple{typeof(quantumnumbers), typeof(dimensions), Vector{Int}}

In place regularization of the input Abelian quantum numbers and their corresponding degenerate dimensions.

After the regularization, the Abelian quantum numbers will be sorted in the ascending order and duplicates will be merged together.The degenerate dimensions will be processed accordingly. When check is true, this function also check whether all input degenerate dimensions are positive. The regularized Abelian quantum numbers and degenerate dimensions, as well as the permutation vector that sorts the input Abelian quantum numbers, will be returned.

source
QuantumLattices.QuantumNumbers.regularizeMethod
regularize(quantumnumbers::AbstractVector{<:AbelianQuantumNumber}, dimension::AbstractVector{<:Integer}; check::Bool=false) -> Tuple{Vector{eltype(quantumnumbers)}, Vector{Int}, Vector{Int}}

Regularize of the input Abelian quantum numbers and their corresponding degenerate dimensions.

See regularize!.

source
QuantumLattices.decomposeMethod
decompose(rs::CompositeAbelianGradedSpace; expand::Bool=true) -> Tuple{AbelianGradedSpace{eltype(rs)}, Vector{Int}}

Decompose a composite of several Abelian graded spaces to the canonical one.

When expand is false, the corresponding permutation vector that sorts the Abelian quantum numbers will be returned as well. When expand is true, the expanded dimension indexes of the permutation vector that sorts the Abelian quantum numbers will be returned as well.

source
QuantumLattices.dimensionMethod
dimension(gs::AbelianGradedSpace, qn::CartesianIndex) -> Int
dimension(gs::AbelianGradedSpace{QN}, qn::QN) where {QN<:AbelianQuantumNumber} -> Int

Get the degenerate dimension of an Abelian quantum number contained in an Abelian graded space.

source
QuantumLattices.dimensionMethod
dimension(rs::AbelianGradedSpaceProd, i::CartesianIndex) -> Int

Get the degenerate dimension of the ith Abelian quantum number in the direct product of several Abelian graded spaces.

source
QuantumLattices.dimensionMethod
dimension(rs::AbelianGradedSpaceProd) -> Int

Get the total dimension of the direct product of several Abelian graded spaces.

source
QuantumLattices.dimensionMethod
dimension(rs::AbelianGradedSpaceSum, i::CartesianIndex) -> Int

Get the degenerate dimension of the ith Abelian quantum number in the direct sum of several Abelian graded spaces.

source
QuantumLattices.dimensionMethod
dimension(rs::AbelianGradedSpaceSum) -> Int

Get the total dimension of the direct sum of several Abelian graded spaces.

source
QuantumLattices.dimensionMethod
dimension(rs::RepresentationSpace, i::Integer) -> Int

Get the degenerate dimension of the ith Abelian quantum number contained in a representation space.

source
QuantumLattices.dimensionMethod
dimension(rs::AbelianGradedSpaceProd{N, QN}, qns::NTuple{N, QN}) where {N, QN<:AbelianQuantumNumber} -> Int

Get the degenerate dimension of the Abelian quantum number fused by qns in the direct product of several Abelian graded spaces.

source