Skip to content

Comparator

Comparison operators used to define constraints.

This enum represents the logical relation between the left-hand side (LHS) and the right-hand side (RHS) of a constraint.

Attributes:

Name Type Description
Eq Comparator

Equality constraint (==).

Le Comparator

Less-than-or-equal constraint (<=).

Ge Comparator

Greater-than-or-equal constraint (>=).

Examples:

>>> from luna_quantum import Comparator
>>> str(Comparator.Eq)
'=='

Eq class

Eq = Eq

Comparison operators used to define constraints.

This enum represents the logical relation between the left-hand side (LHS) and the right-hand side (RHS) of a constraint.

Attributes:

Name Type Description
Eq Comparator

Equality constraint (==).

Le Comparator

Less-than-or-equal constraint (<=).

Ge Comparator

Greater-than-or-equal constraint (>=).

Examples:

>>> from luna_quantum import Comparator
>>> str(Comparator.Eq)
'=='

Ge class

Ge = Ge

Comparison operators used to define constraints.

This enum represents the logical relation between the left-hand side (LHS) and the right-hand side (RHS) of a constraint.

Attributes:

Name Type Description
Eq Comparator

Equality constraint (==).

Le Comparator

Less-than-or-equal constraint (<=).

Ge Comparator

Greater-than-or-equal constraint (>=).

Examples:

>>> from luna_quantum import Comparator
>>> str(Comparator.Eq)
'=='

Le class

Le = Le

Comparison operators used to define constraints.

This enum represents the logical relation between the left-hand side (LHS) and the right-hand side (RHS) of a constraint.

Attributes:

Name Type Description
Eq Comparator

Equality constraint (==).

Le Comparator

Less-than-or-equal constraint (<=).

Ge Comparator

Greater-than-or-equal constraint (>=).

Examples:

>>> from luna_quantum import Comparator
>>> str(Comparator.Eq)
'=='

__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).