def plot_heatmap(
        self, target_error: str = 'pauli', ax: plt.Axes | None = None, **plot_kwargs
    ) -> plt.Axes:
        """plot the heatmap of the target errors.

        Args:
            target_error: The error to draw. Must be one of 'xeb', 'pauli', or 'decay_constant'
            ax: the plt.Axes to plot on. If not given, a new figure is created,
                plotted on, and shown.
            **plot_kwargs: Arguments to be passed to 'plt.Axes.plot'.
        """
        show_plot = not ax
        if not isinstance(ax, plt.Axes):
            fig, ax = plt.subplots(1, 1, figsize=(8, 8))
        heatmap_data = cast(
            Mapping[tuple['cirq.GridQubit', ...], float], self._target_errors(target_error)
        )

        name = f'{target_error} error' if target_error != 'decay_constant' else 'decay constant'
        ax.set_title(f'device {name} heatmap')

        vis.TwoQubitInteractionHeatmap(heatmap_data).plot(ax=ax, **plot_kwargs)
        if show_plot:
            fig.show()
        return ax
plot the heatmap of the target errors.

        Args:
            target_error: The error to draw. Must be one of 'xeb', 'pauli', or 'decay_constant'
            ax: the plt.Axes to plot on. If not given, a new figure is created,
                plotted on, and shown.
            **plot_kwargs: Arguments to be passed to 'plt.Axes.plot'.
        
cirq-core/cirq/experiments/two_qubit_xeb.py