Newbie in quantum computing (and stack overflow) here. I am confused regarding the relation between spin measurement in quantum mechanics and the quantum NOT gate.
I have a Bloch sphere picture of a single qubit in mind:
From the Stern-Gerlach experiment, we know that for spin oriented in the z-direction ($|0\rangle$ or $|1\rangle$) with a detector oriented in the z-direction ($S_z$) to leave the spin of the particle unchanged, whereas if our detector was tilted to be aligned with the x-axis ($S_x$), then there is a 50% probability of our detector outputting $\hbar/2$ and orienting the particle in $|+X\rangle$, and there is a 50% probability of our detector outputting $-\hbar/2$ and orienting the particle in $|-X\rangle$.
$$ $$ However, we also know that the quantum NOT (bit-flip) gate is simply applying Pauli matrix $\sigma_x$
such that $\sigma_x |0\rangle$ = $\sigma_x \begin{bmatrix} 1 \\ 0 \end{bmatrix}$ = $\begin{bmatrix} 0 \\ 1 \end{bmatrix}$ = $|1\rangle$ and similarly $\sigma_x |1\rangle$ = $|0\rangle$.
I guess I see how the matrix multiplication works out for the NOT gate, but this doesn't seem to fit with our SG-experiment picture! We know $S_x = \frac{\hbar}{2} \sigma_x$, it seems as if applying $S_x$ on $|Z+\rangle$ (aka $|0\rangle$) doesn't orient the spin to $|X+\rangle$ or $|X-\rangle$, but instead simply flips the spin to $|Z-\rangle$.
Where does my intuition go wrong? Is applying a NOT gate to a qubit and "measuring" a qubit with a perfectly oriented detector not the same thing? (If not, how do we physically apply a gate on a qubit?)