Placement Test Practice — Quantum Physics
Placement Test Practice — Quantum Physics
This comprehensive placement test spans the full arc of quantum physics covered in Lessons 1–14: from the foundational wave-particle duality and uncertainty principle through the mathematical formalism of Hilbert spaces and operators, to the physics of exactly solvable systems (particle in a box, harmonic oscillator, hydrogen atom), the theory of quantum measurement and entanglement, and culminating in quantum information, quantum algorithms, complexity theory, and error correction. The 25 problems are calibrated to PhD-level rigor, requiring both conceptual understanding and facility with calculation.
Work each problem independently before consulting the answer key. Problems 1–8 test foundations; 9–14 test quantum systems; 15–19 test quantum information and entanglement; 20–22 test quantum algorithms; 23–25 test complexity and error correction. Full solutions are provided in the answer key, including derivations where appropriate.
Comprehensive Practice Test — 25 Questions
Show Answer Key
1. $T = 150 \times 1.602\times10^{-19} = 2.403\times10^{-17}$ J. $p = \sqrt{2m_eT} = \sqrt{2 \times 9.11\times10^{-31} \times 2.403\times10^{-17}} = \sqrt{4.378\times10^{-47}} = 6.617\times10^{-24}$ kg·m/s. $\lambda = h/p = 6.626\times10^{-34}/6.617\times10^{-24} = 1.001\times10^{-10}$ m $= 1.00$ Å. (This is the characteristic de Broglie wavelength of electrons in atoms.)
2. (a) $|3/5|^2 + |4/5|^2 = 9/25 + 16/25 = 1$. ✓ (b) $P(|0\rangle) = (3/5)^2 = 9/25 = 0.36$. (c) $\langle Z\rangle = (3/5)^2(+1) + (4/5)^2(-1) = 9/25 - 16/25 = -7/25 = -0.28$. $\langle X\rangle = \langle\psi|X|\psi\rangle$: $X|\psi\rangle = (3/5)|1\rangle + (4/5)|0\rangle$, so $\langle X\rangle = (3/5)(4/5) + (4/5)(3/5) = 24/25 = 0.96$. $\langle Y\rangle = \langle\psi|Y|\psi\rangle$: $Y|\psi\rangle = -i(3/5)|1\rangle + i(4/5)|0\rangle$, so $\langle Y\rangle = (3/5)(i\cdot4/5) + (4/5)(-i\cdot3/5) = 12i/25 - 12i/25 = 0$. Bloch vector: $(0.96, 0, -0.28)$, magnitude $\sqrt{0.96^2 + 0.28^2} = \sqrt{0.9216+0.0784} = 1.0$ ✓ (pure state).
3. Define $|\alpha\rangle = \delta A|\psi\rangle = (A-\langle A\rangle)|\psi\rangle$, $|\beta\rangle = \delta B|\psi\rangle$. Cauchy-Schwarz: $\langle\alpha|\alpha\rangle\langle\beta|\beta\rangle \geq |\langle\alpha|\beta\rangle|^2$. LHS $= (\Delta A)^2(\Delta B)^2$. For RHS: $\langle\alpha|\beta\rangle = \langle\psi|\delta A \cdot \delta B|\psi\rangle = \frac{1}{2}\langle[\delta A,\delta B]\rangle + \frac{1}{2}\langle\{\delta A,\delta B\}\rangle$. The anticommutator $\langle\{\delta A,\delta B\}\rangle$ is real (Hermitian); commutator $\langle[\delta A,\delta B]\rangle = \langle[A,B]\rangle$ is purely imaginary. So $|\langle\alpha|\beta\rangle|^2 \geq \frac{1}{4}|\langle[A,B]\rangle|^2$. Therefore $(\Delta A)^2(\Delta B)^2 \geq \frac{1}{4}|\langle[A,B]\rangle|^2$, giving $\Delta A\Delta B \geq \frac{1}{2}|\langle[A,B]\rangle|$. For $[\hat{x},\hat{p}] = i\hbar$: $\Delta x\Delta p \geq \hbar/2$. ✓
4. $\hat{a} = (\hat{x}/x_0 + i\hat{p}/p_0)/\sqrt{2}$, $\hat{a}^\dagger = (\hat{x}/x_0 - i\hat{p}/p_0)/\sqrt{2}$. $[\hat{a},\hat{a}^\dagger] = [(\hat{x}/x_0+i\hat{p}/p_0),(\hat{x}/x_0-i\hat{p}/p_0)]/2 = \frac{1}{2}[-i\hat{x}\hat{p}/(x_0p_0) + i\hat{p}\hat{x}/(x_0p_0) - (-i\hat{p}\hat{x}/(x_0p_0) + i\hat{x}\hat{p}/(x_0p_0))]$. Expanding: $= \frac{1}{2} \times \frac{-2i[\hat{x},\hat{p}]}{x_0 p_0} = \frac{-2i(i\hbar)}{2 x_0 p_0} = \frac{\hbar}{x_0 p_0}$. Since $x_0 p_0 = \sqrt{\hbar/m\omega}\sqrt{m\hbar\omega} = \hbar$: $[\hat{a},\hat{a}^\dagger] = 1$. ✓
5. $H = \begin{pmatrix}\epsilon & \Delta \\ \Delta & -\epsilon\end{pmatrix}$. Eigenvalues: $\det(H-\lambda I)=0 \Rightarrow (\epsilon-\lambda)(-\epsilon-\lambda)-\Delta^2=0 \Rightarrow \lambda^2 = \epsilon^2+\Delta^2$. So $\lambda_\pm = \pm\sqrt{\epsilon^2+\Delta^2} \equiv \pm E$. Eigenvectors: for $\lambda_+ = E$: $(H-EI)|v\rangle=0 \Rightarrow |v_+\rangle = \cos(\phi/2)|0\rangle + \sin(\phi/2)|1\rangle$ where $\tan\phi = \Delta/\epsilon$. For $\lambda_- = -E$: $|v_-\rangle = \sin(\phi/2)|0\rangle - \cos(\phi/2)|1\rangle$. Physical interpretation: $\epsilon$ splits the bare levels; $\Delta$ causes hybridization (avoided crossing). Ground state is the lower level at $-E$ — a superposition of $|0\rangle$ and $|1\rangle$ when $\Delta \neq 0$.
6. Spectral theorem: every Hermitian operator $A$ on a finite-dimensional Hilbert space has real eigenvalues and a complete orthonormal basis of eigenvectors. Decomposition: $A = (+1)|+\rangle\langle+| + (-1)|-\rangle\langle-|$. By functional calculus: $f(A) = f(+1)|+\rangle\langle+| + f(-1)|-\rangle\langle-|$. So $e^{i\theta A} = e^{i\theta}|+\rangle\langle+| + e^{-i\theta}|-\rangle\langle-| = \cos\theta(|+\rangle\langle+|+|-\rangle\langle-|) + i\sin\theta(|+\rangle\langle+|-|-\rangle\langle-|) = \cos\theta \cdot I + i\sin\theta \cdot A$. This is the quantum analog of Euler's formula and applies to any involutory Hermitian operator with eigenvalues $\pm1$.
7. $i\hbar\partial_t|\psi\rangle = H|\psi\rangle$ with time-independent $H$ has solution $|\psi(t)\rangle = e^{-iHt/\hbar}|\psi(0)\rangle$. With $H = \omega Z/2$: $e^{-i\omega Zt/(2\hbar)} = \cos(\omega t/2)I - i\sin(\omega t/2)Z$ (using spectral theorem with eigenvalues $\pm1/2$ times $\hbar\omega$... more precisely, $H|0\rangle = (\omega\hbar/2)|0\rangle$, $H|1\rangle = -(\omega\hbar/2)|1\rangle$). So $e^{-iHt/\hbar}|0\rangle = e^{-i\omega t/2}|0\rangle$, $e^{-iHt/\hbar}|1\rangle = e^{i\omega t/2}|1\rangle$. Starting from $|+\rangle_X = (|0\rangle+|1\rangle)/\sqrt{2}$: $|\psi(t)\rangle = (e^{-i\omega t/2}|0\rangle + e^{i\omega t/2}|1\rangle)/\sqrt{2}$. This traces a circle in the $XY$ plane of the Bloch sphere — Larmor precession.
8. (a) $\text{Tr}(\mathcal{E}(\rho)) = (1-p)\text{Tr}(\rho) + \frac{p}{3}(\text{Tr}(X\rho X)+\text{Tr}(Y\rho Y)+\text{Tr}(Z\rho Z)) = (1-p)\cdot1+\frac{p}{3}\cdot3\cdot1 = 1$. ✓ (Used cyclicity of trace.) (b) $|+\rangle = (|0\rangle+|1\rangle)/\sqrt{2}$, Bloch vector $\vec{r} = (1,0,0)$. Depolarizing channel maps $\vec{r} \to (1-4p/3)\vec{r}$. At $p$: $|\vec{r}'| = 1-4p/3$. For Bloch vector magnitude to be computed: $X\rho X$ for $\rho = |+\rangle\langle+|$: $X|+\rangle = |+\rangle$, so $X\rho X = \rho$. $Y|+\rangle = i|-\rangle$, $Y\rho Y = |-\rangle\langle-|$. $Z|+\rangle = |-\rangle$, $Z\rho Z = |-\rangle\langle-|$. $\mathcal{E}(\rho) = (1-p)|+\rangle\langle+| + \frac{p}{3}(|+\rangle\langle+| + 2|-\rangle\langle-|) = (1-2p/3)|+\rangle\langle+| + (2p/3)|-\rangle\langle-| = \frac{1}{2}I + (1-4p/3)\frac{X}{2}$. Bloch vector: $(1-4p/3, 0, 0)$; magnitude $|1-4p/3|$.
9. (a) $\psi_n(x) = \sqrt{2/L}\sin(n\pi x/L)$, $E_n = n^2\pi^2\hbar^2/(2mL^2)$. (b) Use product-to-sum: $\sin(2\pi x/L)\cos(\pi x/L) = \frac{1}{2}[\sin(3\pi x/L) + \sin(\pi x/L)]$. So $\psi(x) = \sqrt{2/L}\times\frac{1}{2}[\sin(3\pi x/L)+\sin(\pi x/L)] = \frac{1}{2}\psi_3(x) + \frac{1}{2}\psi_1(x)$. But normalization: $(1/2)^2+(1/2)^2 = 1/2 \neq 1$. Correct: $\psi(x) = \sqrt{2/L}\sin(2\pi x/L)\cos(\pi x/L) = (1/\sqrt{L})[\sin(3\pi x/L)+\sin(\pi x/L)]$. Normalized: $c_1 = c_3 = 1/\sqrt{2}$. Check: $\int_0^L|\psi|^2dx = \frac{1}{L}\int_0^L[\sin^2(3\pi x/L)+\sin^2(\pi x/L)+2\sin(3\pi x/L)\sin(\pi x/L)]dx = \frac{1}{L}[\frac{L}{2}+\frac{L}{2}+0] = 1$. ✓ Probabilities: $P(E_1) = |c_1|^2 = 1/2$; $P(E_3) = |c_3|^2 = 1/2$.
10. (a) $[H,\hat{a}] = \hbar\omega[\hat{a}^\dagger\hat{a},\hat{a}] = \hbar\omega(\hat{a}^\dagger[\hat{a},\hat{a}]+[\hat{a}^\dagger,\hat{a}]\hat{a}) = \hbar\omega(0 + (-1)\hat{a}) = -\hbar\omega\hat{a}$. This means if $H|n\rangle = E_n|n\rangle$, then $H(\hat{a}|n\rangle) = \hat{a}H|n\rangle + [H,\hat{a}]|n\rangle = (E_n - \hbar\omega)\hat{a}|n\rangle$ — confirming $\hat{a}|n\rangle \propto |n-1\rangle$ with energy $E_n - \hbar\omega$. (b) $\hat{x} = x_0(\hat{a}+\hat{a}^\dagger)/\sqrt{2}$, so $\hat{x}^2 = x_0^2(\hat{a}^2+\hat{a}^\dagger\hat{a}+\hat{a}\hat{a}^\dagger+\hat{a}^{\dagger2})/2$. $\langle 0|\hat{x}^2|0\rangle = x_0^2\langle 0|(\hat{a}\hat{a}^\dagger)|0\rangle/2 = x_0^2\langle 0|(1+\hat{N})|0\rangle/2 = x_0^2/2 = \hbar/(2m\omega)$. $\langle H\rangle = \hbar\omega(\langle N\rangle+1/2) = \hbar\omega(0+1/2) = \hbar\omega/2$. ✓
11. (a) $E_n = -13.6\text{ eV}/n^2$. For $2p$: $n=2$, $\ell=1$, $m_\ell \in \{-1,0,+1\}$, $m_s = \pm1/2$. Total $2p$ states: $3\times2=6$. (b) Electric dipole: photon has spin 1 ($\hbar$ angular momentum). Conservation: $\Delta\ell = \pm1$ (absorb/emit photon angular momentum), $\Delta m_\ell = 0,\pm1$ (conservation of $z$-component). $2s \to 1s$: $\Delta\ell = 0$, violates $\Delta\ell = \pm1$ — forbidden. (c) H-alpha ($n=3\to2$): $E = 13.6(1/4-1/9)= 13.6\times5/36 = 1.889$ eV. $\lambda = hc/E = (1240\text{ eV·nm})/1.889 = 656.5$ nm. (Red line of Balmer series.) ✓
12. (a) $U(t) = e^{i\omega_0 Zt/2}$, so $|\psi(t)\rangle = (e^{i\omega_0t/2}|0\rangle+e^{-i\omega_0t/2}|1\rangle)/\sqrt{2}$. (b) $\langle S_x\rangle = \frac{\hbar}{2}\langle X\rangle = \frac{\hbar}{2}\cos(\omega_0 t)$. $\langle S_y\rangle = \frac{\hbar}{2}\langle Y\rangle = \frac{\hbar}{2}(-\sin\omega_0 t)$... More carefully: $\langle X\rangle(t) = \text{Re}[e^{i\omega_0 t}] = \cos(\omega_0 t)$; $\langle Y\rangle(t) = \sin(\omega_0 t)$ (from Heisenberg picture $dS_x/dt = \omega_0 S_y$); $\langle Z\rangle(t) = 0$ (no $z$-component). (c) The Bloch vector $(\cos\omega_0 t, \sin\omega_0 t, 0)$ rotates in the $XY$ plane at angular frequency $\omega_0 = \gamma B_0$ — this is Larmor precession, the classical gyroscopic precession of a magnetic moment in a field, perfectly reproduced by the quantum spin dynamics.
13. (a) $|\Phi^+\rangle\langle\Phi^+| = \frac{1}{2}(|00\rangle\langle00| + |00\rangle\langle11| + |11\rangle\langle00| + |11\rangle\langle11|)$. $\rho_A = \text{Tr}_B(\cdot) = \frac{1}{2}(\langle0|\cdot|0\rangle_B + \langle1|\cdot|1\rangle_B) = \frac{1}{2}(|0\rangle\langle0| + |1\rangle\langle1|) = \frac{I}{2}$. (b) Eigenvalues of $\rho_A = I/2$: both $1/2$. $S = -2\times(1/2)\log_2(1/2) = -2\times(-1/2) = 1$ ebit. (c) $S(\rho_A) = 1$ bit is the maximum possible entropy for a qubit — maximum entanglement. The mixed state of $A$ alone ($I/2$) means Alice has no information about her qubit's state independently; all information is encoded in the correlations with Bob.
14. (a) For deterministic LHV: each $A_i, B_j \in \{+1,-1\}$. $\mathcal{B} = A_1(B_1+B_2)+A_2(B_1-B_2)$. If $B_1=B_2$: $B_1-B_2=0$, $\mathcal{B}=2A_1B_1=\pm2$. If $B_1=-B_2$: $B_1+B_2=0$, $\mathcal{B}=2A_2B_1=\pm2$. So $|\mathcal{B}|\leq2$ always. For mixed strategies: $|\langle\mathcal{B}\rangle|\leq2$ by linearity. (b) Quantum: choose $a_1=0,a_2=\pi/2,b_1=\pi/4,b_2=-\pi/4$. For $|\Phi^+\rangle$: $\langle A_iB_j\rangle = \cos(a_i-b_j)$. $\langle A_1B_1\rangle=\cos(-\pi/4)=1/\sqrt{2}$; $\langle A_1B_2\rangle=\cos(\pi/4)=1/\sqrt{2}$; $\langle A_2B_1\rangle=\cos(\pi/4)=1/\sqrt{2}$; $\langle A_2B_2\rangle=\cos(3\pi/4)=-1/\sqrt{2}$. $\langle\mathcal{B}\rangle=1/\sqrt{2}+1/\sqrt{2}+1/\sqrt{2}-(-1/\sqrt{2})=4/\sqrt{2}=2\sqrt{2}\approx2.83>2$. ✓ CHSH violated.
15. (a) $|\psi\rangle_1|\Phi^+\rangle_{23} = (\alpha|0\rangle_1+\beta|1\rangle_1)\frac{1}{\sqrt{2}}(|00\rangle+|11\rangle)_{23}$. Expand and rewrite qubits 1,2 in Bell basis: $|\Phi^+\rangle_{12}\frac{\alpha|0\rangle+\beta|1\rangle}{1}$, $|\Phi^-\rangle_{12}\frac{\alpha|0\rangle-\beta|1\rangle}{1}$, $|\Psi^+\rangle_{12}\frac{\alpha|1\rangle+\beta|0\rangle}{1}$, $|\Psi^-\rangle_{12}\frac{\alpha|1\rangle-\beta|0\rangle}{1}$ — each with probability $1/4$. (b) Alice measures in Bell basis (2 bits of outcome); Bob's qubit is already in $\{|\psi\rangle, Z|\psi\rangle, X|\psi\rangle, XZ|\psi\rangle\}$ respectively. Bob applies corresponding correction ($I,Z,X,ZX$) to recover $|\psi\rangle$. No quantum channel needed — only 2 classical bits.
16. (a) $\text{QFT}_4|2\rangle = \frac{1}{2}\sum_{k=0}^{3}e^{2\pi i\cdot2k/4}|k\rangle = \frac{1}{2}\sum_k i^{2k}|k\rangle = \frac{1}{2}\sum_k(-1)^k|k\rangle = \frac{1}{2}(|0\rangle-|1\rangle+|2\rangle-|3\rangle)$. (b) $n=2$: $n(n+1)/2 = 3$ gates ($H_1$, $CR_2(q_2\to q_1)$, $H_2$) plus SWAP. Circuit: $H$ on $q_1$; controlled-$R_2$ with $q_2$ control, $q_1$ target; $H$ on $q_2$; SWAP $q_1,q_2$. (c) $\text{QFT}_{N}^\dagger\text{QFT}_N$: $(k,j)$ entry $= \frac{1}{N}\sum_{l=0}^{N-1}e^{-2\pi ikl/N}e^{2\pi ijl/N} = \frac{1}{N}\sum_l e^{2\pi i(j-k)l/N} = \delta_{jk}$. ✓
17. (a) Powers of 2 mod 35: $2^0=1,2^1=2,2^2=4,2^3=8,2^4=16,2^5=32,2^6=64\bmod35=29,2^7=58\bmod35=23,2^8=46\bmod35=11,2^9=22,2^{10}=44\bmod35=9,2^{11}=18,2^{12}=36\bmod35=1$. Period $r=12$. (b) $a^{r/2}=2^6=64\bmod35=29$. $29\not\equiv-1\equiv34\pmod{35}$. ✓ $\gcd(29-1,35)=\gcd(28,35)=7$. $\gcd(29+1,35)=\gcd(30,35)=5$. (c) $35 = 5\times7$. ✓
18. (a) $\sin\theta = 1/\sqrt{256} = 1/16$. $\theta = \arcsin(1/16) \approx 0.06253$ rad. (b) $k^* = \lfloor\pi/(4\times0.06253)\rfloor = \lfloor12.57\rfloor = 12$ iterations. (c) $P_{12} = \sin^2(25\theta) = \sin^2(25\times0.06253) = \sin^2(1.563) \approx \sin^2(89.6°) \approx 0.99998$. (d) Classical average: $128$ queries. Quantum: $12$ iterations. Speedup $\approx 128/12 \approx 10.7 \approx \sqrt{N}/4\times\pi = \sqrt{256}/4\times\pi/1 \approx 4\pi \approx 12.6$. Quadratic: $\sqrt{256} = 16$-fold improvement in queries.
19. (a) $p \approx t_g/T_2 = 50\times10^{-9}/100\times10^{-6} = 5\times10^{-4}$. (b) $(1-5\times10^{-4})^{500} = (0.9995)^{500} \approx e^{-0.25} \approx 0.779$. About $22\%$ chance of at least one error in 500 gates. (c) $p = 5\times10^{-4} < p_{th} = 10^{-3}$. The physical error rate is below threshold — error-correcting codes would suppress errors if used. However, without error correction, a 500-gate circuit still has $\sim22\%$ failure probability.
20. (a) In BQP, not known in P: (1) Integer factoring (Shor's algorithm). (2) Computing discrete logarithms in finite groups. (3) Quantum simulation (sampling from quantum circuit output distributions). (b) Believed in NP but not BQP: (1) NP-complete problems like 3-SAT or Graph 3-Coloring. (2) The Traveling Salesman Problem (optimization). (c) $P \subseteq BPP$: proven (P is a special case of BPP with $p=0$). $BPP \subseteq BQP$: proven (quantum can simulate classical probabilistic algorithms). $BQP \subseteq PSPACE$: proven (quantum circuits of polynomial size can be simulated in polynomial space). $P \subsetneq PSPACE$: proven (Savitch/hierarchy theorems). $P \subsetneq NP$: open (the P vs NP problem). $NP$ vs $BQP$: open; most believe $NP \not\subseteq BQP$.
21. (a) The 3-qubit bit-flip code corrects single-qubit $X$ (bit-flip) errors. But here errors are $Z$ type — the bit-flip code does NOT correct $Z$ errors! However, interpreting: if the error is actually bit-flip $X$ with $p=0.1$: (b) Success = at most 1 qubit error. $P(\text{0 errors}) = (0.9)^3 = 0.729$. $P(\text{exactly 1 error}) = \binom{3}{1}(0.1)(0.9)^2 = 0.243$. $P(\text{success}) = 0.729+0.243 = 0.972$. (c) Uncoded: single qubit fails with $p=0.1$. Coded: failure probability $= P(\geq2 \text{ errors}) = 1-0.972 = 0.028$. The code reduces failure rate from $10\%$ to $2.8\%$ — a $3.6\times$ improvement at this error rate (though modest; at lower $p$, improvement is much larger).
22. (a) $e^{-i\theta Y_1/2}|0\rangle_1 = \cos(\theta/2)|0\rangle - \sin(\theta/2)|1\rangle$. State: $(\cos(\theta/2)|0\rangle_1 - \sin(\theta/2)|1\rangle_1)|0\rangle_2 = \cos(\theta/2)|00\rangle - \sin(\theta/2)|10\rangle$. (b) $\langle Z_1Z_2\rangle = \langle\psi|Z_1Z_2|\psi\rangle$: $Z_1Z_2|00\rangle = |00\rangle$, $Z_1Z_2|10\rangle = -|10\rangle$. $\langle Z_1Z_2\rangle = \cos^2(\theta/2)\times1 + \sin^2(\theta/2)\times(-1) = \cos\theta$. $\langle X_1\rangle = \langle\psi|X_1|\psi\rangle$: $X_1|00\rangle = |10\rangle$, $X_1|10\rangle=|00\rangle$. $\langle X_1\rangle = 2\times(-\cos(\theta/2)\sin(\theta/2)) = -\sin\theta$. $\langle X_2\rangle = \langle\psi|X_2|\psi\rangle$: $X_2|00\rangle=|01\rangle$, $X_2|10\rangle=|11\rangle$ — both orthogonal to $|\psi\rangle$. $\langle X_2\rangle = 0$. Total: $E(\theta) = \cos\theta - 0.5\sin\theta$. (c) $dE/d\theta = -\sin\theta - 0.5\cos\theta = 0 \Rightarrow \tan\theta = -0.5 \Rightarrow \theta = \pi - \arctan(0.5) \approx 2.678$ rad (second quadrant for minimum). $E_{\min} = -\sqrt{1+0.25} = -\sqrt{1.25} \approx -1.118$.
23. (a) $[[5,1,3]]$: 5 physical qubits, 1 logical qubit, distance 3 (corrects 1 error). It is the unique perfect single-error-correcting code and the smallest possible code correcting all single-qubit errors. (b) $g_1 = XZZXI$ and $g_2 = IXZZX$: check commutation position-by-position. Pos 1: $X$ vs $I$ — commute. Pos 2: $Z$ vs $X$ — anticommute. Pos 3: $Z$ vs $Z$ — commute. Pos 4: $X$ vs $Z$ — anticommute. Pos 5: $I$ vs $X$ — commute. Two anticommutations: $(-1)^2 = +1$, so $[g_1,g_2]=0$. ✓ (c) $Y_1 = iX_1Z_1$; check vs each generator. $g_1 = X_1ZZX_1I_5$: position 1: $X_1$ vs $X_1$ (from $X$ part of $Y_1$) — commute; $X_1$ vs $Z_1$ (from $Z$ part) — anticommute. Net: anticommute. Syndrome bit $s_1=1$. Similarly compute $s_2,s_3,s_4$ from $g_2,g_3,g_4$. The full syndrome $(1,0,1,0)$ uniquely identifies $Y_1$ error (all 15 single-qubit errors have distinct syndromes in the $[[5,1,3]]$ code). Correction: apply $Y_1$ to qubit 1.
24. (a) Distance-3 surface code: $d^2 = 9$ data qubits. Ancilla qubits: $(d-1)^2 = 4$ for $X$ stabilizers and $(d-1)^2 = 4$ for $Z$ stabilizers = 8 ancilla. Total: $9 + 8 = 17$ physical qubits. (b) $p_L = (p/p_{th})^2 = (5\times10^{-3}/10^{-2})^2 = (0.5)^2 = 0.25$. Wait — this seems too high. For $d=3$, $\lceil d/2\rceil = 2$: $p_L \approx (0.5)^2 = 0.25$. This illustrates that $d=3$ is barely above threshold and provides minimal protection at $p = p_{th}/2$. (c) Uncoded physical error rate: $p = 5\times10^{-3} = 0.5\%$. Logical error rate $p_L = 25\%$ — dramatically worse! This shows that at $p = p_{th}/2$, even the $d=3$ code is marginal. Distance $d=7$ at the same $p$: $p_L = (0.5)^4 = 6.25\times10^{-2}$ — better than uncoded but still poor. Need $d \geq 11$ for $p_L < p$ in this regime.
25. (a) $H = -J(X_1X_2+Y_1Y_2+Z_1Z_2)$. Compute $H|S\rangle = -J(X_1X_2+Y_1Y_2+Z_1Z_2)\frac{|01\rangle-|10\rangle}{\sqrt{2}}$. $X_1X_2|01\rangle = X_1|00\rangle... $ wait: $X_1X_2|01\rangle = |10\rangle$; $X_1X_2|10\rangle = |01\rangle$. So $X_1X_2|S\rangle = (|10\rangle-|01\rangle)/\sqrt{2} = -|S\rangle$. $Y_1Y_2|01\rangle$: $Y|0\rangle = i|1\rangle$, $Y|1\rangle=-i|0\rangle$. $Y_1Y_2|01\rangle = i|1\rangle\otimes(-i)|0\rangle = |10\rangle$. $Y_1Y_2|10\rangle = (i|1\rangle\otimes... )$: $Y|1\rangle=-i|0\rangle$, $Y|0\rangle=i|1\rangle$: $Y_1Y_2|10\rangle = (-i|0\rangle)(i|1\rangle) = |01\rangle$. $Y_1Y_2|S\rangle = (|10\rangle-|01\rangle)/\sqrt{2} = -|S\rangle$. $Z_1Z_2|01\rangle = |0\rangle(-|1\rangle) = -|01\rangle$. Wait: $Z|1\rangle = -|1\rangle$, so $Z_1Z_2|01\rangle = Z_1|0\rangle Z_2|1\rangle = |0\rangle(-|1\rangle) = -|01\rangle$. $Z_1Z_2|10\rangle = (-|1\rangle)(|0\rangle) = -|10\rangle$. $Z_1Z_2|S\rangle = (-|01\rangle-(-|10\rangle))/... = (-|01\rangle+|10\rangle)/\sqrt{2} = -|S\rangle$. Total: $H|S\rangle = -J(-1-1-1)|S\rangle = 3J|S\rangle$... correction: $H|S\rangle = -J[(-1)+(-1)+(-1)]|S\rangle = -J\times(-3)|S\rangle = 3J|S\rangle$. Eigenvalue $+3J$? That would be ground state for $J<0$ (antiferromagnet). For $J>0$ (ferromagnet), triplet $|T_+\rangle = |00\rangle$ has $H|T_+\rangle = -J(X_1X_2+Y_1Y_2+Z_1Z_2)|00\rangle$: $X_1X_2|00\rangle=|11\rangle$; $Y_1Y_2|00\rangle=(i|1\rangle)(i|1\rangle)=-|11\rangle$; $Z_1Z_2|00\rangle=|00\rangle$. $H|T_+\rangle = -J(|11\rangle-|11\rangle+|00\rangle) = -J|00\rangle = -J|T_+\rangle$. Eigenvalue $-J$. Singlet: $H|S\rangle = 3J|S\rangle$. For $J>0$: triplet ($E=-J$) is lower than singlet ($E=3J$). For $J<0$ (antiferromagnet, e.g. $J=-|J|$): singlet energy $= 3J = -3|J|$ is lower — ground state. (b) Singlet-triplet gap: $|E_S - E_T| = |3J-(-J)| = 4|J|$. (c) In a singlet-triplet qubit (used in spin qubits): the singlet $|S\rangle$ and one triplet ($|T_0\rangle$) form the qubit space. Phonon decoherence drives spin-orbit coupling mixing $|S\rangle$ and $|T\rangle$ states; hyperfine coupling with nuclear spins is the dominant dephasing mechanism (timescale $T_2^* \sim 10$ ns in GaAs, extended to $\sim 200\,\mu$s with dynamical decoupling). The singlet is preferred because it has total spin 0: robust against uniform magnetic field fluctuations (field affects both spins equally, global phase only, no dephasing). The singlet-triplet gap $4J$ protects against low-frequency charge noise.