Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
5.12k stars 2.35k forks source link

Cannot read qubit numbers on `plot_error_map` visualization for 127-qubit devices #11960

Open chriseclectic opened 7 months ago

chriseclectic commented 7 months ago

Environment

What is happening?

The qubit numbers in the image created by plot_error_map is not legible for 127-qubit devices.

image

How can we reproduce the issue?

from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit.visualization import plot_error_map

service = QiskitRuntimeService()
backend = service.get_backend("ibm_sherbrooke")
plot_error_map(backend)

What should happen?

In earlier version of qiskit (at least in 0.44 iirc) the nodes in the coupling map plot were larger and the qubit numbers were easily readable.

Any suggestions?

Update the new drawer to increase the font size or node size for nodes.

WhiteSymmetry commented 7 months ago

from qiskit_ibm_runtime import QiskitRuntimeService service = QiskitRuntimeService() service.backends(simulator=False, operational=True, min_num_qubits=5)

[<IBMBackend('ibm_brisbane')>, <IBMBackend('ibm_kyoto')>, <IBMBackend('ibm_osaka')>]

from qiskit_ibm_runtime import QiskitRuntimeService from qiskit.visualization import plot_error_map

service = QiskitRuntimeService() backend = service.get_backend("ibm_kyoto")

ibm_kyoto, ibm_brisbane, ibm_osaka are working

plot_error_map(backend)

backend = service.backend("ibm_kyoto")

print( f"Name: {backend.name}\n" f"Version: {backend.version}\n" f"No. of qubits: {backend.num_qubits}\n" )

Name: ibm_kyoto Version: 2 No. of qubits: 127

"The percentages for 'Readout Error' are jumbled together, and the 'Qubit' numbers appear somewhat unclear as well."

WhiteSymmetry commented 7 months ago

Environment

Qiskit version: 1.0.1
Python version: 3.11
Operating system: Linux

~/lib/python3.11/site-packages/qiskit/visualization/gate_map.py "All the settings related to plot_error_map are here. You can change the settings here as you wish. Here is the state after the changes I made:" font_size = max(int(20 / max_characters), 1) --> font_size = max(int(30 / max_characters), 1) left_ax.set_yticklabels([str(kk) for kk in range(num_left)], fontsize=12) --> left_ax.set_yticklabels([str(kk) for kk in range(num_left)], fontsize=8) right_ax.set_yticklabels([str(kk) for kk in range(num_left, num_qubits)], fontsize=12) --> right_ax.set_yticklabels([str(kk) for kk in range(num_left, num_qubits)], fontsize=8) ibm_kyoto-3