← Quantum Store · Guides · Lessons · Glossary · Packages · About · Türkçe

Noise and quantum error correction course · Lesson 5 / 5 · 10 min

Error mitigation: better results from today’s noisy devices

The millions of qubits needed for full error correction do not exist yet. Learn the error mitigation techniques that improve results on today’s devices, in particular zero-noise extrapolation (ZNE).

Mitigation, not correction

Error correction catches errors while the circuit runs and needs extra qubits. Error mitigation uses no extra qubits: it runs the circuit many times with small changes, then processes the results classically to estimate the effect of the noise and remove it.

The price is more repetitions: error mitigation usually needs many more measurements, and this number grows quickly with the size of the circuit. So it is a bridge: the way to get meaningful results from today’s devices until fault-tolerant computers arrive.

Zero-noise extrapolation

In ZNE the circuit is run first as it is, then with its noise deliberately raised 2 and 3 times (for example by applying each gate three times: itself, its inverse and itself again). The measured values are plotted against the noise level and the curve is extended to zero noise.

In the example below the true value is 1, but the noise lowers it a little at each level. Fitting a curve to the three measurements and extending it to zero gives 0.999 instead of 0.905.

import numpy as np

scales = np.array([1, 2, 3])                   # noise 1, 2 and 3 times
measured = np.exp(-0.1 * scales)               # true value 1, lowered by the noise
fit = np.polyfit(scales, measured, 2)          # fit a second-degree curve
print(measured.round(3), round(float(np.polyval(fit, 0)), 3))
# [0.905 0.819 0.741] 0.999

Error mitigation in Qiskit

On IBM devices the Estimator turns on error mitigation with a single setting. resilience_level = 1 mitigates measurement errors; 2 adds ZNE. Dynamical decoupling places gate sequences that cancel errors on qubits that sit idle.

In 2023 IBM used error mitigation on a 127-qubit processor to compute the results of a physics simulation that the classical methods of the time struggled with. Classical methods soon reached the same results as well; this race also showed the limits of error mitigation.

from qiskit_ibm_runtime import EstimatorV2 as Estimator

estimator = Estimator(mode=backend)
estimator.options.resilience_level = 2              # measurement error mitigation + ZNE
estimator.options.dynamical_decoupling.enable = True
job = estimator.run([(isa_circuit, observable)])

Try it yourself

In the simulator the GHZ circuit only gives 000 and 111. On a real device every CNOT adds a little error and wrong results such as 001 or 110 appear too, more so as the number of qubits grows. Error mitigation estimates the effect of these wrong results on averages and removes it.

Open the circuit in your browser

The circuit playground is in Turkish. Button guide: “1000 kez ölç” = measure 1000 times, “Durum vektörünü göster” = show the state vector, “Bu devrenin Qiskit kodu” = this circuit’s Qiskit code, “Geri al” = undo, “Temizle” = clear. Click a gate in the circuit to remove it.

Key points

Test yourself

How does zero-noise extrapolation (ZNE) work?

Show the answer

It raises the noise deliberately and extends the results to zero noise. The circuit is run at different noise levels and the curve through the measured values is extended to zero noise.

← The surface code and the threshold: the road to fault-tolerant quantum computers · Quantum machine learning and hardware course →

Share: X · LinkedIn