Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Tutorial

QEC Structure

Abstract

A high level overview of underlying structure of quantum error correcting codes.

Keywords:qubitsRepetition Codebit-flipsphase errors.

A quantum error correcting code works by first encoding a kk-dimensional logical state into a subspace of some dd-dimensional Hilbert space. It is then assumed that an error from some pre-determined set of errors occurs on this state. A measurement can then be designed which is able to reveal which of these errors has occurred, without any information about the logical state being discovered.

To illustrate this idea, an error correcting code able to correct a single error is first designed,before being extended to multiple errors.

Single Error Code

An error correcting code is defined by first establishing a set of code words. These are typically a set of orthogonal pure states {i}i=0k \{ \ket{i} \}_{i=0}^{k}, such that ij=δi,j\braket{i | j}=\delta_{i,j}. The code space, CL\mathfrak{C}_L, is then the subspace of the full Hilbert space, H\mathcal{H}, spanned by the set of code words,

CL=span{{i}i=0k}H.\mathfrak{C}_L = { \rm span }\big\{ \{\ket{i}\}_{i=0}^k \big\} \subsetneq \mathcal{H}.

The logical state is then some state encoded within this code space, ψLCL\ket{\psi}_L \in \mathfrak{C}_L. We define ΠL\Pi_L to be the projector onto the code space,

ΠL=i=0kii.\Pi_L = \sum_{i=0}^k \vert i \rangle \langle i \vert.

If some unitary error, UU, acts on the logical state, the state will be mapped to the space spanned by UU acting on the code words,

UψLSpan{{Ui}i=0N}=CUH,U \ket{\psi}_L \in {\rm Span} \big\{ \{ U \ket{i} \}_{i=0}^{N} \big\} = \mathfrak{C}_U \subseteq \mathcal{H},

where we have defined this subspace to be CU\mathfrak{C}_U, and the projector onto the space is

ΠU=UΠLU=i=0kUiiU.\Pi_U = U \Pi_L U^\dagger = \sum_{i=0}^k U \vert i \rangle \langle i \vert U^\dagger.

The goal of the simplest imaginable error correcting code is then to (a) determine which of the channels I\mathbb{I} or UU has been applied to the logical state without (b) disturbing the logical state and hence destroying the encoded information.

Criteria (a) can be considered as an example of quantum channel discrimination, where the logical state is the reference state, with the added constraint of criteria (b).

Error Correction as Quantum Channel Discrimination

In the task of quantum channel discrimination one considers two parties, Alice and a referee. The referee has some reference state, ρR\rho_R, and a predetermined set of quantum channels {Ei}i=0M\{ \mathcal{E}_i \}_{i=0}^{M}. Both the reference state and the set of quantum channels are known to Alice.

The referee chooses an index j[0,M]j \in [0,M] and then applies the channel Ej{Ei}i=0M\mathcal{E}_j \in \{ \mathcal{E}_i \}_{i=0}^{M} to the reference state. The referee then sends the state Ej(ρR)\mathcal{E}_j(\rho_R) to Alice. Alice makes a measurement on the state with the intention of identify the channel the referee applied. The ultimate output of the measurement will therefore be some index k[0,M]k \in [0, M], such that if k=jk=j Alice has succeed in the task and if kjk \neq j she has failed.

A schematic of a quantum channel discrimination task. R and A are the referee and Alice respectively. The referee applies a channel from a predetermined set to the reference state and then sends it to Alice. Alice performs a measurement on the state and aims to identify which channel the referee applied.

A schematic of a quantum channel discrimination task. R and A are the referee and Alice respectively. The referee applies a channel from a predetermined set to the reference state and then sends it to Alice. Alice performs a measurement on the state and aims to identify which channel the referee applied.

With some added constraints, error correction can be reframed as a quantum channel discrimination task. The reference state is no-longer a predetermined state but rather an arbitrary state within some predetermined subspace. The referee is then the noise, with it being assumed that the noise is restricted to some likely set of possible channels. Finally, Alice is the decoder of the error correction protocol aiming to identify which error has occurred.

The major addition to quantum error correction is the need for the logical information encoded into the subspace to not be disturbed by the measurement made by Alice (the decoder). Practically, this means a restriction on the measurements Alice is allowed to perform.

See the Quantum State Discrimination page for more details on this task

It is a well known result in quantum information theory that for two quantum states to be deterministically distinguishable they must be orthogonal. Here, we are not concerned with specific states, but rather arbitary states encoded into subspaces. However, the result instead just applies to the subspaces. Hence, it is only possible to deterministically determine if I\mathbb{I} or UU has been applied to the logical state if

ΠLΠU=0,\Pi_{L} \Pi_{U} = 0,

meaning that for any arbitrary state ψLCL\ket{\psi}_L \in \mathfrak{C}_L, it is the case that ψLUψL=0\bra{\psi}_L U \ket{\psi}_L=0.

If this first condition is met it is always the case that one can find a projector ΠR\Pi_R, such that

ΠL+ΠU+ΠR=I,\Pi_L + \Pi_U + \Pi_R = \mathbb{I},

where ΠR\Pi_R is the projector onto the reminder of the Hilbert space not covered by ΠL\Pi_L and ΠU\Pi_U. This will defined a subspace orthogonal to both CL\mathfrak{C}_L and CU\mathfrak{C}_U and is simply given by ΠR=IΠLΠU\Pi_R = \mathbb{I} - \Pi_L - \Pi_U. From here, one can then defined an observable

O=λLΠL+λUΠU+λRΠR,O = \lambda_L \Pi_L + \lambda_U \Pi_U + \lambda_R \Pi_R,

that can be seen to fulfil both criteria (a) and (b). It fulfils (a) as if I\mathbb{I} has been applied (no error) then

P(λLψL)=tr[ΠLψψL]=1P(λUψL)=tr[ΠUψψL]=0P(λRψL)=tr[ΠRψψL]=0,\begin{align*} P(\lambda_L \vert \ket{\psi}_L) &= {\rm tr} \big[ \Pi_L \vert \psi \rangle \langle \psi \vert_L] = 1 \\ P(\lambda_U \vert \ket{\psi}_L) &= {\rm tr} \big[ \Pi_U \vert \psi \rangle \langle \psi \vert_L] = 0 \\ P(\lambda_R \vert \ket{\psi}_L) &= {\rm tr} \big[ \Pi_R \vert \psi \rangle \langle \psi \vert_L] = 0, \end{align*}

meaning one gets the outcome λL\lambda_L with certainty. If instead UU has been applied then

P(λL UψL)=tr[ΠL (UψψLU)]=0P(λU UψL)=tr[ΠU (UψψLU)]=1P(λR UψL)=tr[ΠR (UψψLU)]=0,\begin{align*} P(\lambda_L \vert ~ U \ket{\psi}_L) &= {\rm tr} \big[ \Pi_L ~ (U\vert \psi \rangle \langle \psi \vert_L U^\dagger)] = 0 \\ P(\lambda_U \vert ~ U \ket{\psi}_L) &= {\rm tr} \big[ \Pi_U ~(U\vert \psi \rangle \langle \psi \vert_L U^\dagger)] = 1 \\ P(\lambda_R \vert ~ U \ket{\psi}_L) &= {\rm tr} \big[ \Pi_R ~(U\vert \psi \rangle \langle \psi \vert_L U^\dagger)] = 0, \end{align*}

meaning one gets the outcome λU\lambda_U with certainty. The observable OO therefore allows one to determine which error has occurred with certainty. It fulfils (b) as the

ΠLψψLΠL=ψψL,ΠU(UψψLU)ΠU=UψψLU,\begin{align*} \Pi_L \vert \psi \rangle \langle \psi \vert_L \Pi_L &= \vert \psi \rangle \langle \psi \vert_L, \\ \Pi_U (U\vert \psi \rangle \langle \psi \vert_L U^\dagger) \Pi_U &= U\vert \psi \rangle \langle \psi \vert_L U^\dagger, \end{align*}

meaning the states remain unchanged after the measurements.

The error correcting code can be summarised as follows: if the errors that can occur are {I,U}\{ \mathbb{I}, U \} and the code space is CL\mathfrak{C}_L, then measure the observable OO and if the outcome is λL\lambda_L do nothing, if it is λU\lambda_U apply UU^\dagger.

Multiple Errors

The logic above can be easily expanded to multiple errors. Assume the set of possible errors is {Ui}i=0M\{U_i\}_{i=0}^M, where U0=IU_0=\mathbb{I}. Each error must then map the code space to an orthogonal subspace such that

ΠUjΠUk=δjkΠUj.\Pi_{U_j} \Pi_{U_k} = \delta_{jk} \Pi_{U_j}.

Correctable Errors

A set of unitary errors {Ui}i\{ U_i \}_i, such that all elements of the set

{UiΠLUi}i,\big\{ U_i \Pi_L U_i^\dagger \big\}_i,

are pairwise orthogonal, can therefore be corrected by measuring the non-degenerate operator

O=λi(UiΠLUi).O = \sum \lambda_i (U_i \Pi_L U_i^\dagger).

Given an initial logical state ψL\vert \psi \rangle_L, if one gets the measurement outcome λi\lambda_i they known they have the state UiψLU_i \vert \psi \rangle_L. Hence, by applying the unitary UiU_i they return the logical state without disturbing the encoded information.

Uncorrectable Errors

Now, imagine there exists another unitary error VV, such that

VΠLV=UjΠLUj.V \Pi_L V^\dagger = U_j \Pi_L U_j.

This means that both the errors UjU_j and VV map the code space to the same subspace. If one now measures OO and gets the outcome λj\lambda_j, they will not be able to tell if the error UjU_j or VV has occurred. They will be able to detect the presence of an error, but not necessarily correct it.

Instead, imagine there exists another error that maps the logical space to a subspace that is partly supported in UiΠLUiU_i \Pi_L U_i and partly support in UjΠLUjU_j \Pi_L U_j. A measurement of OO will project the state into either the UiΠLUiU_i \Pi_L U_i subspace or the UjΠLUjU_j \Pi_L U_j. This will alter the logical information in a way that is not recoverable based only the output eigenvalue from measuring OO. Hence, such errors are not correctable, unless there exists some unitary V~\tilde{V} such that V~VψL=ψL\tilde{V}V \vert \psi \rangle_L=\vert \psi \rangle_L and V~UjψL=ψL\tilde{V}U_j \vert \psi \rangle_L=\vert \psi \rangle_L. If so, when the measurement of OO gives the outcome λj\lambda_j, V~\tilde{V} can be applied.

Example

Consider the two qubit repetition code, which has code space

C2=Span{00,11}.\mathfrak{C}_2 = {\rm Span} \{ \ket{00}, \ket{11} \}.

An arbitrary single qubit is therefore encoded as

ψL=α00+β11:α2+β2=1.\vert \psi \rangle_L = \alpha \ket{00} + \beta \ket{11} : \vert \alpha \vert^2 + \vert \beta \vert^2=1.

It can be seen that a single qubit ZZ error on either physical qubit would take the logical state to the same state

Z1ψL=α00β11Z2ψL=α00β11.\begin{split} Z_1 \ket{\psi}_L &= \alpha \ket{00} - \beta \ket{11} \\ Z_2 \ket{\psi}_L &= \alpha \ket{00} - \beta \ket{11}. \end{split}

Therefore, whilst different errors, they can both be corrected via the same unitary. Namely, both can be correct by applying Z1Z_1.

Conclusion

To design an error correcting code for a set of errors, one must be able to find a code space which is mapped to orthogonal subspaces under the action of each error. By measuring the non-degenerate operator with eigenspaces of these orthogonal subspaces, these errors can be corrected.