cnot_error_density¶
-
cnot_error_density
(backends, figsize=None, colors=None, offset=None, scale='log', covariance_factor=0.1, xlim=None, text_xval=None, xticks=None)[source]¶ Plot CNOT error distribution for one or more IBMQ backends.
- Parameters
backends (list or IBMQBackend or BackendProperties) – A single or ist of IBMQBackend instances or properties.
figsize (tuple) – Optional figure size in inches.
colors (list) – A list of Matplotlib compatible colors to plot with.
offset (float) – Positive offset for spacing out the backends.
scale (str) – ‘linear’ or ‘log’ scaling of x-axis.
covariance_factor (float) – Sets the width of the gaussian for each point.
xlim (list or tuple) – Optional lower and upper limits of cnot error values.
text_xval (float) – Optional xaxis value at which to start the backend text.
xticks (list) – Optional list of xaxis ticks to plot.
- Returns
A matplotlib Figure instance.
- Return type
Figure
- Raises
KaleidoscopeError – A backend with < 2 qubits was passed.
KaleidoscopeError – Number of colors did not match number of backends.
Example
from qiskit import * from kaleidoscope.qiskit.backends import cnot_error_density provider = IBMQ.load_account() backends = [] backends.append(provider.backends.ibmq_vigo) backends.append(provider.backends.ibmq_ourense) backends.append(provider.backends.ibmq_valencia) backends.append(provider.backends.ibmq_santiago) cnot_error_density(backends)
Traceback [1;36m(most recent call last)[0m: File [0;32m"<ipython-input-1-9716d6975e6b>"[0m, line [0;32m6[0m, in [0;35m<module>[0m backends.append(provider.backends.ibmq_vigo) [1;36m File [1;32m"/opt/miniconda3/envs/qiskit/lib/python3.9/site-packages/qiskit/providers/ibmq/ibmqbackendservice.py"[1;36m, line [1;32m566[1;36m, in [1;35m__getattribute__[1;36m[0m [1;33m return self._backend_service.__getattribute__(item)[0m [1;31mAttributeError[0m[1;31m:[0m 'IBMQBackendService' object has no attribute 'ibmq_vigo' Use %tb to get the full traceback.