Training Quantum Physics Placement Test Practice — Quantum Physics
15 / 15

Placement Test Practice — Quantum Physics

45 min 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.

Quick Reference: Key Quantum Physics Equations
de Broglie wavelength:$\lambda = h/p$
Heisenberg uncertainty:$\Delta x \Delta p \geq \hbar/2$
QHO energy levels:$E_n = \hbar\omega(n + 1/2),\ n=0,1,2,\ldots$
Hydrogen energy levels:$E_n = -13.6\text{ eV}/n^2,\ n=1,2,3,\ldots$
Grover optimal iterations:$k^* \approx (\pi/4)\sqrt{N}$

Comprehensive Practice Test — 25 Questions

1. An electron has kinetic energy $T = 150$ eV. Compute its de Broglie wavelength $\lambda = h/p$. Use $m_e = 9.11 \times 10^{-31}$ kg, $h = 6.626 \times 10^{-34}$ J·s, $1\text{ eV} = 1.602 \times 10^{-19}$ J.
2. A particle is prepared in state $|\psi\rangle = \frac{3}{5}|0\rangle + \frac{4}{5}|1\rangle$ in the $Z$-basis. (a) Verify normalization. (b) What is the probability of measuring $|0\rangle$? (c) Compute $\langle Z \rangle$, $\langle X \rangle$, and $\langle Y \rangle$.
3. State and derive the Heisenberg uncertainty principle $\Delta A \Delta B \geq \frac{1}{2}|\langle[A,B]\rangle|$ from the Cauchy-Schwarz inequality applied to $|\alpha\rangle = (A - \langle A\rangle)|\psi\rangle$ and $|\beta\rangle = (B - \langle B\rangle)|\psi\rangle$. Apply to position $\hat{x}$ and momentum $\hat{p}$.
4. Compute the commutator $[\hat{a}, \hat{a}^\dagger]$ where $\hat{a} = (\hat{x}/x_0 + i\hat{p}/p_0)/\sqrt{2}$ are the harmonic oscillator ladder operators, $x_0 = \sqrt{\hbar/m\omega}$, $p_0 = \sqrt{m\hbar\omega}$. Use $[\hat{x}, \hat{p}] = i\hbar$.
5. The Hamiltonian of a two-level system is $H = \epsilon\, Z + \Delta\, X$ where $\epsilon, \Delta$ are real. Find the eigenvalues and eigenvectors. Interpret $\epsilon$ as an energy bias and $\Delta$ as a tunneling amplitude.
6. State the spectral theorem for Hermitian operators. A Hermitian operator $A$ on $\mathbb{C}^2$ has eigenvalues $\{+1, -1\}$ with eigenvectors $|+\rangle, |-\rangle$. Write the spectral decomposition of $A$ and use it to compute $e^{i\theta A}$ in terms of $\cos\theta, \sin\theta$ and the projectors.
7. Derive the time-evolution operator $U(t) = e^{-iHt/\hbar}$ from the Schr\u00f6dinger equation $i\hbar \partial_t |\psi\rangle = H|\psi\rangle$. If $H = \omega Z/2$, compute $U(t)|+\rangle_X$ where $|+\rangle_X = (|0\rangle + |1\rangle)/\sqrt{2}$.
8. A quantum channel (completely positive trace-preserving map) is the depolarizing channel $\mathcal{E}(\rho) = (1-p)\rho + \frac{p}{3}(X\rho X + Y\rho Y + Z\rho Z)$. (a) Show this is trace-preserving. (b) Apply it to a pure state $\rho = |+\rangle\langle+|$ and find the resulting Bloch vector magnitude.
9. For a particle in a 1D infinite square well of width $L$: (a) State the energy eigenfunctions $\psi_n(x)$ and eigenvalues $E_n$. (b) A particle is in state $\psi(x) = \sqrt{2/L}\sin(2\pi x/L)\cos(\pi x/L)$. Express this as a superposition of energy eigenstates and find the energy measurement probabilities.
10. The quantum harmonic oscillator has $\hat{H} = \hbar\omega(\hat{N} + 1/2)$ where $\hat{N} = \hat{a}^\dagger\hat{a}$. (a) Prove $[\hat{H}, \hat{a}] = -\hbar\omega\hat{a}$ and interpret this as showing $\hat{a}$ lowers energy by $\hbar\omega$. (b) Compute $\langle x^2 \rangle$ in the ground state $|0\rangle$ using ladder operators, and verify the zero-point energy $\langle H \rangle = \hbar\omega/2$.
11. For the hydrogen atom: (a) State the energy eigenvalues $E_n$ and identify the quantum numbers $(n, \ell, m_\ell, m_s)$ for the $2p$ subshell. (b) The $2s \to 1s$ transition is forbidden by electric dipole selection rules. State the selection rules $\Delta \ell = \pm1$, $\Delta m_\ell = 0, \pm1$ and explain physically why they arise from conservation of photon angular momentum. (c) Compute the wavelength of the $3 \to 2$ (H-alpha) transition.
12. A spin-1/2 particle in a magnetic field $B_0$ along $\hat{z}$ has Hamiltonian $H = -\gamma B_0 S_z = -\omega_0 \hbar Z/2$ ($\omega_0 = \gamma B_0$). It starts in $|+\rangle_x = (|0\rangle+|1\rangle)/\sqrt{2}$. (a) Find $|\psi(t)\rangle$. (b) Compute $\langle S_x(t)\rangle$, $\langle S_y(t)\rangle$, $\langle S_z(t)\rangle$. (c) Interpret as Larmor precession around $\hat{z}$.
13. Two particles are in the maximally entangled Bell state $|\Phi^+\rangle = (|00\rangle + |11\rangle)/\sqrt{2}$. (a) Compute the reduced density matrix $\rho_A = \text{Tr}_B(|\Phi^+\rangle\langle\Phi^+|)$. (b) Compute the von Neumann entropy $S(\rho_A) = -\text{Tr}(\rho_A \log_2 \rho_A)$. (c) What does this entropy tell you about the entanglement of the state?
14. The CHSH inequality states that for any local hidden variable theory, $|\langle\mathcal{B}\rangle| \leq 2$ where $\mathcal{B} = A_1B_1 + A_1B_2 + A_2B_1 - A_2B_2$ and $A_i, B_j = \pm1$. (a) Show the classical bound $|\langle\mathcal{B}\rangle| \leq 2$. (b) Choose measurement angles $a_1=0$, $a_2=\pi/2$ for Alice and $b_1=\pi/4$, $b_2=-\pi/4$ for Bob on the Bell state $|\Phi^+\rangle$. Compute $\langle\mathcal{B}\rangle$ and show it violates the classical bound.
15. Quantum teleportation sends the unknown qubit $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$ from Alice to Bob using a Bell pair. (a) Write the initial 3-qubit state $|\psi\rangle_A \otimes |\Phi^+\rangle_{AB}$ and expand in the Bell basis for Alice's two qubits. (b) Show that after Alice's Bell measurement, Bob's qubit is in a known state depending on the measurement outcome, requiring only 2 classical bits for correction.
16. The quantum Fourier transform on $N = 4$ maps $|j\rangle \to \frac{1}{2}\sum_{k=0}^{3} i^{jk}|k\rangle$. (a) Compute $\text{QFT}_4|2\rangle$ explicitly. (b) How many gates does a $n=2$ qubit QFT circuit require? Write the circuit (H and CR$_2$ gates). (c) Show the QFT is unitary.
17. Shor's algorithm factors $N = 35$. Choose $a = 2$. (a) Compute $f(x) = 2^x \bmod 35$ for $x = 0, 1, \ldots, 11$ and find the period $r$. (b) Use $r$ to compute $\gcd(a^{r/2} \pm 1, N)$. (c) Verify the factorization.
18. Grover's algorithm searches $N = 256$ items. (a) Compute the angle $\theta$ where $\sin\theta = 1/\sqrt{N}$. (b) Find the optimal number of iterations $k^*$. (c) Compute the success probability $P_{k^*}$. (d) What is the quantum speedup factor compared to classical search?
19. The depolarizing noise on a qubit has $T_1 = T_2 = 100\,\mu$s and gate time $t_g = 50$ ns. (a) Compute the error probability per gate $p \approx t_g/T_2$. (b) For a 500-gate circuit, compute the total survival probability $(1-p)^{500}$. (c) Is this circuit above or below the fault-tolerance threshold $p_{th} = 10^{-3}$?
20. The complexity class BQP contains problems solvable by a quantum computer in polynomial time. (a) Give two problems in BQP not known to be in P. (b) Give one problem believed to be in NP but not BQP. (c) State the relationships $P \subseteq BPP \subseteq BQP \subseteq PSPACE$ and indicate which inclusions are proven strict.
21. A qubit suffers a $Z$ error with probability $p = 0.1$ independently on each of 3 qubits encoded in the 3-qubit bit-flip code. (a) What error does the 3-qubit bit-flip code correct? (b) Compute the probability that the encoded logical qubit is successfully corrected (at most 1 error on any qubit). (c) Compare to the uncoded failure probability.
22. VQE (Variational Quantum Eigensolver) minimizes $E(\boldsymbol{\theta}) = \langle\psi(\boldsymbol{\theta})|H|\psi(\boldsymbol{\theta})\rangle$. Given $H = Z_1Z_2 + 0.5X_1 + 0.5X_2$ (a 2-qubit Hamiltonian) and ansatz $|\psi(\theta)\rangle = e^{-i\theta Y_1/2}|00\rangle$: (a) Compute $|\psi(\theta)\rangle$ explicitly. (b) Evaluate $E(\theta) = \langle\psi(\theta)|H|\psi(\theta)\rangle$. (c) Find $\theta^*$ minimizing $E$.
23. The $[[5,1,3]]$ perfect code has stabilizers $g_1=XZZXI$, $g_2=IXZZX$, $g_3=XIXZZ$, $g_4=ZXIXZ$. (a) What does the $[[5,1,3]]$ notation mean? (b) Show that $g_1$ and $g_2$ commute. (c) Identify the syndrome for a $Y_1$ error (both $X$ and $Z$ acting on qubit 1). What correction is applied?
24. The surface code distance-3 ($d=3$) uses 9 data qubits in a $3\times3$ grid plus ancilla qubits for syndrome extraction. (a) How many physical qubits total (data + ancilla)? (b) The logical error rate is $p_L \approx (p/p_{th})^2$ for distance 3. If $p = 5\times10^{-3}$ and $p_{th} = 10^{-2}$, compute $p_L$. (c) Compare to uncoded physical error rate $p$.
25. A comprehensive challenge: Consider the quantum system with Hamiltonian $H = -J(X_1X_2 + Y_1Y_2 + Z_1Z_2) = -J\,\vec{\sigma}_1\cdot\vec{\sigma}_2$ (Heisenberg spin-1/2 model, 2 sites). (a) The Hilbert space is $\mathbb{C}^4$. Show that the singlet $|S\rangle = (|01\rangle - |10\rangle)/\sqrt{2}$ is an eigenstate with eigenvalue $-3J$ (the ground state for $J>0$). (b) The triplet states $|T_0\rangle = (|01\rangle+|10\rangle)/\sqrt{2}$, $|T_+\rangle = |00\rangle$, $|T_-\rangle = |11\rangle$ have eigenvalue $+J$. Verify for $|T_+\rangle$. (c) What is the singlet-triplet gap? (d) If this represents a 2-qubit quantum dot qubit, how does decoherence from phonons mix these levels and why is the singlet the preferred qubit state?
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.