CNOT error density¶
import datetime
from qiskit import IBMQ
from kaleidoscope.qiskit.backends import cnot_error_density
Simple multi-system comparison¶
IBMQ.load_account()
provider = IBMQ.get_provider(group='open')
backends = []
backends.append(provider.backends.ibmq_lima)
backends.append(provider.backends.ibmq_santiago)
backends.append(provider.backends.ibmq_belem)
backends.append(provider.backends.ibmq_quito)
cnot_error_density(backends)

Linear error scaling¶
cnot_error_density(backends, scale='linear')

Historical data with custom colors¶
backend = provider.backends.ibmq_lima
props = [backend.properties(datetime=datetime.datetime(2020, kk, 1)) for kk in range(2, 7)]
cnot_error_density(props, offset=200,
colors=['#d6d6d6', '#bebebe', '#a6a6a6', '#8e8e8e', '#ff007f'])
Traceback [1;36m(most recent call last)[0m:
File [0;32m"<ipython-input-4-8f954a623980>"[0m, line [0;32m3[0m, in [0;35m<module>[0m
cnot_error_density(props, offset=200,
[1;36m File [1;32m"/opt/miniconda3/envs/qiskit/lib/python3.9/site-packages/kaleidoscope/qiskit/backends/mpl/cnot_err.py"[1;36m, line [1;32m82[1;36m, in [1;35mcnot_error_density[1;36m[0m
[1;33m if back.configuration().n_qubits < 2:[0m
[1;31mAttributeError[0m[1;31m:[0m 'NoneType' object has no attribute 'configuration'
Use %tb to get the full traceback.
Shift position of backend labels¶
cnot_error_density(backends, text_xval=3)

Change offset between distributions¶
cnot_error_density(backends, offset=300)

Change gaussian widths¶
cnot_error_density(backends, covariance_factor=0.5)

Custom x-limits¶
cnot_error_density(backends, xlim=[0.1,5])
