QObjects API
Index
SymBasis.DoFObjects.AbstractDoFSpecSymBasis.DoFObjects.DoFObjectSymBasis.DoFObjects.SpinSymBasis.DoFObjects.bintSymBasis.DoFObjects.dof_object
SymBasis.DoFObjects.AbstractDoFSpec — Type
AbstractDoFSpec{T,Ti}An abstract type representing a specification for degrees of freedom (DoF) objects. This type serves as a base for concrete DoF specifications, such as SymBasis.DoFObjects.Spin, which define predefined specific types of DoF objects.
SymBasis.DoFObjects.DoFObject — Type
DoFObject{B,T_ldof,T<:Integer,Ti<:Integer} <: SymBasis.DoFObjects.AbstractDoFObject
DoFObject(
type::Symbol,
ldof::NTuple{B,T_ldof};
T::DataType=UInt, Ti::DataType=Int
) where {B,T_ldof}An object having degrees of freedom. Each object is characterized by its type and a tuple of local degrees of freedom (ldof) with length B. The type of the local degrees of freedom is specified by the type parameter T_ldof, while the integer types used for indexing and calculations are specified by the type parameters T and Ti.
Fields
type::Symbol: The type of the object (e.g.,:Spin,:Fermion) as a symbol.ldof::NTuple{B,T_ldof}: A tuple representing the local degrees of freedom of the object.
Constructor Arguments
type::Symbol: The type of the object (e.g.,:Spin,:Fermion) as a symbol.ldof::NTuple{B,T_ldof}: A tuple representing the local degrees of freedom of the object.
Constructor Keyword Arguments
T::DataType=UInt: The integer type used for indexing and calculations. Default isUInt.Ti::DataType=Int: The integer type used for indexing and calculations. Default isInt.
Returns
DoFObject{B,T_ldof,T,Ti}: A newDoFObjectinstance.
SymBasis.DoFObjects.Spin — Type
Spin{Ts<:Rational,T,Ti} <: SymBasis.DoFObjects.AbstractDoFSpec{T,Ti}A concrete type representing a quantum mechanical spin specification. The spin value s is a rational number that can be either an integer or a half-integer, and it defines the local degrees of freedom for the spin object.
Fields
s::Ts: The spin value, which must be a positive rational number with a denominator of 1 or 2.
Constructor Arguments
s::Ts: The spin value, which must be a positive rational number with a denominator of 1 or 2.
Constructor Keyword Arguments
T::Type=UInt: The underlying integer type for storage (default isUInt).Ti::Type=Int: The integer type used for indexing (default isInt).
Returns
Spin{Ts,T,Ti}: A newSpininstance representing the specified spin.
SymBasis.DoFObjects.bint — Method
bint(dofo::SymBasis.DoFObjects.DoFObject{B,T_ldof,T,Ti}) where {B,T_ldof,T,Ti}Returns SymBasis.DigitBase.BaseInt corresponding to the object.
Arguments
dofo::SymBasis.DoFObjects.DoFObject{B,T_ldof,T,Ti}: The object for which to
create the base integer.
Returns
SymBasis.DigitBase.BaseInt{T,Ti,B}: The base integer type corresponding to the object.
SymBasis.DoFObjects.dof_object — Method
dof_object(type::Spin{Ts,T,Ti}) where {Ts,T,Ti}Constructs a DoFObject based on the provided SymBasis.DoFObjects.Spin specification. The local degrees of freedom are determined by the spin value s, which defines a range from -s to s.
Arguments
type::Spin{Ts,T,Ti}: ASymBasis.DoFObjects.Spinspecification that defines the spin value and associated types.
Returns
SymBasis.DoFObjects.DoFObject: A DoF-object representing the degrees of freedom for the specified spin.