I'm having trouble understanding how the measurement on $z$ and $x$ axes can be interpreted in terms of the Bloch sphere representation.
I know that the state can be written as $$β£πβ©=\cos(π/2)|0β©+\exp(iπ)\sin(π/2)|1β©,$$ and that to make a measurement we use the squared modulus of the inner product of the basis vector and the state vector. For example, we have $|β¨0|πβ©|^2$ for a $z$ measurement.
Thinking in terms of the Bloch sphere, it is clear that a rotation by an angle $π$ would not affect a $z$ measurement, and this is easy to prove mathematically. But this should also be the case for a $π$ rotation on a $x$ measurement, right?
But when I try to prove it mathematically, I get
$$|β¨+|πβ©|^2 = \frac{1}{\sqrt2}|(\cos(π/2)+\exp(iπ)\sin(π/2)|^2 \\= \frac{1}{\sqrt2}|(\cos(π/2)+\cos(π)\sin(π/2)+i \sin(π)\sin(π/2)|^2,$$
which then can be written in the form of $a^2 + b^2$ where $a=\cos(π/2)+\cos(π)\sin(π/2)$ and $b = \sin(π)\sin(π/2)$.
This means that $π$ affects the probability of a $x$ measurement. I know I must be doing something wrong but what is it?
I also don't understand why x gate is a rotation around the x axis and not the y axis ?
Thanks in advance for your answer.