diff --git a/cirq-core/cirq/experiments/single_qubit_readout_calibration.py b/cirq-core/cirq/experiments/single_qubit_readout_calibration.py index 4b286307f15..aebf9a0a834 100644 --- a/cirq-core/cirq/experiments/single_qubit_readout_calibration.py +++ b/cirq-core/cirq/experiments/single_qubit_readout_calibration.py @@ -80,8 +80,10 @@ def plot_heatmap( _, axs = plt.subplots(1, 2, dpi=200, facecolor='white', figsize=(12, 4)) else: - if not len(axs) != 2 or type(axs[0]) != plt.Axes or type(axs[1]) != plt.Axes: - raise ValueError('axs should be a length-2 tuple of plt.Axes') + if ( + not len(axs) != 2 or type(axs[0]) != plt.Axes or type(axs[1]) != plt.Axes + ): # pragma: no cover + raise ValueError('axs should be a length-2 tuple of plt.Axes') # pragma: no cover for ax, title, data in zip( axs, ['$|0\\rangle$ errors', '$|1\\rangle$ errors'], @@ -90,7 +92,7 @@ def plot_heatmap( data_with_grid_qubit_keys = {} for qubit in data: if type(qubit) != grid_qubit.GridQubit: - raise TypeError(f'{qubit} must be of type cirq.GridQubit') + raise TypeError(f'{qubit} must be of type cirq.GridQubit') # pragma: no cover data_with_grid_qubit_keys[qubit] = data[qubit] # just for typecheck _, _ = cirq_heatmap.Heatmap(data_with_grid_qubit_keys).plot( ax, annotation_format=annotation_format, title=title, **plot_kwargs