iqm.benchmarks.utils_plots.plot_layout_fidelity_graph

iqm.benchmarks.utils_plots.plot_layout_fidelity_graph#

iqm.benchmarks.utils_plots.plot_layout_fidelity_graph(backend: str | IQMBackendBase, qubit_layouts: list[list[int]] | None = None, sq_metric: str = 'coherence', show_ghz_path: bool = False, tree_options: TreeSearchOptions | None = None) → Figure#

Plot a graph showing the quantum chip layout with fidelity information.

Creates a visualization of the quantum chip topology where nodes represent qubits and edges represent connections between qubits. Edge thickness indicates gate errors (thinner edges mean better fidelity) and selected qubits are highlighted in orange.

Parameters:
  • backend (str | IQMBackendBase) – The backend to visualize, either as a string name or an IQMBackendBase instance.

  • qubit_layouts (list[list[int]] | None) – List of qubit layouts where each layout is a list of qubit indices

  • sq_metric (str) – Optional single qubit metric to use for the visualization, can be either “fidelity”, “coherence”, or “readout”.

  • show_ghz_path (bool) – Whether to highlight the edges that are part of the GHZ state creation tree path. The path shown is the one the “tree” state generation routine would build for the first layout, from the same calibration, so it is what a run would actually play.

  • tree_options (TreeSearchOptions | None) – What the GHZ tree search minimizes when show_ghz_path is set. None uses the same defaults as GHZConfiguration, so the drawn path matches a default run; pass a TreeSearchOptions built from the tree_* options of a non-default configuration.

Returns:

The generated figure object containing the graph visualization

Return type:

matplotlib.figure.Figure