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)[source]#
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 labelsline_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 aPlotlyWidget
. Otherwise the figure is to be returned as aPlotlyFigure
.
- 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') backend = provider.get_backend('ibmq_vigo') iplot_gate_map(backend, as_widget=True)