def plot_heatmap(
        self,
        ax: plt.Axes | None = None,
        annotation_format: str = '0.1%',
        title: str = 'Single-qubit Pauli error',
        **plot_kwargs: Any,
    ) -> plt.Axes:
        """Plot a heatmap of the Pauli errors. If qubits are not cirq.GridQubits, throws an error.

        Args:
            ax: the plt.Axes to plot on. If not given, a new figure is created,
                plotted on, and shown.
            annotation_format: The format string for the numbers in the heatmap.
            title: The title printed above the heatmap.
            **plot_kwargs: Arguments to be passed to 'cirq.Heatmap.plot()'.
        Returns:
            The plt.Axes containing the plot.
        """

        pauli_errors = self.pauli_error()
        pauli_errors_with_grid_qubit_keys = {}
        for qubit in pauli_errors:
            assert type(qubit) == grid_qubit.GridQubit, "qubits must be cirq.GridQubits"
            pauli_errors_with_grid_qubit_keys[qubit] = pauli_errors[qubit]  # just for typecheck

        if ax is None:
            _, ax = plt.subplots(dpi=200, facecolor='white')

        ax, _ = cirq_heatmap.Heatmap(pauli_errors_with_grid_qubit_keys).plot(
            ax, annotation_format=annotation_format, title=title, **plot_kwargs
        )
        return ax
Plot a heatmap of the Pauli errors. If qubits are not cirq.GridQubits, throws an error.

        Args:
            ax: the plt.Axes to plot on. If not given, a new figure is created,
                plotted on, and shown.
            annotation_format: The format string for the numbers in the heatmap.
            title: The title printed above the heatmap.
            **plot_kwargs: Arguments to be passed to 'cirq.Heatmap.plot()'.
        Returns:
            The plt.Axes containing the plot.
        
cirq-core/cirq/experiments/qubit_characterizations.py