Skip to content

Vtype

Enumeration of variable types supported by the optimization system.

This enum defines the type of a variable used in a model. The type influences the domain and behavior of the variable during optimization. It is often passed when defining variables to specify how they should behave.

Attributes:

Name Type Description
Real Vtype

Continuous real-valued variable. Can take any value within given bounds.

Integer Vtype

Discrete integer-valued variable. Takes integer values within bounds.

Binary Vtype

Binary variable. Can only take values 0 or 1.

Spin Vtype

Spin variable. Can only take values -1 or +1.

Examples:

>>> from luna_quantum import Vtype
>>> Vtype.Real
Real
>>> str(Vtype.Binary)
'Binary'

Binary class

Binary = Binary

Enumeration of variable types supported by the optimization system.

This enum defines the type of a variable used in a model. The type influences the domain and behavior of the variable during optimization. It is often passed when defining variables to specify how they should behave.

Attributes:

Name Type Description
Real Vtype

Continuous real-valued variable. Can take any value within given bounds.

Integer Vtype

Discrete integer-valued variable. Takes integer values within bounds.

Binary Vtype

Binary variable. Can only take values 0 or 1.

Spin Vtype

Spin variable. Can only take values -1 or +1.

Examples:

>>> from luna_quantum import Vtype
>>> Vtype.Real
Real
>>> str(Vtype.Binary)
'Binary'

Integer class

Integer = Integer

Enumeration of variable types supported by the optimization system.

This enum defines the type of a variable used in a model. The type influences the domain and behavior of the variable during optimization. It is often passed when defining variables to specify how they should behave.

Attributes:

Name Type Description
Real Vtype

Continuous real-valued variable. Can take any value within given bounds.

Integer Vtype

Discrete integer-valued variable. Takes integer values within bounds.

Binary Vtype

Binary variable. Can only take values 0 or 1.

Spin Vtype

Spin variable. Can only take values -1 or +1.

Examples:

>>> from luna_quantum import Vtype
>>> Vtype.Real
Real
>>> str(Vtype.Binary)
'Binary'

Real class

Real = Real

Enumeration of variable types supported by the optimization system.

This enum defines the type of a variable used in a model. The type influences the domain and behavior of the variable during optimization. It is often passed when defining variables to specify how they should behave.

Attributes:

Name Type Description
Real Vtype

Continuous real-valued variable. Can take any value within given bounds.

Integer Vtype

Discrete integer-valued variable. Takes integer values within bounds.

Binary Vtype

Binary variable. Can only take values 0 or 1.

Spin Vtype

Spin variable. Can only take values -1 or +1.

Examples:

>>> from luna_quantum import Vtype
>>> Vtype.Real
Real
>>> str(Vtype.Binary)
'Binary'

Spin class

Spin = Spin

Enumeration of variable types supported by the optimization system.

This enum defines the type of a variable used in a model. The type influences the domain and behavior of the variable during optimization. It is often passed when defining variables to specify how they should behave.

Attributes:

Name Type Description
Real Vtype

Continuous real-valued variable. Can take any value within given bounds.

Integer Vtype

Discrete integer-valued variable. Takes integer values within bounds.

Binary Vtype

Binary variable. Can only take values 0 or 1.

Spin Vtype

Spin variable. Can only take values -1 or +1.

Examples:

>>> from luna_quantum import Vtype
>>> Vtype.Real
Real
>>> str(Vtype.Binary)
'Binary'

__eq__ method descriptor

__eq__(value)

Return self==value.

__ge__ method descriptor

__ge__(value)

Return self>=value.

__le__ method descriptor

__le__(value)

Return self<=value.

__repr__ method descriptor

__repr__() -> str

Return repr(self).

__str__ method descriptor

__str__() -> str

Return str(self).