|q⟩ Bad Qubits

advanced · Programming · Quantum Annealing & Adiabatic Computing

Annealing Schedules

The schedule is the recipe for turning the driver off and the problem Hamiltonian on. It controls both whether the evolution stays adiabatic and how the spectral gap behaves along the way. This lesson studies the simplest non-trivial case — a single qubit — where the instantaneous ground state can be written down exactly.

The interpolating Hamiltonian

The most common schedule is the linear interpolation

H(s)=(1s)HB+sHP,s=t/T[0,1].H(s) = (1 - s)\,H_B + s\,H_P, \qquad s = t/T \in [0, 1].

More general schedules replace the two coefficients with smooth functions A(s)A(s) and B(s)B(s) with A(0)=1,A(1)=0A(0) = 1, A(1) = 0 and B(0)=0,B(1)=1B(0) = 0, B(1) = 1:

H(s)=A(s)HB+B(s)HP.H(s) = A(s)\,H_B + B(s)\,H_P .

Good schedules slow down — keep dsdt\tfrac{ds}{dt} small — near the minimum gap, where the system is most fragile, and can move quickly where the gap is wide.

A single-qubit example

Take HB=XH_B = -X and HP=ZH_P = -Z with the linear schedule:

H(s)=(1s)XsZ.H(s) = -(1 - s)\,X - s\,Z .

Writing a=1sa = 1 - s and b=sb = s, this is H(s)=(aX+bZ)H(s) = -(a X + b Z). The operator aX+bZaX + bZ has eigenvalues ±a2+b2\pm\sqrt{a^2 + b^2}, so the gap is

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

which is smallest at s=12s = \tfrac12, where Δ=2\Delta = \sqrt{2}. The ground state of H(s)H(s) is the +1+1 eigenstate of aX+bZaX + bZ — a spin pointing along the Bloch-sphere direction

n^=(a,0,b)a2+b2=(1s,0,s)(1s)2+s2.\hat{n} = \frac{(a, 0, b)}{\sqrt{a^2 + b^2}} = \frac{(1-s,\, 0,\, s)}{\sqrt{(1-s)^2 + s^2}} .

Preparing it with one rotation

A YY-rotation of 0|0\rangle produces a state whose Bloch vector lies in the xzxz-plane:

RY(θ)0=cosθ20+sinθ21        n^=(sinθ,0,cosθ).RY(\theta)|0\rangle = \cos\tfrac{\theta}{2}\,|0\rangle + \sin\tfrac{\theta}{2}\,|1\rangle \;\;\leftrightarrow\;\; \hat{n} = (\sin\theta,\, 0,\, \cos\theta).

Matching (sinθ,0,cosθ)(\sin\theta, 0, \cos\theta) to the direction (1s,0,s)(1-s, 0, s) gives

θ=atan2(1s,  s).\theta = \operatorname{atan2}(1-s,\; s).

At the midpoint s=12s = \tfrac12 this is θ=atan2(12,12)=π4\theta = \operatorname{atan2}(\tfrac12, \tfrac12) = \tfrac{\pi}{4}, so the ground state is cosπ80+sinπ81\cos\tfrac{\pi}{8}\,|0\rangle + \sin\tfrac{\pi}{8}\,|1\rangle.

Try it

Prepare the instantaneous ground state of H(s)=(1s)XsZH(s) = -(1-s)X - sZ at s=0.5s = 0.5 using a single RYRY rotation. The grader checks the statevector.

Run your code to see the quantum state.

After running, the statevector panel shows amplitudes cos(π/8)0.924\cos(\pi/8) \approx 0.924 on 0|0\rangle and sin(π/8)0.383\sin(\pi/8) \approx 0.383 on 1|1\rangle.

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