Qiskit Ignis: A Framework for Characterizing and Mitigating Noise in Quantum Devices

Qiskit
Qiskit
Published in
5 min readMar 13, 2019

Written by: David McKay , Leron Gil

This week we are excited to introduce a new package to our Qiskit family — Qiskit Ignis 0.1. Ignis is a powerful framework for studying and mitigating noise in quantum devices and works seamlessly with both Qiskit Terra and Qiskit Aer. Ignis enables users to create and run many of the same circuits that we use at IBM Q, such as randomized benchmarking. Ignis also provides fitting tools to analyze the results of these experiments and filters that can be applied to results to mitigate errors.

What is noise?

Quantum devices are noisy because the very nature of quantum computing requires creating fragile “superposition” states of quantum bits (qubits) and performing precise interactions between qubits. Noise can show up randomly and cause a qubit to decay from the state |1> to |0> (the time for this to occur is known as the T1 time) and/or cause a loss of contrast when the qubit is in the superposition state (this is known as the T2 time). If qubits are like little tuning forks, T1 is the time is takes for the tuning fork to stop making sound and T2 is the time it takes the tuning fork to change the sounds it makes. Noise can also occur deterministically as unwanted ways in which the qubits interact or imperfections in the way we control our qubits.

What can we do about noise?

The first thing to do about noise is to understand and characterize the source of the noise and its impact on our devices. We do that through specialized circuits designed to amplify the effects of certain noises and by measuring the results of those experiments. The purpose of Qiskit Ignis is to bring these circuits and analysis tools to Qiskit users. To mitigate some sources of noise, such as T1 and T2, requires improvements at the device level and our team at IBM Q is working diligently to bring those improvements to fruition.

Other sources of noise, for example unwanted interactions, can be mitigated through better qubit pulse sequences. This can be accomplished through our OpenPulse framework (Qiskit Open Pulse , not yet available). Another class of device noise can be mitigated with proper calibrations. This includes noise on the measurement outcomes. Ignis provides the circuits and analysis to do these calibrations and produce a mitigation filter for measurement noise.

Ultimately the goal of quantum computing is to build full fault-tolerant error correction into the devices. When this happens noise will be corrected in “real-time”. There has been tremendous research progress on this topic and while Ignis 0.1 is a significant step, practical devices are still years into the future.

The Ignis Framework

The Qiskit Ignis framework is built around providing circuit modules for users to generate lists of circuits (experiments) based on few input parameters. These experiments can be run on devices through Terra or simulators through Aer. The results are analyzed using Ignis fitter modules which provide useful parameters on system noise. For certain experiments fitters can generate filter objects which can be used to mitigate noise on the results of independent experiments.

V0.1 of Ignis will enable the following experiments:

Characterization experiments to measure:

  • stochastic noise parameters such as T1 and T2
  • device interaction parameters such as ZZ
  • gate control errors

Randomized benchmarking (see example below):

  • Tools to general one- and two-qubit random Clifford sequences in parallel
  • Analysis of the data to determine average gate error

State and Process Tomography:

  • Ignis tools generate all the required circuits given the circuit-under-test by appending and prepending new sets of gates
  • Tools to analyze the output of these circuits to reconstruct the state/process

Measurement Error Mitigation:

  • Tools to generate the circuits and analysis to construct a measurement calibration
  • Filter object that can be applied to results to mitigate measurement errors

For more information on these topics see the docs and tutorials: https://qiskit.org/documentation/.

Randomized benchmarking example

Randomized benchmarking (RB) is a procedure where random sequences of gates in a certain class (Clifford gates) are applied to the qubit and the decay of qubit population in the ground state versus the number of gates is a simple way to measure gate error. This is the same procedure used at IBM Q to report our gate errors. Here we will show some results from the tutorial on RB: https://github.com/Qiskit/qiskit-tutorials/blob/master/qiskit/ignis/randomized_benchmarking.ipynb.

First, we generate a set of RB circuits. The circuits are specified by the number of Clifford gates in each circuit and by the number of different random realization of each sequence length.

rb_circs, xdata = randomized_benchmarking_seq(length_vector= numpy.arange(1,200,20), nseeds=5, rb_pattern=[[0,1]])

Next we run on a device (we run each seed as individual experiments)

job = qiskit.execute(rb_circs[0], backend=my_backend)

And put the data into a fitter object

rbfit = RBFitter(job.result(), xdata, rb_opts[‘rb_pattern’])

We repeat this for each seed, adding the data to the fitter

rbfit.add_data(job.result())

and get the following plot

The EPC is the error per Clifford gate, which is the error averaged over all input quantum states. Each Clifford is a special gate constructed from the more common single qubit gates (H, S) and the CX gate. Ignis provides tools to convert from the Clifford error to the gate error.

How to start using Ignis

Starting with Ignis is easy and does not require an advanced knowledge of the gate sequences used in these experiments. It’s recommended to use pip install qiskit to get started with Qiskit which will include the Ignis package. If you would like to only install Ignis then use pip install qiskit-ignis. To contribute to the source code, please go to the Github repo for the project found here: https://github.com/Qiskit/qiskit-ignis.

Contributors

The development of Qiskit Ignis has been a collaborative effort between IBM Q researches David McKay, Christopher Wood, John Smolin, Yael Ben-Haim, Shelly Garion, Gadi Aleksandrowicz and Yehuda Naveh at IBM Research Yorktown Heights and IBM Research Haifa.

--

--

Qiskit
Qiskit

An open source quantum computing framework for writing quantum experiments and applications