Skip to main contentIBM Quantum Documentation

iplot_gate_map

iplot_gate_map(backend, figsize=(None, None), label_qubits=True, qubit_size=None, line_width=None, font_size=None, qubit_color='#2f4b7c', qubit_labels=None, line_color='#2f4b7c', font_color='white', background_color='white', as_widget=False)GitHub(opens in a new tab)

Plots an interactive gate map of a device.

Parameters

  • backend (IBMBackend) – Plot the gate map for this backend.
  • figsize (Tuple[Optional[int], Optional[int]]) – Output figure size (wxh) in inches.
  • label_qubits (bool) – Labels for the qubits.
  • qubit_size (Optional[float]) – Size of qubit marker.
  • line_width (Optional[float]) – Width of lines.
  • font_size (Optional[int]) – Font size of qubit labels.
  • qubit_color (Union[List[str], str]) – A list of colors for the qubits. If a single color is given, it’s used for all qubits.
  • qubit_labels (Optional[List[str]]) – A list of qubit labels
  • line_color (Union[List[str], str]) – A list of colors for each line from the coupling map. If a single color is given, it’s used for all lines.
  • font_color (str) – The font color for the qubit labels.
  • background_color (str) – The background color, either ‘white’ or ‘black’.
  • as_widget (bool) – True if the figure is to be returned as a PlotlyWidget. Otherwise the figure is to be returned as a PlotlyFigure.

Return type

Union[PlotlyFigure, PlotlyWidget]

Returns

The gate map figure.

Example

 from qiskit_ibm_provider import IBMProvider
 from qiskit_ibm_provider.visualization import iplot_gate_map
 
provider = IBMProvider(group='open', project='main')
# Note that this is a mock provider, replace ``FakeOpenPulse2Q``
# with any of the currently available IBM devices.
backend = provider.get_backend('FakeOpenPulse2Q')
 
 iplot_gate_map(backend, as_widget=True)
Was this page helpful?