QObjects API

Index

SymBasis.DoFObjects.DoFObjectType
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 is UInt.
  • Ti::DataType=Int: The integer type used for indexing and calculations. Default is Int.

Returns

  • DoFObject{B,T_ldof,T,Ti}: A new DoFObject instance.
source
SymBasis.DoFObjects.SpinType
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 is UInt).
  • Ti::Type=Int: The integer type used for indexing (default is Int).

Returns

  • Spin{Ts,T,Ti}: A new Spin instance representing the specified spin.
source
SymBasis.DoFObjects.dof_objectMethod
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

Returns

source