The X (NOT) Gate
The Pauli-X gate is the quantum version of the classical NOT: it swaps the amplitudes of and . On a basis state it simply flips the bit,
and its matrix is
Unlike a classical NOT, acts linearly on superpositions too: . Because , applying it twice returns the original state — is its own inverse.
Try it
Flip the qubit from to , then press Run and Check.
Run your code to see the quantum state.
After running, all the probability sits on — the Bloch vector now points at the south pole.
Sign in on the full site to ask questions and join the discussion.