What Is a Hadamard Gate?
February 7, 2025
The Hadamard gate (usually written ) is one of the most important single‑qubit gates. It is famous because it maps computational‑basis states to equal superpositions.
Matrix form
What it does to and
Applying to the basis states gives:
and
So does not “randomize” a qubit; it creates a state where measurement in the computational basis yields 0 and 1 with equal probability (assuming an ideal system).
Applying Hadamard twice
The Hadamard gate is its own inverse:
So applying twice in a row returns the qubit to its original state.
Circuit symbol
In circuit diagrams, a Hadamard gate is drawn as a square labeled H.
In Qiskit
In Qiskit, you apply it with:
from qiskit import QuantumCircuit
qc = QuantumCircuit(1)
qc.h(0)Fun fact (name)
The gate is named after the French mathematician Jacques Hadamard.
Next
- For a broader walkthrough: Single-qubit gates
- For the geometric picture: Bloch sphere