Qubit fidelity along a Bloch meridian (source code)

= Qubit fidelity along a Bloch meridian
{title2=$F=\cos(\theta/2),\quad F_{\mathrm{sq}}=\cos^2(\theta/2),\quad D=\sin(\theta/2)$}

Compare the <qubit> <pure state>
$$
|\psi_\theta\rangle=\cos(\theta/2)|0\rangle+\sin(\theta/2)|1\rangle,\qquad 0\leq\theta\leq\pi,
$$
with $|0\rangle$, using the <computational basis>. Its <Bloch vector> is $(\sin\theta,0,\cos\theta)$: it follows a meridian of the <Bloch sphere> from the north pole $|0\rangle$ through $|+\rangle$ to the south pole $|1\rangle$. The <inner product> with $|0\rangle$ is $\cos(\theta/2)$, nonnegative on this interval. Consequently <quantum fidelity>, <squared quantum fidelity>, and <trace distance> are
$$
F=\cos(\theta/2),\qquad F_{\mathrm{sq}}=\cos^2(\theta/2),\qquad D=\sin(\theta/2).
$$
At $\theta=0$ the triple $(F,F_{\mathrm{sq}},D)$ is $(1,1,0)$; at $\theta=\pi/2$ it is $(1/\sqrt2,1/2,1/\sqrt2)$; at $\theta=\pi$ it is $(0,0,1)$. The angle between the <Bloch vectors> is $\theta$, while the <quantum fidelity> uses its half-angle. The <pure-state trace distance and fidelity identity> becomes the familiar relation $\cos^2(\theta/2)+\sin^2(\theta/2)=1$.

\Image[/qubit-fidelity-angle.png]
{title=A Bloch sphere meridian and the corresponding unsquared fidelity F, squared fidelity Fsq, and trace distance D relative to the north-pole state}

For equal prior <probabilities>, the <Holevo–Helstrom theorem> gives optimal <quantum state discrimination> success $P_{\mathrm{succ}}=(1+D)/2$. Along this meridian it rises from $1/2$ to one, with $(1+1/\sqrt2)/2\approx0.8536$ at $|+\rangle$. This connects the geometric <trace distance> to the best possible decision from a single preparation; it is a different measurement task from the target-acceptance <probability> defining <squared quantum fidelity>.

// Target: quantum-information-theory.bigb