Notes โบ PHYS 3571: Quantum Computing Lecture 8
Error Correction
803 words 6 min Modified
Table of Contents
Errors
- Kinds of errors
- Bit flip
- Phase flip
- Both error
- Need to use Shor’s Error-correcting code
Bit Flip
- Partial bit flip
- Occurs when one of the points on the Bloch sphere moves towards the other point instead of completely swapping states
- Assuming $\psi$ was unchanged and $\theta$ small:
- To get an exact mapping of how the partial bit flip affects $\ket{\psi}$, we can parameterize the universal gate operator
- Partial bit flip = rotation about the $x$-axis by angle $\theta$, so $\hat{n} = (1, 0, 0)$
- Choose global phase $\alpha = \pi/2$, so the general rotation operator reduces to:
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}$$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
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
- A rotation through angle $\theta$ around the $z$-axis
Solutions
Problems with Naive Approaches
- Can’t use a parity bit because that would require that you measure the physical state of the qubit which would collapse its wave function
- You also can’t copy the state from one qubit to the other because of the
4.4.4 No-Cloning Theorem
[Wong, Introduction to Classical and Quantum Computing, p.ย 177]
Error-Correcting Codes
- Assign 3 logical qubits that we use to encode a real qubit
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?
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
- To carry out error detection in general, we need ancilla qubits
- If both qubits flipped, then the error correction scheme
- Based on the results of the measurement, you apply the rotation (depending on which qubit flipped), then apply a 180 degree rotation to $\theta$, and flip it
Detecting Partial Bit Flip Errors With Ancilla Qubits
- Ancilla qubits initialized to $\ket{00}$, so the full initial state is:
- Apply a partial bit flip to the first (leftmost) logical qubit using Action on General State:
- Applying linearity to the full logical state and tensoring in the ancilla:
- $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
- We can entangle each ancilla qubit with each consecutive pair in the logical qubit to get the following readings
- Ancilla reads $\ket{0 \ 0}$: no error; state collapses to $\alpha \ket{0 \ 0 \ 0} + \beta \ket{1 \ 1 \ 1}$
- Ancilla reads $\ket{1 \ 0}$: first qubit flipped
- Ancilla reads $\ket{1 \ 1}$: second qubit flipped
- Ancilla reads $\ket{0 \ 1}$: third qubit flipped
| $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}$. |
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
- Wong, Introduction to Classical and Quantum Computing