autoqasm.operators.logical module
Operators for logical boolean operators (e.g. not, and, or).
- autoqasm.operators.logical.and_(a: Callable[[], Any], b: Callable[[], Any]) bool | BoolVar[source]
Functional form of “and”.
- Parameters:
a (Callable[[], Any]) – Callable that returns the first expression.
b (Callable[[], Any]) – Callable that returns the second expression.
- Returns:
bool | BoolVar – Whether both expressions are true.
- autoqasm.operators.logical.or_(a: Callable[[], Any], b: Callable[[], Any]) bool | BoolVar[source]
Functional form of “or”.
- Parameters:
a (Callable[[], Any]) – Callable that returns the first expression.
b (Callable[[], Any]) – Callable that returns the second expression.
- Returns:
bool | BoolVar – Whether either expression is true.
- autoqasm.operators.logical.not_(a: Any) bool | BoolVar[source]
Functional form of “not”.
- Parameters:
a (Any) – Expression to negate.
- Returns:
bool | BoolVar – Whether the expression is false.