|View source on GitHub|
A class representing a Measurement Key.
cirq.value.MeasurementKey( name: str, path: Tuple[str, ...] = dataclasses.field(default_factory=tuple) )
Used in the notebooks
|Used in the tutorials|
Wraps a string key. If you just want the string measurement key, simply call
str() on this.
||The string representation of the key.|
||The path to this key in a circuit. In a multi-level circuit (one with repeated or nested subcircuits), we need to differentiate the keys that occur multiple times. The path is used to create such fully qualified unique measurement key based on where it occurs in the circuit. The path is outside-to-in, the outermost subcircuit identifier appears first in the tuple.|
parse_serialized( key_str: str )
Parses the serialized string representation of
Measurementkey into a
This is the only way to construct a
MeasurementKey from a nested string representation
(where the path is joined to the key name by the
replace( **changes ) -> 'MeasurementKey'
Returns a copy of this MeasurementKey with the specified changes.
with_key_path_prefix( *path_component )
Adds the input path component to the start of the path.
Useful when constructing the path from inside to out (in case of nested subcircuits), recursively.
__eq__( other ) -> bool
__le__( other )
__lt__( other )