def two_qubit_interaction_heatmap():
    """Demo of cirq.InteractionHeatmap.
    Demonstrates how cirq.Heatmap can be used to generate a two qubit interaction heatmap.
    """

    # normally one would get these from cirq_google.engine
    s = np.random.RandomState(1234)
    random_characterization_data = {
        tuple(qubit_pair): s.rand() for qubit_pair in cirq_google.Sycamore.metadata.qubit_pairs
    }

    heatmap = cirq.TwoQubitInteractionHeatmap(
        value_map=random_characterization_data,
        title='Two Qubit Sycamore Gate XEB Cycle Total Error',
    )
    # this is going to plot something similar to examples/two_qubit_interaction_heatmap_example.png
    heatmap.plot()
Demo of cirq.InteractionHeatmap.
    Demonstrates how cirq.Heatmap can be used to generate a two qubit interaction heatmap.
    
examples/heatmaps.py