Visualizing Results with Heatmaps
Overview
Visualizing Results with Heatmaps
Visualization is an essential part of working with quantum devices, where results are naturally tied to the physical layout of qubits on a chip. This Cirq tutorial demonstrates the cirq.vis.heatmap package, which renders per-qubit and per-qubit-pair values as color-coded heatmaps over the device's grid topology, making spatial patterns immediately visible. Such plots are widely used to display calibration and characterization data: single-qubit and two-qubit gate error rates, measurement fidelities, T1 and T2 coherence times, or any scalar quantity associated with qubits and their couplings, so that hotspots, dead qubits, and connectivity issues stand out at a glance. The example walks through constructing single-qubit heatmaps that color each qubit by a value, and two-qubit heatmaps that color the links between neighboring qubits, configuring colormaps, annotations, and color bars along the way. It is a practical, beginner-friendly guide to one of the most common visualization tasks in everyday quantum computing work, turning raw per-qubit numbers into an intuitive picture of a device's behavior.
Run it
pip install -r requirements.txt
python heatmaps.py
Source and license
Imported from examples/heatmaps.py in quantumlib/Cirq at v1.6.1, under the Apache License 2.0. Original authors: The Cirq Developers. The upstream LICENSE is included alongside this example.
This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.
Versions
Cite all versions? Use the base QCR ID to always reference the latest version of this entry.
Join the Discussion
Comments (0)
No comments yet. Be the first to share your thoughts!