QubitLab
IDELearnPlaygroundDocsCommunity
Log in
QubitLab
IDELearnPlaygroundDocsCommunity
Log in
QubitLab
IDELearnPlaygroundDocsCommunity
Log in
HomeLearnCatalogRanksPlaygroundDocs
01 · Pauli gates: X, Y, Z0%

You are reading without signing in. Sign in or continue as guest to take quizzes and climb the ranks.

Learn/QC 102Gates and Circuits·Lesson 1 of 7

Pauli gates: X, Y, Z

The three flips every circuit is built from, as matrices and as Bloch rotations.

Beginner10 min read4 sections · 2 questions+45
By the end you will be able to
  1. 01Write the X, Y and Z matrices and apply them to |0⟩ and |+⟩.
  2. 02Explain why Z does nothing visible to |0⟩ but flips |+⟩ to |−⟩.
  3. 03Use the gate cards in the composer to check your answers.
X=(01​10​)Y=(0i​−i0​)Z=(10​0−1​)
Each is its own inverse (X² = Y² = Z² = I) and a half turn about its axis of the Bloch sphere.

X is the quantum NOT: it swaps the amplitudes of |0⟩ and |1⟩. Z leaves |0⟩ alone and multiplies |1⟩ by −1, so it changes only phase; on |+⟩ that phase flip turns it into |−⟩. Y does both at once, with a factor i you will rarely need to track by hand.

Hands-on

Z is invisible until you look sideways

Simulate: the histogram shows only 0, exactly as without the Z. Now insert an H before the measurement (palette → H on q0, after Z) and simulate again: Z turned |+⟩ into |−⟩, so H brings it to |1⟩.

OpenQASM 3
OPENQASM 3.0;
include "stdgates.inc";
qubit[1] q;
bit[1] c;
h q[0];
z q[0];
c[0] = measure q[0];
Sign in to run (nothing is saved)
Open in the IDE Open in the Playground
Knowledge check

2 questions · one try each counts

Question 1

What is Z|+⟩?

Sign in to answer and climb the ranks; you will come back to this lesson.

Question 2

Applying X twice to any state gives…

Sign in to answer and climb the ranks; you will come back to this lesson.

Key takeaway

X flips, Z flips the phase, Y does both. Phase flips are invisible in the Z basis and visible after an H.

Finished reading?

Knowledge check: 2 questions waiting above. Questions are optional. Mark it complete, or press Next: moving on marks it complete too.

Up next
Lesson 2 · 12 min
Phase and rotation gates
S, T, P and the RX/RY/RZ family: fine control of a qubit, and why T matters.
Further reading
  • Docs: gate cards with matrices
More in Gates and Circuits
  • Two-qubit gates: CNOT, CZ, SWAP
  • Entanglement and the Bell states
  • Phase Kickback: The Algorithm Secret
Multi-Qubit Registers & SeparabilityPhase and rotation gates
In this lesson0%
  1. Introduction
  2. Try it: Z is invisible until you look sideways
  3. Knowledge check
  4. Key takeaway
QubitLab
IDELearnPlaygroundDocsCommunity
Log in
QubitLab
IDELearnPlaygroundDocsCommunity
Log in