Solution (source code)

= Solution

By the <Rayleigh-Ritz variational principle>, $\operatorname{tr}(\Pi_0D)$ is maximized by taking $\Pi_0$ to project onto the positive-eigenvalue eigenspace of $D$. Put $|\langle\alpha_0|\alpha_1\rangle|=\cos\theta$. On $S$, the characteristic polynomial of $D$ is
$$
\lambda^2-(p_0-p_1)\lambda-p_0p_1\sin^2\theta,
$$
so its positive eigenvalue is
$$
\lambda_+=\frac{p_0-p_1+\sqrt{1-4p_0p_1\cos^2\theta}}2.
$$
Part (b) then gives the <Helstrom-Holevo bound>
$$
\boxed{P_S^{\rm opt}=p_1+\lambda_+
=\frac{1+\sqrt{1-4p_0p_1\cos^2\theta}}2.}
$$