Skip to content

Comparator

Bases: Enum

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-attribute instance-attribute

Eq = ...

Equality (==)

Ge class-attribute instance-attribute

Ge = ...

Greater-than or equal (>=)

Le class-attribute instance-attribute

Le = ...

Less-than or equal (<=)