Mitigate Qubit Measurement Errors in Qiskit Using This New Technique

Qiskit
Qiskit
Published in
4 min readMay 19, 2021

By Sergey Bravyi, Sarah Sheldon, Abhinav Kandala, David McKay, Chris Wood, George Barron, and Jay Gambetta

Today’s qubits are fragile — so fragile that even the act of trying to measure their state can cause unexpected errors. If we hope to use quantum computers to tackle hard computing problems, we’ll need to find ways to correct these pesky errors. Thanks to our recently-published research, there’s a new way to handle these measurement errors — using Qiskit — in a way that takes a reasonable amount of time.

Future fault-tolerant quantum computers will employ error correction, or encoding a single qubit worth of quantum information across many qubits, to handle errors. But fault tolerant quantum computing is a ways off— for smaller-scale devices, our team is instead pursuing error mitigation techniques, using the results of many runs of a quantum circuit to determine the effect of noise and correct for it. We’ve presented two of these methods and demonstrated them experimentally in a paper published recently in Physical Review A, and you can try them out on your own. Crucially, this work allows us to handle measurement errors on larger quantum computers than ever before, removing the exponential scaling of previous error mitigation techniques.

Previous research has demonstrated that we can well-approximate a noisy measurement with an ideal measurement followed by a classical noise process. As an example, consider what happens for a single qubit: if we perform a measurement on a basis state of 0 or 1, the ideal measurement always returns 0 or 1, respectively. However, noise can induce unwanted transitions between 0 and 1. We can describe the effect of such classical noise using a two-by-two matrix of transition probabilities. The two off-diagonal elements of the noise matrix (that is, the upper right and lower left elements), specify the probability of unwanted transitions from 0 to 1 and vice versa. We can estimate all entries of the noise matrix by counting how often each unwanted transition happens in the experiment. Finally, we can mitigate the errors by applying the inverse of this matrix to the noisy measurement outcomes. But there’s a challenge: as the number of qubits n grows, the number of unwanted transitions and size of the noise matrix grow exponentially. So instead of a two-by-two matrix, we have to look at a 2^n by 2^n matrix. Figuring out all the values of that matrix and then creating the inverse can be computationally expensive. Essentially, you’d have to run an unfeasible number of experiments in order to compare expected versus actual outcomes and calculate the probabilities.

Our team developed a shortcut by creating simple models of these exponentially large noise matrices that depend only on a few parameters and enable an efficient computation of the inverse matrix. Importantly, we can learn all of the unknown parameters of these models by running only a few experiments. We focused on two models: the simpler “tensor product” model assumes that the qubits act totally independently, and only requires 2n probability measurements. The more advanced one, nicknamed CTMP (short for Continuous Time Markov Processes) takes inter-qubit effects into account, but would require 2n² probability measurements.

The process begins with a calibration step — essentially, setting the qubits into some state x, then performing a noisy measurement of each qubit to find the measured state y. Repeatedly performing these measurements allows us to calculate the probabilities that serve as the entries of the noise matrix. The time required to complete this step scales linearly with the number of qubits. A second step is an algorithm that inverts the effects of the noise on the measurement outcomes. However, rather than explicitly performing this calculation, we found that we could cancel errors using only a smaller statistical sample of noise model matrices.

So, what’s the big deal? Errors serve as a big limiting factor for today’s quantum computers. Understanding and mitigating errors is therefore an important area of research — but previous error mitigation techniques scaled exponentially with the number of qubits. Tensor product noise models reduced scaling during the calibration step, but the noise inversion step still scaled exponentially. This work doesn’t require us to construct the noise matrix, and therefore the method scales only with the number of times you run the quantum circuit, also known as shots, rather than the number of qubits. This method therefore has a lower experimental overhead, allowing researchers to mitigate errors on circuits of more qubits.

We demonstrated these techniques on a 20-qubit IBM Quantum device and found, first off, that our CTMP model accurately approximated the readout noise. Then, we ran 20-qubit quantum circuits employing their error mitigation strategy and found that it worked effectively, and on a larger number of qubits than previous methods.

Error mitigated stabilizer measurements performed on a 20-qubit state generated by a random depth-4 Clifford circuit. This graph shows Error mitigated and raw mean values for ~500 stabilizer operators S, chosen such that the weight of S varies between 1 and 20. Each data point represents the average over all stabilizers S with a given weight. In the absence of gate and readout errors, each stabilizer S has mean value +1. Error mitigation was performed using the CTMP and Tensor Product methods with Hadamard-type calibration. Black circles indicate raw mean values measured without error mitigation.

Now, thanks to work by Christopher Wood, you can try out error mitigation using the CTMP method using this set of jupyter notebooks, where notebook 3 characterizes the error and notebook 4 mitigates it. The work demonstrates measurement error mitigation on a quantum state called a stabilizer graph state and estimates fidelity on a 4-qubit subset of an IBM Quantum device.

As we scale up quantum devices, the team is continuing research into error mitigation so that we can continue to make the most of today’s devices. You can learn more about error mitigation in the Qiskit Textbook here.

--

--

Qiskit
Qiskit

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