Bases API
Index
SymBasis.Bases.BasisSymBasis.Bases.basisSymBasis.Bases.basisSymBasis.Bases.basisSymBasis.Bases.is_commutativeSymBasis.Bases.representativeSymBasis.Bases.representative
SymBasis.Bases.Basis — Type
Basis{T,T_n<:Number}
Basis(
states::AbstractVector{T},
norms::AbstractVector{T_n}
) where {T,T_n<:Number}A basis struct consisting of a collection of basis states and their corresponding norms. The basis states are represented using SymBasis.DigitBase.BaseInt, which allows for efficient representation and manipulation of states in different bases.
Fields
states::AbstractVector{T}: A vector of basis states, whereTis the type of the basis states.norms::AbstractVector{T_n}: A vector of norms corresponding to each basis state, whereT_nis the data type for the norms.
Constructor Arguments
states::AbstractVector{T}: A vector of basis states, whereTis the type of the basis states.norms::AbstractVector{T_n}: A vector of norms corresponding to each basis state.
Returns
SymBasis.Bases.Basis{T,T_n}: A newSymBasis.Bases.Basisinstance containing the provided states and norms.
The constructor checks that the length of states matches the length of norms to ensure consistency.
SymBasis.Bases.basis — Method
basis(
dofo::DoFObject{B,T_s,T,Ti},
N::Integer;
norm_type=Float64
) where {B,T_s,T,Ti}Generates the full basis for a DoF-object without symmetry considerations.
Arguments
dofo::SymBasis.DoFObjects.DoFObject{B,T_s,T,Ti}: The DoF-object for which the basis is to be generated.N::Integer: The number of sites or particles.
Keyword Arguments
norm_type::DataType=Float64: The data type for the norms of the basis states. Default isFloat64.is_sorted::Bool=false: Whether to sort the basis states in ascending order. Default isfalse.
Returns
SymBasis.Bases.Basis: The generated basis.
SymBasis.Bases.basis — Method
basis(
dofo::DoFObject{B,T_s,T,Ti},
N::Integer,
csg::CombSymGroup{B,T_s,T,Ti,Ts};
norm_type::DataType=Float64,
is_sorted::Bool=false
) where {T,Ti,B,T_s,T_n<:Real,Ts<:Union{T_n,Complex{T_n}}}Generates the symmetry-resolved basis for a DoF-object under the action of a combined symmetry group.
Arguments
dofo::SymBasis.DoFObjects.DoFObject{B,T_s,T,Ti}: The DoF-object for which the basis is to be generated.N::Integer: The number of sites or particles.csg::SymBasis.SymGroups.CombSymGroup{B,T_s,T,Ti,Ts}: The combined symmetry group to be resolved.
Keyword Arguments
norm_type::DataType=Float64: The data type for the norms of the basis states. Default isFloat64.is_sorted::Bool=false: Whether to sort the basis states in ascending order. Default isfalse.
Returns
SymBasis.Bases.Basis: The generated symmetry-resolved basis.
SymBasis.Bases.basis — Method
basis(
dofo::DoFObject{B,T_s,T,Ti},
N::Integer,
sg::SymGroup{B,T_s,T,Ti,Ts};
norm_type=Float64
) where {T,Ti,B,T_s,T_n<:Real,Ts<:Union{T_n,Complex{T_n}}}Generates the symmetry-resolved basis for a DoF-object under the action of a symmetry group.
Arguments
dofo::SymBasis.DoFObjects.DoFObject{B,T_s,T,Ti}: The DoF-object for which the basis is to be generated.N::Integer: The number of sites or particles.sg::SymBasis.SymGroups.SymGroup{B,T_s,T,Ti,Ts}: The symmetry group to be resolved.
Keyword Arguments
norm_type::DataType=Float64: The data type for the norms of the basis states. Default isFloat64.is_sorted::Bool=false: Whether to sort the basis states in ascending order. Default isfalse.
Returns
SymBasis.Bases.Basis: The generated symmetry-resolved basis.
SymBasis.Bases.is_commutative — Method
is_commutative(b::Basis, csg::CombSymGroup)Checks whether the given symmetries commute with each other in the given basis.
Arguments
b::SymBasis.Bases.Basis: The basis to be checked.csg::SymBasis.SymGroups.CombSymGroup: The combined symmetry group under which the basis states are expected to be consistent.
Returns
Bool: Returnstrueif the basis states are consistent under the action of the combined symmetry group, andfalseotherwise.
SymBasis.Bases.representative — Method
representative(
state::SymBasis.DigitBase.BaseInt{T,Ti,B},
csg::CombSymGroup{B,T_s,T,Ti,Ts}
) where {T,Ti,B,T_s,T_n<:Real,Ts<:Union{T_n,Complex{T_n}}}Finds the representative state and corresponding factor for a given state under the action of a combined symmetry group.
Arguments
state::SymBasis.DigitBase.BaseInt{T,Ti,B}: The state for which the representative is to be found.csg::SymBasis.SymGroups.CombSymGroup{B,T_s,T,Ti,Ts}: The combined symmetry group.
Returns
rep_state::SymBasis.DigitBase.BaseInt{T,Ti,B}: The representative state.rep_fac::Ts: The corresponding factor associated with the representative state.
SymBasis.Bases.representative — Method
representative(
state::SymBasis.DigitBase.BaseInt{T,Ti,B},
sg::SymGroup{B,T_s,T,Ti,Ts}
) where {T,Ti,B,T_s,T_n<:Real,Ts<:Union{T_n,Complex{T_n}}}Finds the representative state and corresponding factor for a given state under the action of a symmetry group.
Arguments
state::SymBasis.DigitBase.BaseInt{T,Ti,B}: The state for which the representative is to be found.sg::SymBasis.SymGroups.SymGroup{B,T_s,T,Ti,Ts}: The symmetry group.
Returns
rep_state::SymBasis.DigitBase.BaseInt{T,Ti,B}: The representative state.rep_fac::Ts: The corresponding factor associated with the representative state.