> anishgoyal โ–ˆ


Notes โ€บ PHYS 3571: Quantum Computing Lecture 8

Error Correction

calendar_today   article 803 words   access_time 6 min   replay Modified

Table of Contents

Errors

Bit Flip

$$\ket{\psi} \approx\frac{\ket{0} + \frac{\theta}{2} \ket{1} }{\sqrt{ 1 + \left( \frac{\theta}{2} \right)^2 } }$$ $$\hat{U}_{\text{partial flip}} = i\cos\left(\frac{\theta}{2}\right)\hat{I} + \sin\left(\frac{\theta}{2}\right)\hat{X}$$
Definition 08.1 (Partial Bit Flip Operator).

Let $\varepsilon = \sin(\theta/2)$, so $\cos(\theta/2) = \sqrt{1 - \varepsilon^2}$. The partial bit flip operator is:

$$i\sqrt{1-\varepsilon^2}\,\hat{I} + \varepsilon\hat{X} = \begin{pmatrix} i\sqrt{1-\varepsilon^2} & \varepsilon \\ \varepsilon & i\sqrt{1-\varepsilon^2} \end{pmatrix}$$
Proposition 08.2 (Action of Partial Bit Flip on Basis States).
$$\ket{0} \to i\sqrt{1-\varepsilon^2}\,\ket{0} + \varepsilon\ket{1}$$$$\ket{1} \to \varepsilon\ket{0} + i\sqrt{1-\varepsilon^2}\,\ket{1}$$
Definition 08.3 (Error Parameter $\varepsilon$).
$$\varepsilon = \sin\left(\frac{\theta}{2}\right)$$

where $\theta$ is the Bloch sphere rotation angle of the partial flip.

  • Small physical disturbance $\implies$ small $\theta$ $\implies$ $\varepsilon \ll 1$
  • $\varepsilon^2$: probability ancilla measurement collapses into error branch
  • $1 - \varepsilon^2$: probability ancilla measurement collapses into no-error branch
Corollary 08.4 (Action on General State).

For $\ket{\psi} = \alpha\ket{0} + \beta\ket{1}$ with $\alpha, \beta \in \mathbb{C}$:

$$\ket{\psi} \to \left(i\sqrt{1-\varepsilon^2}\,\alpha + \varepsilon\beta\right)\ket{0} + \left(\varepsilon\alpha + i\sqrt{1-\varepsilon^2}\,\beta\right)\ket{1}$$

When $\theta = \pi$, $\varepsilon = 1$, recovering the full $\hat{X}$ gate: $\alpha\ket{0}+\beta\ket{1} \to \beta\ket{0}+\alpha\ket{1}$

Phase Flip

Solutions

Problems with Naive Approaches

Error-Correcting Codes

$$\begin{align} \ket{0_{L}} &= \ket{0 \ 0 \ 0} \\ \ket{1_{L}} &= \ket{1 \ 1 \ 1} \\ \ket{\psi_{L}} &=\alpha \ket{0_{L}} + \beta \ket{1_{L}} \end{align}$$
Example 08.5 (Left bit-flip).

Consider a left-qubit bit-flip:

$$\ket{\psi} = \alpha \ket{1 \ 0 \ 0} + \beta \ket{0 \ 1 \ 1}$$

How can we encode the given state?

08 Error Correction 2026-02-19 11.36.08

We know there’s an error if the parity between consecutive qubits differs! This is done by chaining the line with $\ket{\psi}$ to all the other qubits with a CNOT gate (which is like XOR in classical computing).

$$\text{CNOT}(\ket{a}\ket{b}) = \ket{a}\ket{a \oplus b} $$

Ancilla Qubits

08 Error Correction 2026-02-19 12.04.33

Detecting Partial Bit Flip Errors With Ancilla Qubits

$$\ket{00} \otimes \ket{\psi_L} = \ket{00}\left(\alpha\ket{000} + \beta\ket{111}\right)$$ $$\ket{000} = \ket{0}_{\text{flip}}\ket{00} \to \left(i\sqrt{1-\varepsilon^2}\ket{0} + \varepsilon\ket{1}\right)\ket{00} = i\sqrt{1-\varepsilon^2}\ket{000} + \varepsilon\ket{100}$$$$\ket{111} = \ket{1}_{\text{flip}}\ket{11} \to \left(\varepsilon\ket{0} + i\sqrt{1-\varepsilon^2}\ket{1}\right)\ket{11} = \varepsilon\ket{011} + i\sqrt{1-\varepsilon^2}\ket{111}$$ $$\boxed{\ket{\Psi} = i\alpha\sqrt{1-\varepsilon^2}\ket{00}\ket{000} + \alpha\varepsilon\ket{00}\ket{100} + \beta\varepsilon\ket{00}\ket{011} + i\beta\sqrt{1-\varepsilon^2}\ket{00}\ket{111}}$$
Proposition 08.6 (Interpretation of Outcomes).
  • $i\alpha\sqrt{1-\varepsilon^2}\ket{00}\ket{000}$: no error on $\alpha$ branch
  • $\alpha\varepsilon\ket{00}\ket{100}$: first qubit flipped on $\alpha$ branch
  • $\beta\varepsilon\ket{00}\ket{011}$: first qubit flipped on $\beta$ branch
  • $i\beta\sqrt{1-\varepsilon^2}\ket{00}\ket{111}$: no error on $\beta$ branch
  • When $\varepsilon = 1$ (full $\hat{X}$), the no-error terms vanish and full flip is recovered
Proposition 08.7 (Ancilla Measurement Outcomes (First Qubit Partial Flip)).
$a_{01}$ $a_{12}$ Probability Post-measurement $\ket{\psi}$
0 0 $1-\varepsilon^2$ $\alpha\ket{000} + \beta\ket{111}$
0 1 $0$ โ€”
1 0 $\varepsilon^2$ $\alpha\ket{100} + \beta\ket{011}$
1 1 $0$ โ€”
Apply $\hat{X}$ to the first qubit if ancilla reads $\ket{10}$ to recover $\alpha\ket{000}+\beta\ket{111}$.
Proposition 08.8 (Role of Measurement in Error Correction).

The ancilla measurement forces the partial rotation to commit to one of two outcomes:

  • No-error branch ($\ket{00}$): state collapses to $\alpha\ket{000}+\beta\ket{111}$, up to global phase $i\sqrt{1-\varepsilon^2}$, which has no physical consequence
  • Error branch ($\ket{10}$): state collapses to $\alpha\ket{100}+\beta\ket{011}$, corrected by applying $\hat{X}$ to the first qubit

This is why error correction works: measuring the ancilla collapses the superposition into a definite, correctable form without ever revealing $\alpha$ or $\beta$.

Sources

Graph