Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Bloch sphere

What Pauli X and Z Gates Do to a Qubit on the Bloch Sphere

By Freedom251 Team · · 3 min read

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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:

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On 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.Support on Ko-Fi

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Bloch spherePauli gatesQuantum Computingquantum gatesqubit

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.