Exercises: Chapter 22 — Why Quantum Error Correction Is Necessary: Decoherence, Gate Errors, and the Fragility of Quantum Information
Exercise 22.1: Kraus Operator Verification
Verify that the amplitude damping Kraus operators satisfy the completeness relation $\sum_k E_k^\dagger E_k = I$. Compute the action of the amplitude damping channel on the density matrix $\rho = |1\rangle\langle 1|$ and show that the population of $|1\rangle$ decays as $(1-\gamma)$. What is the purity $\text{Tr}(\rho^2)$ as a function of $\gamma$?
Exercise 22.2: Depolarizing Channel Purity
A qubit initially in the pure state $|+\rangle = (|0\rangle + |1\rangle)/\sqrt{2}$ is subjected to a depolarizing channel with probability $p$. Compute the purity $\text{Tr}(\rho^2)$ of the output state as a function of $p$. At what value of $p$ does the purity drop below 0.6? What is the purity at $p = 3/4$?
Exercise 22.3: $T_1$ and $T_2$ from Master Equation
Solve the Lindblad master equation for a single qubit with $H = 0$, $L_1 = \sqrt{\gamma_1} |0\rangle\langle 1|$, and $L_2 = \sqrt{\gamma_\phi/2} Z$. Derive the time evolution of the density matrix elements $\rho_{00}(t)$, $\rho_{11}(t)$, and $\rho_{01}(t)$. Express $T_1$ and $T_2$ in terms of $\gamma_1$ and $\gamma_\phi$.
Exercise 22.4: Gate Infidelity Calculation
Using Qiskit's average_gate_fidelity function, compute the infidelity of a noisy CNOT gate where each qubit independently experiences a depolarizing channel with $p = 0.01$ before and after the ideal CNOT. Compare with the approximation $1 - F_{\text{avg}} \approx \frac{4}{5} \cdot 2p$ for small $p$.
Exercise 22.5: Threshold Theorem Scaling
Suppose a quantum error correcting code suppresses the logical error rate from $p$ to $c p^2$ for some constant $c$. If $p = 10^{-3}$ and $c = 100$, how many levels of concatenation are needed to achieve a logical error rate below $10^{-15}$? What is the corresponding qubit overhead if each level multiplies the qubit count by a factor of 7 (as in the Steane code)?
Exercise 22.6: Error Propagation Through Circuits
Consider the circuit $|0\rangle \xrightarrow{H} \xrightarrow{R_Z(\theta)} \xrightarrow{\text{CNOT}} \xrightarrow{R_X(\phi)}$. If a $Z$ error occurs on the control qubit between the Hadamard and the CNOT, trace the error through the remaining gates. What is the final error (expressed as Pauli operators on the two output qubits)?
Exercise 22.7: Composition of Depolarizing Channels
Prove that the composition of two single-qubit depolarizing channels with parameters $p_1$ and $p_2$ is a depolarizing channel with parameter $p = p_1 + p_2 - \frac{4}{3}p_1 p_2$. Show that for $p_1, p_2 \ll 1$, this reduces to $p \approx p_1 + p_2$.
Exercise 22.8: Bloch Sphere Visualization
Simulate the action of the depolarizing channel, amplitude damping channel, and phase damping channel on the state $|+\rangle$ for $p$ (or $\gamma$) ranging from 0 to 1. Plot the trajectory of the Bloch vector for each channel. Which channels are unital? Which shrink the Bloch sphere symmetrically?
Exercise 22.9: Error Budget for a Quantum Algorithm
A quantum algorithm requires 50 logical qubits, 10,000 logical CNOT gates, and 1,000 logical measurements. If the target logical error rate is $\epsilon_L = 10^{-6}$, and the surface code with threshold $p_{\text{th}} = 1\%$ is used, estimate: (a) the required code distance, (b) the number of physical qubits per logical qubit, (c) the total number of physical qubits, and (d) the total number of physical gate operations.
Exercise 22.10: No-Cloning Theorem Proof Variants
(a) Prove the no-cloning theorem using the linearity of quantum mechanics (the original Wootters-Zurek proof). (b) Prove it using the unitarity of quantum mechanics. (c) Show that approximate cloning (creating a state close to $|\psi\rangle^{\otimes 2}$) is possible but with fidelity at most $5/6$ for arbitrary inputs (Bužek-Hillery universal cloning machine).
Exercise 22.11: Simulating Noise Channels on the Bloch Sphere
Write a Python/Qiskit program that simulates the action of the bit flip, phase flip, depolarizing, amplitude damping, and phase damping channels on the state $|+\rangle$ for parameter values $p \in \{0, 0.1, 0.2, ..., 1.0\}$. For each channel and each $p$, compute: (a) the purity $\text{Tr}(\rho^2)$, (b) the fidelity with the original state, and (c) the length of the Bloch vector $|\vec{r}| = \sqrt{\langle X\rangle^2 + \langle Y\rangle^2 + \langle Z\rangle^2}$. Plot the Bloch vector trajectory for each channel. Which channels are unital (Bloch sphere shrinks uniformly toward origin)? Which are non-unital (Bloch sphere shifts off-center)?
Exercise 22.12: Error Propagation Through a Quantum Circuit
Consider a 4-qubit circuit that prepares a GHZ-like state:
$$|0000\rangle \xrightarrow{H_0} \xrightarrow{\text{CNOT}_{0,1}} \xrightarrow{\text{CNOT}_{1,2}} \xrightarrow{\text{CNOT}_{2,3}}$$
(a) If a $Z$ error occurs on qubit 1 between $\text{CNOT}_{0,1}$ and $\text{CNOT}_{1,2}$, trace the error through the remaining CNOT gates. Express the final error as a tensor product of Pauli operators on all four qubits.
(b) If an $X$ error occurs on qubit 0 between $\text{CNOT}_{0,1}$ and $\text{CNOT}_{1,2}$, what is the final error? Compare the "spread" of the error to part (a) and explain why $X$ errors and $Z$ errors propagate differently through CNOT chains.
(c) How many independent single-qubit error locations does this circuit have? If each error location has probability $\epsilon$ of an error, what is the probability that the circuit produces a correct output?
Exercise 22.13: Leakage Error Rate Budget
A superconducting transmon qubit has a leakage probability of $L_{2q} = 5 \times 10^{-3}$ per two-qubit gate and $L_{1q} = 10^{-4}$ per single-qubit gate. The relaxation rate from $|2\rangle$ to $|1\rangle$ is $\Gamma_{21} = 2/T_1$ (enhanced by the matrix element factor of 2). The error correction cycle takes time $t_{\text{EC}} = 1\,\mu\text{s}$.
(a) What is the probability that a leaked qubit relaxes back to $|1\rangle$ during one error correction cycle? (Use $T_1 = 200\,\mu\text{s}$.)
(b) If a leaked qubit is not explicitly detected and corrected, and it participates in two CNOT gates per cycle, what is the probability that it causes an error on a neighboring qubit through a CNOT while leaked?
(c) A leakage reduction unit (LRU) is applied every cycle. If the LRU has a 99% probability of returning a leaked qubit to the computational subspace, what is the steady-state leakage rate? Compare this to the case without LRUs.
(d) Discuss: Does the leakage rate need to be below the Pauli error threshold for fault-tolerant quantum computation, or can it be higher? Explain your reasoning.