cirq.SympyCondition

A classical control condition based on a sympy expression.

Inherits From: Condition

This condition resolves to True iff the sympy expression resolves to a truthy value (i.e. bool(x) == True) when the measurement keys are substituted in as the free variables.

keys Gets the control keys.
qasm Returns the qasm of this condition.
expr Dataclass field

Methods

replace_key

View source

Replaces the control keys.

resolve

View source

Resolves the condition based on the measurements.

__eq__