qbraid.visualization.plot_connectivity_graph
- plot_connectivity_graph(device=None, *, coupling_map=None, calibration=None, topology=None, edge_gate=None, title=None, show=True, save_path=None)[source]
Plot a device’s connectivity graph colored by live calibration data.
Edges are colored by two-qubit gate error and nodes by readout error, both on a single-hue scale where darker is better, matching the qBraid Lab topology view. Qubits present in the lattice footprint but without any working couplings (e.g. dead qubits) are drawn as dotted outlines.
- Parameters:
device (
QbraidDevice|None) – AQbraidDeviceto fetch coupling map, calibrations, and topology from. Optional if the keyword overrides are given.coupling_map (
Optional[Iterable[tuple[int,int]]]) – Physical qubit pairs. Defaults todevice.coupling_map.calibration (
DeviceCalibration|None) – ADeviceCalibrationsnapshot. Defaults todevice.get_calibrations().topology (
dict|None) – Device topology config for lattice layout. Defaults to the device document’stopologyfield; unknown types fall back to a force-directed layout.edge_gate (
str|None) – Which gate’s error entries to color edges by (e.g."cz"). Defaults to the first gate in the calibration data.title (
str|None) – Plot title. Defaults to the device id and calibration time.show (
bool) – If True, display the figure. Defaults to True.save_path (
str|Path|None) – Path to save the figure. If None, figure is not saved.
- Raises:
VisualizationError – If no calibration data is available, the coupling map is empty (e.g. all-to-all trapped-ion devices), or
edge_gateis not present in the calibration data.- Return type:
None