Computing Library › Quantum Logic Gates
Quantum Logic Gates

Hadamard Gate (H)

The Hadamard gate creates superposition — it turns a definite |0⟩ or |1⟩ into an equal blend, and is the doorway to nearly every quantum algorithm.

Matrix

Unitary matrix
1/√21/√21/√2−1/√2

Circuit symbol

Kronos motion — thermal gate

Action on basis states

inputoutput
|0⟩|+⟩ = (|0⟩+|1⟩)/√2
|1⟩|−⟩ = (|0⟩−|1⟩)/√2
|+⟩|0⟩
|−⟩|1⟩

How it works

H maps the computational basis to the ± basis and back — it is its own inverse. Geometrically it is a 180° rotation about the diagonal (x+z)/√2 axis. A layer of H on every qubit builds the uniform superposition that Grover, Deutsch–Jozsa, and phase estimation all begin from.

In code (Qiskit)

python
qc = QuantumCircuit(1)
qc.h(0)   # |0> -> (|0>+|1>)/sqrt(2)
single-qubitCliffordHermitiansuperposition