QObjects API

Index

SymBasis.DoFObjects.BosonType
Boson{Tb<:Unsigned,T,Ti} <: SymBasis.DoFObjects.AbstractDoFSpec{T,Ti}

A concrete type representing a bosonic degree of freedom specification. This type defines the maximum occupancy for each particle.

Fields

  • max_occupancy::Tb: The maximum occupancy for each bosonic particle.

Constructor Arguments

  • max_occupancy::Tb: The maximum occupancy for each bosonic particle.

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

  • Boson{Tb,T,Ti}: A new Boson instance representing the specified bosonic degree of freedom.
source
SymBasis.DoFObjects.BosonMethod
Boson(max_occupancy::Signed; kwargs...)

A convenience constructor for creating a Boson instance with an optional maximum occupancy. The constructor automatically determines the appropriate unsigned integer type for storage based on the provided values.

Arguments

  • max_occupancy::Signed: The maximum occupancy for each bosonic particle.

Keyword Arguments

  • kwargs...: Additional keyword arguments to be passed to the Boson constructor.

Returns

  • Boson: A new Boson instance representing the specified bosonic degree of freedom.
source
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.SpinlessFermionType
SpinlessFermion{T,Ti} <: SymBasis.DoFObjects.AbstractDoFSpec{T,Ti}

A concrete type representing a spinless fermionic degree of freedom specification. This type defines a binary occupancy for each particle, where each site can be either occupied (1) or unoccupied (0).

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

  • SpinlessFermion{T,Ti}: A new SpinlessFermion instance representing the specified spinless fermionic degree of freedom.
source
SymBasis.DoFObjects.dof_objectMethod
dof_object(type::Boson{Tb,T,Ti}) where {Tb,T,Ti}

Constructs a DoFObject based on the provided SymBasis.DoFObjects.Boson specification. The local degrees of freedom are determined by the maximum occupancy, which defines a range from 0 to max_occupancy.

Arguments

Returns

source
SymBasis.DoFObjects.dof_objectMethod
dof_object(::SpinlessFermion{T,Ti}) where {T,Ti}

Constructs a DoFObject based on the provided SymBasis.DoFObjects.SpinlessFermion specification. The local degrees of freedom are binary, representing the occupation number of each site, which can be either 0 (unoccupied) or 1 (occupied).

Arguments

Returns

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