= Solution
Under the prescribed computational-basis measurement and decision rule, the first state is correctly declared when outcome zero occurs, with probability $\cos^2(\theta/2)$. The second is correctly declared on outcome one, with the same probability. Averaging the two equal priors gives
$$
\boxed{p_{\mathrm{correct}}=\cos^2(\theta/2)=\frac{1+\cos\theta}{2}.}
$$
One can also verify optimality directly: the two <density matrices> differ by $\cos\theta\,\sigma_z$. Since $\cos\theta>0$, choosing the positive eigenspace as the decision for the first state maximizes the <trace> contribution to success. This is the <equal-prior discrimination of qubit states> construction along the vertical axis.
Back to article page