cirq.protocols.SupportsMeasurementKey

An object that is a measurement and has a measurement key or keys.

Measurement keys are used in referencing the results of a measurement.

Users are free to implement either _measurement_key_ returning one string or _measurement_keys_ returning an iterable of strings.

$$ \rho \rightarrow \sum_k A_k \rho A_k^\dagger $$

where as a measurement enacts the evolution

$$ \rho \rightarrow A_k \rho A_k^\dagger $$

conditional on the measurement outcome being $k$.

Methods

_measurement_key_

View source

Return the key that will be used to identify this measurement.

When a measurement occurs, either on hardware, or in a simulation, this is the key value under which the results of the measurement will be stored.

_measurement_keys_

View source

Return the keys for measurements performed by the receiving object.

When a measurement occurs, either on hardware, or in a simulation, these are the key values under which the results of the measurements will be stored.

_with_measurement_key_mapping_

View source

Return a copy of this object with the measurement keys remapped.

This method allows measurement keys to be reassigned at runtime.