Single-Qubit Gates
A detailed, university-level study of the major single-qubit gates: X, Y, Z, Hadamard, S, T, and the parameterized rotation gates Rx, Ry, Rz — their matrices, their action on basis and superposition states, their Bloch-sphere interpretation, phase effects, inverses, and composition.
Lesson 7: Single-Qubit Gates
Learning Objectives
By the end of this lesson, you will be able to:
- Identify the most common single-qubit gates: I, X, Y, Z, H, S, T, and the rotation gates Rx, Ry, Rz.
- Write down the matrix for each of these gates and apply it to a state vector using matrix-vector multiplication.
- Compute how each gate acts on the basis states |0⟩ and |1⟩, and on superposition states such as |+⟩ and |−⟩.
- Interpret the action of each gate geometrically as a rotation on the Bloch sphere.
- Distinguish global phase from relative phase, and explain why relative phase is physically meaningful.
- Determine whether a gate is self-inverse, and compute the inverse of a gate that is not.
- Compose sequences of single-qubit gates and correctly compute the combined operator, respecting operator order.
- Explain why phase changes matter for interference, even when they don't immediately change computational-basis measurement probabilities.
- Recognize single-qubit gates as the fundamental building blocks used inside larger quantum algorithms.
1. Prerequisites and Connection to Lesson 6
Lesson 6 established the general mathematical framework for quantum gates. Let's briefly recall the essentials before diving into specific gates:
- A qubit's state is written in ket notation as , and represented as a column vector.
- A gate is represented by a matrix, and it must be unitary: .
- Applying a gate transforms the state:
- Unitarity guarantees the transformation is reversible and preserves normalization.
- Geometrically, single-qubit gates correspond to rotations of the Bloch vector on the Bloch sphere (Lesson 5).
Lesson 6 kept things general — it explained what a gate is without focusing on any particular gate. This lesson focuses specifically on single-qubit gates: the small set of named, standard gates that act on one qubit at a time and form the essential toolkit from which more complex quantum operations are built. Understanding each of these gates individually — their matrices, their effect on basis states, their effect on superpositions, and their geometric meaning — is essential before we move on to multi-qubit systems (Lesson 8) and quantum circuits (Lesson 10).
2. What Is a Single-Qubit Gate?
A single-qubit gate is a unitary operator that acts on the two-dimensional state space of a single qubit. Formally:
- Input: a single-qubit state , written as a column vector:
- Output: a new single-qubit state , also a two-dimensional column vector.
- Matrix representation: a 2×2 matrix .
- Unitary requirement: , guaranteeing that remains normalized.
- Reversibility: since is unitary, undoes the transformation exactly.
Every gate discussed in this lesson is a specific 2×2 unitary matrix. What differs between them is how they transform the amplitudes and — whether they swap them, introduce complex factors, flip signs, mix them into superposition, or rotate them by some angle.
3. Pauli-X Gate
3.1 Matrix
3.2 Action on basis states
Interpretation: X is the quantum analogue of the classical NOT gate — it flips |0⟩ to |1⟩ and vice versa. For this reason it is often called the bit-flip gate.