Solution (source code)

= Solution

For $v=(a,b)^T$, multiplying each <Pauli matrix> between $v^\dagger$ and $v$ gives
$$
\boxed{x=\left(\operatorname{Re}(a^*b),\operatorname{Im}(a^*b),\frac{|a|^2-|b|^2}{2}\right).}
$$
All three components are real. Moreover $|x|=(|a|^2+|b|^2)/2=\|v\|^2/2$. Thus normalized two-component <spinors> map to the radius-$1/2$ version of the <Bloch sphere>; the usual unit-radius convention multiplies these coordinates by two.