Quantum ComputingQuantum GatesLesson 3.1
Beginner lesson

The Hadamard Gate

Understand the Hadamard gate as more than a 50/50 randomizer by applying it repeatedly and observing interference.

Lesson statusNot completed
Learning objectives

By the end of this lesson, you should be able to:

  • Apply H to |0⟩ and |1⟩.
  • Explain why H is not merely a randomizer.
  • Use H²=I to identify interference.
Prerequisites: Quantum Superposition·Quantum Measurement
EXPERIMENT Interactive quantum laboratory
Change → Observe → Explain
Manipulate the controls. Do not just watch the animation—predict what should happen before moving each parameter.

The matrix

The Hadamard gate is

\[H=\frac{1}{\sqrt2}\begin{bmatrix}1&1\\1&-1\end{bmatrix}.\]

Applied to \(|0\rangle\), it creates the equal superposition \(|+\rangle=(|0\rangle+|1\rangle)/\sqrt2\). Applied to \(|1\rangle\), it creates \(|-\rangle=(|0\rangle-|1\rangle)/\sqrt2\).

Apply it twice

A useful demonstration is \(H^2=I\). Starting in \(|0\rangle\), one Hadamard gives a 50/50 measurement distribution, while a second Hadamard returns the state to \(|0\rangle\). This is why it is misleading to describe Hadamard only as a randomizing gate.

Interference is the key

The relative sign in \(|-\rangle\) affects later transformations. Quantum algorithms exploit such phase relationships to arrange constructive and destructive interference.

Key takeaways

What should stay with you

  • H changes basis as well as creating equal-magnitude amplitudes.
  • Relative signs are invisible to immediate computational-basis probabilities but matter later.
  • H²=I is a compact demonstration of quantum interference.
Knowledge check

Starting from |0⟩, what is the state after applying H twice?