A convenience wrapper for calibrations that acts like a dictionary.

Calibrations act as dictionaries whose keys are the names of the metric, and whose values are the metric values. The metric values themselves are represented as a dictionary. These metric value dictionaries have keys that are tuples of cirq.GridQubits and values that are lists of the metric values for those qubits. If a metric acts globally and is attached to no specified number of qubits, the map will be from the empty tuple to the metrics values.

Calibrations act just like a python dictionary. For example you can get a list of all of the metric names using


and query a single value by looking up the name by index:


timestamp The time that this calibration was run, in milliseconds since the epoch.



D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.


View source

Return a heatmap for metrics that target single qubits.

key The metric key to return a heatmap for.

A cirq.Heatmap for the metric.

AssertionError if the heatmap is not for single qubits or the metric values are not single floats.


D.items() -> a set-like object providing a view on D's items


D.keys() -> a set-like object providing a view on D's keys


View source

Return a string for the calibration timestamp.

tz The timezone for the string. If None, the method uses the platform's local date and time.
timespec See datetime.isoformat for valid values.

The string in ISO 8601 format YYYY-MM-DDTHH:MM:SS.ffffff.


D.values() -> an object providing a view on D's values



Return self==value.


View source

Supports getting calibrations by index.

Calibration may be accessed by key:


This returns a map from tuples of cirq.GridQubits to a list of the values of the metric. If there are no targets, the only key will only be an empty tuple.


View source


View source