|q⟩ Bad Qubits

advanced · Programming · Quantum Annealing & Adiabatic Computing

The Minimum Gap

The single number that determines whether an adiabatic algorithm is fast or hopeless is the minimum spectral gap along the schedule. This lesson makes the relationship between gap and runtime concrete and computes the gap for the single-qubit model.

The gap controls the runtime

Recall the adiabatic condition: the runtime must satisfy

T    maxssH~(s)Δmin2,Δmin=mins[0,1](E1(s)E0(s)).T \;\gg\; \frac{\max_{s}\,\|\partial_s \tilde{H}(s)\|}{\Delta_{\min}^2}, \qquad \Delta_{\min} = \min_{s \in [0,1]} \bigl(E_1(s) - E_0(s)\bigr).

The numerator depends only mildly on the problem; the denominator is the bottleneck. Because the gap enters squared, halving the minimum gap quadruples the required runtime. The whole game of designing an adiabatic algorithm is keeping Δmin\Delta_{\min} from becoming exponentially small.

Computing the gap for the single qubit

For H(s)=(1s)XsZH(s) = -(1-s)X - sZ write a=1sa = 1-s, b=sb = s. The operator aX+bZaX + bZ is

aX+bZ=(baab),aX + bZ = \begin{pmatrix} b & a \\ a & -b \end{pmatrix},

with eigenvalues ±a2+b2\pm\sqrt{a^2 + b^2}. The two energies of H(s)=(aX+bZ)H(s) = -(aX + bZ) are therefore E0,1(s)=a2+b2E_{0,1}(s) = \mp\sqrt{a^2 + b^2}, giving the gap

Δ(s)=2(1s)2+s2.\Delta(s) = 2\sqrt{(1-s)^2 + s^2}.

Minimizing the quadratic (1s)2+s2(1-s)^2 + s^2 over ss: its derivative is 2(1s)+2s=4s2-2(1-s) + 2s = 4s - 2, which vanishes at s=12s = \tfrac12. There

Δmin=214+14=212=21.414.\Delta_{\min} = 2\sqrt{\tfrac14 + \tfrac14} = 2\sqrt{\tfrac12} = \sqrt{2} \approx 1.414 .

Hard problems, small gaps

For NP-hard optimization problems encoded into HPH_P, the minimum gap typically appears late in the schedule, near s=1s = 1, and can scale as Δmin2cn\Delta_{\min} \sim 2^{-c n} for some constant c>0c > 0. Then the runtime T1/Δmin2T \sim 1/\Delta_{\min}^2 grows exponentially in the number of qubits nn — the adiabatic counterpart of an exponential-time classical search. Locating and widening the minimum gap (through better schedules, catalysts, or reformulations) is an active research area.

Try it

Numerically find the minimum gap of the single-qubit schedule by scanning s[0,1]s \in [0,1] and returning the smallest value of Δ(s)=2(1s)2+s2\Delta(s) = 2\sqrt{(1-s)^2 + s^2}. The grader checks that your returned number equals 2\sqrt{2}.

Run your code to see the quantum state.

A grid scan returns Δmin1.414=2\Delta_{\min} \approx 1.414 = \sqrt{2}, attained at s=0.5s = 0.5.

Sign in on the full site to ask questions and join the discussion.