Quantum error correction (QEC) is a set of techniques used in
quantum computing
A quantum computer is a computer that exploits quantum mechanical phenomena. On small scales, physical matter exhibits properties of wave-particle duality, both particles and waves, and quantum computing takes advantage of this behavior using s ...
to protect
quantum information
Quantum information is the information of the state of a quantum system. It is the basic entity of study in quantum information theory, and can be manipulated using quantum information processing techniques. Quantum information refers to both t ...
from errors due to
decoherence and other
quantum noise. Quantum error correction is theorised as essential to achieve
fault tolerant quantum computing that can reduce the effects of noise on stored quantum information, faulty quantum gates, faulty quantum state preparation, and faulty measurements. Effective quantum error correction would allow quantum computers with low qubit fidelity to execute algorithms of higher complexity or greater
circuit depth.
Classical
error correction
In information theory and coding theory with applications in computer science and telecommunications, error detection and correction (EDAC) or error control are techniques that enable reliable delivery of digital data over unreliable communi ...
often employs
redundancy. The simplest albeit inefficient approach is the
repetition code
In coding theory, the repetition code is one of the most basic linear error-correcting codes. In order to transmit a message over a noisy channel that may corrupt the transmission in a few places, the idea of the repetition code is to just repeat ...
. A repetition code stores the desired (logical) information as multiple copies, and—if these copies are later found to disagree due to errors introduced to the system—determines the most likely value for the original data by majority vote. For instance, suppose we copy a bit in the one (on) state three times. Suppose further that noise in the system introduces an error that corrupts the three-bit state so that one of the copied bits becomes zero (off) but the other two remain equal to one. Assuming that errors are independent and occur with some sufficiently low probability ''p'', it is most likely that the error is a single-bit error and the intended message is three bits in the one state. It is possible that a double-bit error occurs and the transmitted message is equal to three zeros, but this outcome is less likely than the above outcome. In this example, the logical information is a single bit in the one state and the physical information are the three duplicate bits. Creating a physical state that represents the logical state is called ''encoding'' and determining which logical state is encoded in the physical state is called ''decoding''. Similar to classical error correction, QEC codes do not always correctly decode logical qubits, but instead reduce the effect of noise on the logical state.
Copying quantum information is not possible due to the
no-cloning theorem. This theorem seems to present an obstacle to formulating a theory of quantum error correction. But it is possible to ''spread'' the (logical) information of one logical
qubit
In quantum computing, a qubit () or quantum bit is a basic unit of quantum information—the quantum version of the classic binary bit physically realized with a two-state device. A qubit is a two-state (or two-level) quantum-mechanical syste ...
onto a highly entangled state of several (physical) qubits.
Peter Shor
Peter Williston Shor (born August 14, 1959) is an American theoretical computer scientist known for his work on quantum computation, in particular for devising Shor's algorithm, a quantum algorithm for factoring exponentially faster than the ...
first discovered this method of formulating a ''quantum error correcting code'' by storing the information of one qubit onto a highly entangled state of nine qubits.
[
]
In classical error correction, ''syndrome decoding'' is used to diagnose which error was the likely source of corruption on an encoded state. An error can then be reversed by applying a corrective operation based on the syndrome. Quantum error correction also employs syndrome measurements. It performs a multi-qubit measurement that does not disturb the quantum information in the encoded state but retrieves information about the error. Depending on the QEC code used, syndrome measurement can determine the occurrence, location and type of errors. In most QEC codes, the type of error is either a bit flip, or a sign (of the
phase) flip, or both (corresponding to the
Pauli matrices
In mathematical physics and mathematics, the Pauli matrices are a set of three complex matrices that are traceless, Hermitian, involutory and unitary. Usually indicated by the Greek letter sigma (), they are occasionally denoted by tau () ...
X, Z, and Y). The measurement of the syndrome has the
projective effect of a
quantum measurement
In quantum physics, a measurement is the testing or manipulation of a physical system to yield a numerical result. A fundamental feature of quantum theory is that the predictions it makes are probabilistic. The procedure for finding a probability ...
, so even if the error due to the noise was arbitrary, it can be expressed as a combination of
basis operations called the error basis (which is given by the Pauli matrices and the
identity). To correct the error, the Pauli operator corresponding to the type of error is used on the corrupted qubit to revert the effect of the error.
The syndrome measurement provides information about the error that has happened, but not about the information that is stored in the logical qubit—as otherwise the measurement would destroy any
quantum superposition
Quantum superposition is a fundamental principle of quantum mechanics that states that linear combinations of solutions to the Schrödinger equation are also solutions of the Schrödinger equation. This follows from the fact that the Schrödi ...
of this logical qubit with other qubits in the
quantum computer, which would prevent it from being used to convey quantum information.
Bit-flip code
The repetition code works in a
classical channel, because classical bits are easy to measure and to repeat. This approach does not work for a quantum channel in which, due to the
no-cloning theorem, it is not possible to repeat a single qubit three times. To overcome this, a different method has to be used, such as the ''three-qubit bit-flip code'' first proposed by Asher Peres in 1985. This technique uses
entanglement and syndrome measurements and is comparable in performance with the repetition code.

Consider the situation in which we want to transmit the state of a single qubit
through a noisy
channel . Let us moreover assume that this channel either flips the state of the qubit, with probability
, or leaves it unchanged. The action of
on a general input
can therefore be written as
.
Let
be the quantum state to be transmitted. With no error-correcting protocol in place, the transmitted state will be correctly transmitted with probability
. We can however improve on this number by ''encoding'' the state into a greater number of qubits, in such a way that errors in the corresponding logical qubits can be detected and corrected. In the case of the simple three-qubit repetition code, the encoding consists in the mappings
and
. The input state
is encoded into the state
. This mapping can be realized for example using two CNOT gates, entangling the system with two
ancillary qubits initialized in the state
. The encoded state
is what is now passed through the noisy channel.
The channel acts on
by flipping some subset (possibly empty) of its qubits. No qubit is flipped with probability
, a single qubit is flipped with probability
, two qubits are flipped with probability
, and all three qubits are flipped with probability
. Note that a further assumption about the channel is made here: we assume that
acts equally and independently on each of the three qubits in which the state is now encoded. The problem is now how to detect and correct such errors, while not corrupting the transmitted state''.''

Let us assume for simplicity that
is small enough that the probability of more than a single qubit being flipped is negligible. One can then detect whether a qubit was flipped, without also querying for the values being transmitted, by asking whether one of the qubits differs from the others. This amounts to performing a measurement with four different outcomes, corresponding to the following four projective measurements:
This reveals which qubits are different from the others, without at the same time giving information about the state of the qubits themselves. If the outcome corresponding to
is obtained, no correction is applied, while if the outcome corresponding to
is observed, then the Pauli ''X'' gate is applied to the
-th qubit. Formally, this correcting procedure corresponds to the application of the following map to the output of the channel:
Note that, while this procedure perfectly corrects the output when zero or one flips are introduced by the channel, if more than one qubit is flipped then the output is not properly corrected. For example, if the first and second qubits are flipped, then the syndrome measurement gives the outcome
, and the third qubit is flipped, instead of the first two. To assess the performance of this error-correcting scheme for a general input we can study the
fidelity
Fidelity is the quality of faithfulness or loyalty. Its original meaning regarded duty in a broader sense than the related concept of '' fealty''. Both derive from the Latin word , meaning "faithful or loyal". In the City of London financial m ...
between the input
and the output
. Being the output state
correct when no more than one qubit is flipped, which happens with probability
, we can write it as
, where the dots denote components of
resulting from errors not properly corrected by the protocol. It follows that
This
fidelity
Fidelity is the quality of faithfulness or loyalty. Its original meaning regarded duty in a broader sense than the related concept of '' fealty''. Both derive from the Latin word , meaning "faithful or loyal". In the City of London financial m ...
is to be compared with the corresponding fidelity obtained when no error-correcting protocol is used, which was shown before to equal
. A little algebra then shows that the fidelity ''after'' error correction is greater than the one without for
. Note that this is consistent with the working assumption that was made while deriving the protocol (of
being small enough).
Sign-flip code

The bit flip is the only kind of error in classical computers. In quantum computers, however, another kind of error is possible: the sign flip. Through transmission in a channel, the relative sign between
and
can become inverted. For instance, a qubit in the state
may have its sign flip to
The original state of the qubit
will be changed into the state
In the Hadamard basis, bit flips become sign flips and sign flips become bit flips. Let
be a quantum channel that can cause at most one phase flip. Then the bit-flip code from above can recover
by transforming into the Hadamard basis before and after transmission through
.
Shor code
The error channel may induce either a bit flip, a sign flip (i.e., a phase flip), or both. It is possible to correct for both types of errors on a logical qubit using a well-designed QEC code. One example of a code that does this is the Shor code, published in 1995.
Since these two types of errors are the only types of errors that can result after a projective measurement, a Shor code corrects arbitrary single-qubit errors.

Let
be a
quantum channel that can arbitrarily corrupt a single qubit. The 1st, 4th and 7th qubits are for the sign flip code, while the three groups of qubits (1,2,3), (4,5,6), and (7,8,9) are designed for the bit flip code. With the Shor code, a qubit state
will be transformed into the product of 9 qubits
, where
If a bit flip error happens to a qubit, the syndrome analysis will be performed on each block of qubits (1,2,3), (4,5,6), and (7,8,9) to detect and correct at most one bit flip error in each block.
If the three bit flip group (1,2,3), (4,5,6), and (7,8,9) are considered as three inputs, then the Shor code circuit can be reduced as a sign flip code. This means that the Shor code can also repair a sign flip error for a single qubit.
The Shor code also can correct for any arbitrary errors (both bit flip and sign flip) to a single qubit. If an error is modeled by a unitary transform U, which will act on a qubit
, then
can be described in the form
where
,
,
, and
are complex constants, I is the identity, and the
Pauli matrices
In mathematical physics and mathematics, the Pauli matrices are a set of three complex matrices that are traceless, Hermitian, involutory and unitary. Usually indicated by the Greek letter sigma (), they are occasionally denoted by tau () ...
are given by
If ''U'' is equal to ''I'', then no error occurs. If
, a bit flip error occurs. If
, a sign flip error occurs. If
then both a bit flip error and a sign flip error occur. In other words, the Shor code can correct any combination of bit or phase errors on a single qubit.
More generally, the error operator ''U'' does not need to be unitary, but can be an Kraus operator from a
quantum operation representing a system interacting with its environment.
Bosonic codes
Several proposals have been made for storing error-correctable quantum information in bosonic modes. Unlike a two-level system, a
quantum harmonic oscillator
The quantum harmonic oscillator is the quantum-mechanical analog of the classical harmonic oscillator. Because an arbitrary smooth potential can usually be approximated as a harmonic potential at the vicinity of a stable equilibrium point, ...
has infinitely many energy levels in a single physical system. Codes for these systems include cat,
Gottesman-Kitaev-Preskill (GKP), and binomial codes.
One insight offered by these codes is to take advantage of the redundancy within a single system, rather than to duplicate many two-level qubits.
Binomial code
Written in the
Fock basis, the simplest binomial encoding is
where the subscript L indicates a "logically encoded" state. Then if the dominant error mechanism of the system is the stochastic application of the bosonic
lowering operator the corresponding error states are
and
respectively. Since the codewords involve only even photon number, and the error states involve only odd photon number, errors can be detected by measuring the
photon number parity of the system.
Measuring the odd parity will allow correction by application of an appropriate unitary operation without knowledge of the specific logical state of the qubit. However, the particular binomial code above is not robust to two-photon loss.
Cat code
Schrödinger cat states, superpositions of coherent states, can also be used as logical states for error correction codes. Cat code, realized by Ofek et al.
in 2016, defined two sets of logical states:
and
, where each of the states is a superposition of
coherent state as follows
Those two sets of states differ from the photon number parity, as states denoted with
only occupy even photon number states and states with
indicate they have odd parity. Similar to the binomial code, if the dominant error mechanism of the system is the stochastic application of the bosonic
lowering operator , the error takes the logical states from the even parity subspace to the odd one, and vice versa. Single-photon-loss errors can therefore be detected by measuring the photon number parity operator
using a dispersively coupled ancillary qubit.
[
Still, cat qubits are not protected against two-photon loss , dephasing noise , photon-gain error , etc.]
General codes
In general, a ''quantum code'' for a quantum channel is a subspace , where is the state Hilbert space, such that there exists another quantum channel with
where is the orthogonal projection onto . Here is known as the ''correction operation''.
A ''non-degenerate code'' is one for which different elements of the set of correctable errors produce linearly independent results when applied to elements of the code. If distinct of the set of correctable errors produce orthogonal results, the code is considered ''pure''.
Models
Over time, researchers have come up with several codes:
* Peter Shor
Peter Williston Shor (born August 14, 1959) is an American theoretical computer scientist known for his work on quantum computation, in particular for devising Shor's algorithm, a quantum algorithm for factoring exponentially faster than the ...
's 9-qubit-code, a.k.a. the Shor code, encodes 1 logical qubit in 9 physical qubits and can correct for arbitrary errors in a single qubit.
* Andrew Steane found a code that does the same with 7 instead of 9 qubits, see Steane code.
* Raymond Laflamme
Raymond Laflamme (born 1960), OC, FRSC is a Canadian theoretical physicist and founder and until mid 2017, was the director of the Institute for Quantum Computing at the University of Waterloo. He is also a professor in the Department of Physi ...
and collaborators found a class of 5-qubit codes that do the same, which also have the property of being fault-tolerant. A 5-qubit code is the smallest possible code that protects a single logical qubit against single-qubit errors.
* A generalisation of the technique used by Steane, to develop the 7-qubit code from the classical Hamming code">, 4Hamming code, led to the construction of an important class of codes called the CSS codes, named for their inventors: Robert Calderbank, Peter Shor and Andrew Steane. According to the quantum Hamming bound, encoding a single logical qubit and providing for arbitrary error correction in a single qubit requires a minimum of 5 physical qubits.
* A more general class of codes (encompassing the former) are the stabilizer codes discovered by Daniel Gottesman, and by Robert Calderbank, Eric Rains, Peter Shor, and N. J. A. Sloane; these are also called additive codes.
*Two dimensional Bacon–Shor codes are a family of codes parameterized by integers ''m'' and ''n''. There are ''nm'' qubits arranged in a square lattice.
* Alexei Kitaev's topological quantum codes, introduced in 1997 as the toric code, and the more general idea of a topological quantum computer
A topological quantum computer is a type of quantum computer. It utilizes anyons, a type of quasiparticle that occurs in two-dimensional systems. The anyons' world lines intertwine to form braids in a three-dimensional spacetime (one temporal ...
are the basis for various code types.
* Todd Brun, Igor Devetak, and Min-Hsiu Hsieh also constructed the entanglement-assisted stabilizer formalism as an extension of the standard stabilizer formalism that incorporates quantum entanglement
Quantum entanglement is the phenomenon where the quantum state of each Subatomic particle, particle in a group cannot be described independently of the state of the others, even when the particles are separated by a large distance. The topic o ...
shared between a sender and a receiver.
* The ideas of stabilizer codes, CSS codes, and topological codes can be expanded into the 2D planar surface code, of which various types exist. As of June 2024, the 2D planar surface code is generally considered the most well-studied type of quantum error correction, and one of the leading contenders for practical use in quantum computing.
That these codes allow indeed for quantum computations of arbitrary length is the content of the quantum threshold theorem
In physics, a quantum (: quanta) is the minimum amount of any physical entity (physical property) involved in an interaction. The fundamental notion that a property can be "quantized" is referred to as "the hypothesis of quantization". This me ...
, found by Michael Ben-Or and Dorit Aharonov
Dorit Aharonov (; born 1970) is an Israelis, Israeli computer scientist specializing in quantum computing.
Biography
Aharonov was born in Washington, D.C. and grew up in Haifa, the daughter of the mathematician Dov Aharonov and the niece of the p ...
, which asserts that you can correct for all errors if you concatenate quantum codes such as the CSS codes—i.e. re-encode each logical qubit by the same code again, and so on, on logarithmically many levels—''provided'' that the error rate of individual quantum gate
In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate (or simply quantum gate) is a basic quantum circuit operating on a small number of qubits. Quantum logic gates are the building blocks of quantu ...
s is below a certain threshold; as otherwise, the attempts to measure the syndrome and correct the errors would introduce more new errors than they correct for.
As of late 2004, estimates for this threshold indicate that it could be as high as 1–3%, provided that there are sufficiently many qubit
In quantum computing, a qubit () or quantum bit is a basic unit of quantum information—the quantum version of the classic binary bit physically realized with a two-state device. A qubit is a two-state (or two-level) quantum-mechanical syste ...
s available.
Experimental realization
There have been several experimental realizations of CSS-based codes. The first demonstration was with nuclear magnetic resonance qubits. Subsequently, demonstrations have been made with linear optics, trapped ions, and superconducting ( transmon) qubits.
In 2016 for the first time the lifetime of a quantum bit was prolonged by employing a QEC code. The error-correction demonstration was performed on Schrödinger-cat states encoded in a superconducting resonator, and employed a quantum controller capable of performing real-time feedback operations including read-out of the quantum information, its analysis, and the correction of its detected errors. The work demonstrated how the quantum-error-corrected system reaches the break-even point at which the lifetime of a logical qubit exceeds the lifetime of the underlying constituents of the system (the physical qubits).
Other error correcting codes have also been implemented, such as one aimed at correcting for photon loss, the dominant error source in photonic qubit schemes.
In 2021, an entangling gate between two logical qubits encoded in topological quantum error-correction codes has first been realized using 10 ions in a trapped-ion quantum computer. 2021 also saw the first experimental demonstration of fault-tolerant Bacon-Shor code in a single logical qubit of a trapped-ion system, i.e. a demonstration for which the addition of error correction is able to suppress more errors than is introduced by the overhead required to implement the error correction as well as fault tolerant Steane code. In a different direction, using an encoding corresponding to the Jordan-Wigner mapped Majorana zero modes of a Kitaev chain, researchers were able to perform quantum teleportation of a logical qubit, where an improvement in fidelity from 71% to 85% was observed.
In 2022, researchers at the University of Innsbruck
The University of Innsbruck (; ) is a public research university in Innsbruck, the capital of the Austrian federal state of Tyrol (state), Tyrol, founded on October 15, 1669.
It is the largest education facility in the Austrian States of Austria, ...
have demonstrated a fault-tolerant universal set of gates on two logical qubits in a trapped-ion quantum computer. They have performed a logical two-qubit controlled-NOT gate between two instances of the seven-qubit colour code, and fault-tolerantly prepared a logical magic state.
In February 2023, researchers at Google claimed to have decreased quantum errors by increasing the qubit number in experiments, they used a fault tolerant surface code measuring an error rate of 3.028% and 2.914% for a distance-3 qubit array and a distance-5 qubit array respectively.
In April 2024, researchers at Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
claimed to have successfully tested a quantum error correction code that allowed them to achieve an error rate with logical qubits that is 800 times better than the underlying physical error rate.
This qubit virtualization system was used to create 4 logical qubits with 30 of the 32 qubits on Quantinuum's trapped-ion hardware. The system uses an active syndrome extraction technique to diagnose errors and correct them while calculations are underway without destroying the logical qubits.
In January 2025, researchers at UNSW Sydney managed to develop an error correction method using antimony
Antimony is a chemical element; it has chemical symbol, symbol Sb () and atomic number 51. A lustrous grey metal or metalloid, it is found in nature mainly as the sulfide mineral stibnite (). Antimony compounds have been known since ancient t ...
-based materials, including antimonides, leveraging high-dimensional quantum states ( qudits) with up to eight states. By encoding quantum information in the nuclear spin of a phosphorus
Phosphorus is a chemical element; it has Chemical symbol, symbol P and atomic number 15. All elemental forms of phosphorus are highly Reactivity (chemistry), reactive and are therefore never found in nature. They can nevertheless be prepared ar ...
atom embedded in silicon
Silicon is a chemical element; it has symbol Si and atomic number 14. It is a hard, brittle crystalline solid with a blue-grey metallic lustre, and is a tetravalent metalloid (sometimes considered a non-metal) and semiconductor. It is a membe ...
and employing advanced pulse control techniques, they demonstrated enhanced error resilience.
Quantum error correction without encoding and parity checks
In 2022, research at University of Engineering and Technology Lahore demonstrated error cancellation by inserting single-qubit Z-axis rotation gates into strategically chosen locations of the superconductor quantum circuits. The scheme has been shown to effectively correct errors that would otherwise rapidly add up under constructive interference of coherent noise. This is a circuit-level calibration scheme that traces deviations (e.g. sharp dips or notches) in the decoherence curve to detect and localize the coherent error, but does not require encoding or parity measurements. However, further investigation is needed to establish the effectiveness of this method for the incoherent noise.
See also
* Error detection and correction
In information theory and coding theory with applications in computer science and telecommunications, error detection and correction (EDAC) or error control are techniques that enable reliable delivery of digital data over unreliable communi ...
* Soft error
In electronics and computing, a soft error is a type of error where a signal or datum is wrong. Errors may be caused by a defect, usually understood either to be a mistake in design or construction, or a broken component. A soft error is also a ...
References
Further reading
*
*
*
*
*
External links
*
{{DEFAULTSORT:Quantum Error Correction
Quantum computing
Fault-tolerant computer systems