View source on GitHub |
A classical control condition based on a sympy expression.
Inherits From: Condition
cirq.SympyCondition(
expr: sympy.Basic
)
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.
Attributes | |
---|---|
keys
|
Gets the control keys. |
qasm
|
Returns the qasm of this condition. |
expr
|
Dataclass field |
Methods
replace_key
replace_key(
current: 'cirq.MeasurementKey', replacement: 'cirq.MeasurementKey'
)
Replaces the control keys.
resolve
resolve(
classical_data: 'cirq.ClassicalDataStoreReader'
) -> bool
Resolves the condition based on the measurements.
__eq__
__eq__(
other
)
Return self==value.