Bases API

Index

SymBasis.Bases.BasisType
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, where T is the type of the basis states.
  • norms::AbstractVector{T_n}: A vector of norms corresponding to each basis state, where T_n is the data type for the norms.

Constructor Arguments

  • states::AbstractVector{T}: A vector of basis states, where T is the type of the basis states.
  • norms::AbstractVector{T_n}: A vector of norms corresponding to each basis state.

Returns

The constructor checks that the length of states matches the length of norms to ensure consistency.

source
SymBasis.Bases.basisMethod
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 is Float64.
  • is_sorted::Bool=false: Whether to sort the basis states in ascending order. Default is false.

Returns

source
SymBasis.Bases.basisMethod
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

Keyword Arguments

  • norm_type::DataType=Float64: The data type for the norms of the basis states. Default is Float64.
  • is_sorted::Bool=false: Whether to sort the basis states in ascending order. Default is false.

Returns

source
SymBasis.Bases.basisMethod
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

Keyword Arguments

  • norm_type::DataType=Float64: The data type for the norms of the basis states. Default is Float64.
  • is_sorted::Bool=false: Whether to sort the basis states in ascending order. Default is false.

Returns

source
SymBasis.Bases.is_commutativeMethod
is_commutative(b::Basis, csg::CombSymGroup)

Checks whether the given symmetries commute with each other in the given basis.

Arguments

Returns

  • Bool: Returns true if the basis states are consistent under the action of the combined symmetry group, and false otherwise.
source
SymBasis.Bases.representativeMethod
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

Returns

  • rep_state::SymBasis.DigitBase.BaseInt{T,Ti,B}: The representative state.
  • rep_fac::Ts: The corresponding factor associated with the representative state.
source
SymBasis.Bases.representativeMethod
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

Returns

  • rep_state::SymBasis.DigitBase.BaseInt{T,Ti,B}: The representative state.
  • rep_fac::Ts: The corresponding factor associated with the representative state.
source