What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Pauli X and Z each rotate a qubit by 180° (π radians), but around different Bloch-sphere axes. X rotates around x and swaps the computational-basis states |0⟩ and |1⟩; Z rotates around z, leaving those basis labels in place while reversing the relative sign of the |1⟩ amplitude in a superposition.
Start with the qubit state
A pure qubit can be written as |ψ⟩ = α|0⟩ + β|1⟩, where α and β are complex amplitudes and |α|² + |β|² = 1. The Pauli X and Z gates are represented by these matrices:
As an Amazon Associate I earn from qualifying purchases.
X = [[0, 1], [1, 0]] Z = [[1, 0], [0, −1]]
Applying a gate transforms the amplitudes. The Bloch sphere gives a geometric view of the same transformation: each pure state corresponds to a point on the sphere, with states that differ only by a global phase represented by the same point.
What does the X gate do?
X exchanges the two amplitudes:
X|ψ⟩ = β|0⟩ + α|1⟩
In the computational basis, it swaps |0⟩ and |1⟩. That is why X is called a bit flip, analogous to a classical NOT operation on those basis states. IBM describes X as a π rotation around the Bloch sphere’s x axis: IBM Quantum Learning: Bits, gates, and circuits.
For a Bloch vector (x, y, z), this half-turn maps (x, y, z) to (x, −y, −z). The x coordinate stays fixed while y and z reverse. A superposition need not behave like a classical bit: X exchanges its amplitudes, and some states are unchanged. For example, X|+⟩ = |+⟩, where |+⟩ = (|0⟩ + |1⟩)/√2.
What does the Z gate do?
Z leaves the |0⟩ amplitude alone and changes the sign of the |1⟩ amplitude:
Rank #2
Z|ψ⟩ = α|0⟩ − β|1⟩
Thus Z|0⟩ = |0⟩ and Z|1⟩ = −|1⟩. It does not swap the computational-basis states; it is called a phase flip because it changes the relative phase between the two components when both are present. IBM’s Qiskit reference describes Z as a phase flip and a π-radian rotation about z: Qiskit ZGate reference.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteOn the Bloch sphere, Z maps (x, y, z) to (−x, −y, z). The z coordinate stays fixed, while x and y reverse. The computational-basis states sit at the north and south poles on the z axis, so Z leaves each pole in place as a physical Bloch-sphere state. The minus sign on |1⟩ still matters relative to another amplitude in a superposition.
Compare X and Z
| Gate | Matrix | Computational-basis action | Bloch-sphere action |
|---|---|---|---|
| X | [[0, 1], [1, 0]] | |0⟩ ↔ |1⟩ | π rotation around x; (x, y, z) → (x, −y, −z) |
| Z | [[1, 0], [0, −1]] | |0⟩ → |0⟩; |1⟩ → −|1⟩ | π rotation around z; (x, y, z) → (−x, −y, z) |
See the phase difference with |+⟩
The z axis is the measurement axis for the computational basis. The equal superposition |+⟩ = (|0⟩ + |1⟩)/√2 lies on the equator. A Hadamard gate applied to |0⟩ creates this state, as illustrated in IBM Quantum Learning’s lesson on bits, gates, and circuits.
For |+⟩, X|+⟩ = |+⟩, while Z|+⟩ = |−⟩ = (|0⟩ − |1⟩)/√2. The states |+⟩ and |−⟩ have the same probabilities for computational-basis measurement—one-half for each outcome—but opposite relative phases. A phase change can therefore be invisible to that measurement on its own while still changing how the state behaves in later operations.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Global phase and rotation-gate conventions
A global phase multiplies the entire state by the same complex number of magnitude one and does not change its physical state. A relative phase changes one component with respect to another and can affect later interference. For a lone basis state, changing |1⟩ to −|1⟩ is only a global phase; for a superposition, changing β to −β is relative.
Recommended Free Tools
There is also a convention difference between Pauli gates and parameterized rotation gates. Qiskit documents RZ(π) = −iZ, which differs from Z by a global phase rather than being literally the same matrix. The Bloch-sphere transformation is the same. This distinction matters when comparing state vectors or circuit matrices, even though it does not change the represented physical state.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

