# Average over the Bloch sphere

Consider you have a function of a two-level wave quantum state $$f(\vert \psi \rangle )$$, with $$\vert \psi \rangle = \alpha \vert 0 \rangle + \beta e^{\rm i \phi} \vert 1 \rangle$$.

With no loss of generality, I rewrite $$f$$ as function of $$f( \beta, \phi)$$, as the constraint $$\sqrt{\alpha^2 + \beta ^ 2} = 1$$ allows me to do. In case I want the average value of this function $$\langle f \rangle$$ over all the possible states, I consider the integral $$\langle f \rangle = \frac{1}{2 \pi} \int\int \, d\beta d\phi f(\beta, \phi).$$ In case I want to average over the Bloch sphere, I find myself in a problematic spot. Naively, what I would do is consider the transformation $$\alpha = \sin \theta/2$$ and $$\beta = \cos \theta/2$$, and write: $$\langle f \rangle = \frac{1}{4 \pi} \int \int \, d \theta d \phi f'(\theta, \phi) \sin \theta.$$ Unfortunately, the two integrals above are not equivalent. Then, my question is: which one is correct? Where is my mistake?

In spherical coordinates, you inserted a factor of $$\frac{1}{4\pi}\sin \theta$$. You did this because the spherical area element is $$\frac{1}{4\pi}\sin \theta d\theta d\phi$$ not just $$d\theta d\phi$$. (In particular, this is the area element you get from restricting the Euclidean metric on three-dimensional space to the surface of a two-dimensional sphere). Similarly, in your $$\beta,\phi$$ parameterization, the area element is not just $$\frac{1}{2\pi}d\beta d\phi$$. It's easiest to find it by considering the transformation $$\phi \rightarrow \phi, \theta \rightarrow \beta = \cos \frac{\theta}{2}$$. We get $$d\phi \rightarrow d\phi$$ $$d\theta \rightarrow -\frac{1}{2}\sin\frac{\theta}{2}d\beta$$ so our new area element is $$\frac{1}{4\pi}\sin \theta d\theta d\phi \rightarrow -\frac{1}{8\pi}\sin\cos^{-1}\beta d\beta d\phi$$ $$= -\frac{1}{8\pi}\sqrt{1 - \beta^2} d\beta d\phi$$ This area element is oriented, but for your application you can probably just ignore the minus sign.
Notice that you could have gone the other way, and instead found an area element with $$\theta,\phi$$ which matches your "natural" area element for $$\beta,\phi$$. However, the metric on the Bloch sphere is physically meaningful, since it's the unique rotationally-invariant measure on a qubit. The other metric doesn't have any physical meaning as far as I know, so it's probably not the one you're interested in.