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 (most recent call last):
  File "<ipython-input-1-9716d6975e6b>", line 6, in <module>
    backends.append(provider.backends.ibmq_vigo)
  File "/opt/miniconda3/envs/qiskit/lib/python3.9/site-packages/qiskit/providers/ibmq/ibmqbackendservice.py", line 566, in __getattribute__
    return self._backend_service.__getattribute__(item)
AttributeError: 'IBMQBackendService' object has no attribute 'ibmq_vigo'

Use %tb to get the full traceback.