Sign in
← Atlas
Exact & formalGatesSingle-qubit gate

Hadamard gate

The smallest useful reference for putting a qubit into an equal superposition.

superpositionsingle qubitfoundations

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.

Hadamard is a good first record because its behavior is easy to inspect mathematically and in a measured distribution.

Circuit & simulation
050%
150%
What this takes and returns
Takes1 qubitWhat joins here

Takes a 1-qubit register and states no assumption about what is on it. That is the whole condition: anything returning 1 qubits can feed it.

15 entries meet this end. Named below.

Returns1 qubitWhat joins here

Returns a 1-qubit register a next stage can take. This is the end that joins.

13 entries meet this end. Named below.

A unitary. The same register goes in and comes out, and this entry states no assumption about what is on it — which is what lets anything of the same width feed it. See all 29 →

How it works

Hadamard is the single-qubit unitary H=12(1111)H = \frac{1}{\sqrt{2}}\begin{pmatrix}1 & 1\\ 1 & -1\end{pmatrix}. It sends 012(0+1)|0\rangle \mapsto \frac{1}{\sqrt2}(|0\rangle+|1\rangle) and 112(01)|1\rangle \mapsto \frac{1}{\sqrt2}(|0\rangle-|1\rangle), so a computational-basis measurement always returns 00 or 11 with probability 1/21/2 regardless of which state it acted on — the difference is the relative sign in front of 1|1\rangle, a phase that only becomes visible once another gate lets the two branches interfere. HH is both Hermitian and unitary, so H=H=H1H^\dagger = H = H^{-1}, and direct matrix multiplication gives H2=IH^2 = I, exactly the identity this record's matrix check confirms. Geometrically HH is a π\pi rotation of the Bloch sphere about the axis (x^+z^)/2(\hat x + \hat z)/\sqrt2, exchanging the ZZ and XX eigenbases. It is the standard way to open superposition-based circuits such as Bell states, GHZ states, Grover diffusion, and the QFT.

Implementation
Native
hadamard.qasm
OPENQASM 3.0;
include "stdgates.inc";
qubit q;
h q;
Quantum vs classical

Classical baseline

Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.

Quantum claim

The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.

How to compare

Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.

Declared gaps

Nobody has reviewed this record for gaps yet.

Literature & references
Quantum Computation and Quantum Information: 10th Anniversary Edition2010 · Michael A. Nielsen and Isaac L. Chuang

Standard graduate textbook covering the single- and two-qubit gate definitions, matrix identities, and circuit primitives this record states.

doi.org/10.1017/cbo9780511976667