View source on GitHub |
A classical control condition based on a single measurement key.
Inherits From: Condition
cirq.KeyCondition(
key: 'cirq.MeasurementKey', index: int = -1
)
This condition resolves to True iff the measurement key is non-zero at the time of resolution.
Attributes | |
---|---|
keys
|
Gets the control keys. |
qasm
|
Returns the qasm of this condition. |
key
|
Dataclass field |
index
|
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.
Class Variables | |
---|---|
index |
-1
|