In short

The Hadamard gate, written H, is the single most important one-qubit gate in all of quantum computing. It turns |0\rangle into |+\rangle and |1\rangle into |-\rangle — in other words, it creates equal superpositions out of the definite states. Geometrically, it is a 180° rotation of the Bloch sphere about the axis halfway between +x and +z. It is its own inverse: applying H twice gives you back the state you started with. Almost every quantum algorithm you will ever see — Deutsch, Deutsch-Jozsa, Simon, Grover, Shor — begins by applying a Hadamard to every qubit. The matrix is H = \tfrac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}.

Open any quantum algorithm in any textbook, any paper, any tutorial — and the first move is almost always the same. Before the clever controlled-gate tricks, before the entanglement, before the phase-kickback, one gate fires on every qubit: H, the Hadamard. When Grover's search algorithm hunts for one Aadhaar record among a billion, step one is a Hadamard on every qubit. When Shor's algorithm factors a large number, step one is a Hadamard. When a simple Bell pair gets entangled, step one is a Hadamard. The algorithm designer who cannot reach for H is standing in front of the door to quantum computing with no key.

Why? Because a quantum computer that starts in the state |00\cdots 0\rangle — every qubit at the |0\rangle pole — is, so far, a completely classical object. It has definite values, zero superposition, no uncertainty at all. The Hadamard is the gate that kicks it into the realm where quantum effects actually live. One move takes every qubit from "I am a classical 0" to "I have equal amplitude to be 0 and 1" — and the moment you have that, you have access to the huge state space where algorithms like Shor and Grover live and do their work.

This chapter builds the Hadamard gate in every one of the four pictures you have seen so far: what it does to the basis states, how it shows up on the Bloch sphere, what its circuit symbol is, and finally what its matrix looks like. By the end, you should be able to reach for H without thinking.

What H does to |0⟩ and |1⟩ — the intuition

The Hadamard gate has exactly one job to remember: it swaps the "computational basis" with the "plus-minus basis."

Before meeting H in full, pin down the two bases it connects. The computational basis is the pair of states

|0\rangle = \begin{pmatrix}1 \\ 0\end{pmatrix}, \quad |1\rangle = \begin{pmatrix}0 \\ 1\end{pmatrix}

— the column vectors you read about in the very first chapters of this track. These are the states a qubit is in when it is behaving classically: measure it in this basis and you always get a definite answer, with no uncertainty.

Why these are the "computational basis": when you write a quantum algorithm and measure at the end, the measurement almost always happens in this basis — you read out 0s and 1s. So |0\rangle and |1\rangle are the basis from which the classical bits you care about actually emerge.

The plus-minus basis is a different pair, built from equal superpositions:

|+\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle + |1\rangle), \quad |-\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle - |1\rangle).

Both |+\rangle and |-\rangle are 50-50 between 0 and 1 when you measure in the computational basis. The only thing that tells them apart is the relative sign between the two amplitudes — a plus for |+\rangle, a minus for |-\rangle. That sign is invisible to a single computational-basis measurement, but it is real and does interesting things when you apply later gates.

Now, the Hadamard's core identities — the two you should memorise before anything else:

H|0\rangle = |+\rangle, \qquad H|1\rangle = |-\rangle.

In words: H turns |0\rangle (a definite state) into |+\rangle (an equal superposition with a plus sign), and it turns |1\rangle into |-\rangle (an equal superposition with a minus sign). From a classical-looking input, H produces a genuinely quantum output — a state that only makes sense once you accept that amplitudes are allowed to be positive or negative (or in general, complex).

Why this is the thing to remember: once you know what H does to |0\rangle and |1\rangle, you can compute what it does to any state — because H is linear. Every qubit state is some combination of |0\rangle and |1\rangle; H acts on each piece separately and you sum the results. All of the H-manipulation you will ever do comes back to these two identities.

Picture: H on the Bloch sphere

The cleanest way to see what H does is on the Bloch sphere. You already know (from the Bloch sphere chapter) that every one-qubit state is a point on a unit sphere, and every one-qubit gate is a rotation of that sphere. H is no exception.

The Hadamard rotation: H rotates the Bloch sphere by 180° about the axis that points halfway between the +x direction and the +z direction. The axis is not one of the three coordinate axes you have been using — it is the tilted diagonal through the equator at the |+\rangle direction and the north pole at |0\rangle.

Before the algebra, look at what that rotation does to the three cardinal states you care about.

Hadamard rotates |0⟩ to |+⟩A Bloch sphere with the Hadamard rotation axis drawn as a dashed red line halfway between the +x axis and the +z axis. The state |0⟩ is a dot at the north pole, and a curved arrow traces a 180-degree rotation about the Hadamard axis, carrying |0⟩ to |+⟩ at the +x equator point.|0⟩|1⟩|+⟩|−⟩H axis180°
The Hadamard rotation takes $|0\rangle$ (north pole) halfway around the tilted axis — $180°$ — and drops it at $|+\rangle$ on the equator. The dashed red line is the rotation axis; the red curve is the path of the state.

Two things fall out of this picture immediately.

First: |0\rangle lands at |+\rangle, just as the identity H|0\rangle = |+\rangle promises. You can see why — |0\rangle sits at the north pole, |+\rangle sits at the +x equator point, and the Hadamard axis is the line that bisects them. Rotating 180° about a bisector always swaps the two things it bisects. So |0\rangle \leftrightarrow |+\rangle under H.

Second: the same logic works for |1\rangle and |-\rangle. They are antipodal to |0\rangle and |+\rangle respectively. The Hadamard axis also bisects them (on the other side of the sphere). So H swaps |1\rangle with |-\rangle as well.

Hadamard rotates |1⟩ to |−⟩A Bloch sphere with the Hadamard rotation axis drawn as a dashed red line. The state |1⟩ is a dot at the south pole, and a curved arrow traces a 180-degree rotation about the Hadamard axis, carrying |1⟩ to |−⟩ at the negative x equator point.|0⟩|1⟩|+⟩|−⟩H axis180°
$H$ also swaps $|1\rangle$ with $|-\rangle$. Every point antipodal to a swapped pair is itself on the opposite side of the axis, so the rotation acts symmetrically across the sphere.

The states that do not move are the ones sitting exactly on the rotation axis itself. Those are the eigenstates of H. They do not matter much for basic quantum algorithms, but knowing that they exist — and that they are the only states fixed by the Hadamard — makes the rotation picture complete.

Why the axis is "halfway between x and z": you could pick any axis for a 180° rotation and build some gate out of it. The Hadamard's specific choice — the bisector of |0\rangle and |+\rangle — is exactly what is needed to swap the computational basis with the plus-minus basis. If the axis were any other angle, H would not cleanly convert between the two bases you actually measure in.

Picture: H in a circuit

Every quantum algorithm is drawn as a circuit — a schematic where time flows left to right, each horizontal line is one qubit, and each box on a line is a gate acting on that qubit. The Hadamard's circuit symbol is a box containing the letter H.

Circuit symbol for HA single horizontal wire labeled |0⟩ on the left, passing through a box labeled H, and emerging on the right as |+⟩. Time flows left to right.H|0⟩|+⟩time →
The circuit notation for a Hadamard acting on a single qubit: a box with an $H$ in it. The input $|0\rangle$ on the left becomes $|+\rangle$ on the right.

This is the most common arrangement you will see: an H sitting right at the start of a wire whose initial state was |0\rangle. The output is |+\rangle. If you see this at the front of a multi-qubit circuit — an H on every wire, all starting from |0\rangle — the circuit is doing exactly one thing: creating a uniform superposition over all computational-basis strings. You will meet this shape in every algorithm in Parts 7 through 10.

Definition: the matrix

Now that you have the action on basis states, the circuit symbol, and the rotation picture, the matrix form ties them all together.

The Hadamard gate

The Hadamard gate H is the 2 \times 2 unitary matrix

H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}.

Its action on the computational-basis states is

H|0\rangle = |+\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle + |1\rangle), \qquad H|1\rangle = |-\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle - |1\rangle).

Geometrically it is a 180° rotation of the Bloch sphere about the axis in the direction \hat{n} = \tfrac{1}{\sqrt{2}}(\hat{x} + \hat{z}). It is its own inverse: H \cdot H = I.

Reading the matrix. The factor \tfrac{1}{\sqrt{2}} in front is a normalisation, there to ensure the columns are unit vectors. The rest of the entries are just +1 and -1 — the Hadamard is the simplest non-trivial mixer you could build. The first column, \tfrac{1}{\sqrt{2}}(1, 1)^T, is what H does to |0\rangle: it produces |+\rangle. The second column, \tfrac{1}{\sqrt{2}}(1, -1)^T, is what H does to |1\rangle: it produces |-\rangle. The matrix columns are the images of the basis vectors — so reading H is the same as reading the two identities directly.

Quick notation refresh: the symbol |0\rangle — read "ket zero" — is just a 2-dimensional column vector: \begin{pmatrix}1 \\ 0\end{pmatrix}. The bracket \langle 0 | — "bra zero" — is its transpose: (1 \;\; 0). Applying a gate to a state means multiplying the matrix by the column vector. So H|0\rangle is literally the matrix-times-column computation you will see in the next section.

Deriving H|0⟩ and H|1⟩ from the matrix

The definition is the matrix. Let's confirm the two identities by actually doing the multiplication.

Computing H|0\rangle. Write |0\rangle as a column vector and multiply:

H|0\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} 1 \\ 0 \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \cdot 1 + 1 \cdot 0 \\ 1 \cdot 1 + (-1) \cdot 0 \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ 1 \end{pmatrix}.

Why this is |+\rangle: a column vector with entries (a, b)^T means the state a|0\rangle + b|1\rangle, by the definition of the computational basis. So \tfrac{1}{\sqrt{2}}(1, 1)^T = \tfrac{1}{\sqrt{2}}(|0\rangle + |1\rangle) = |+\rangle.

Computing H|1\rangle. Same idea, but now |1\rangle = (0, 1)^T:

H|1\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} 0 \\ 1 \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \cdot 0 + 1 \cdot 1 \\ 1 \cdot 0 + (-1) \cdot 1 \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ -1 \end{pmatrix}.

Why this is |-\rangle: the column (1, -1)^T (with the 1/\sqrt{2} out front) is exactly \tfrac{1}{\sqrt{2}}(|0\rangle - |1\rangle) = |-\rangle by the definition.

So the matrix form and the basis-state identities are the same statement, said twice. One is compact bookkeeping; the other is what you use when writing down a state in symbols.

H is its own inverse — proving HH = I

One of the most useful facts about the Hadamard is that applying it twice returns you to where you started. In symbols:

H \cdot H = I

where I is the 2 \times 2 identity matrix. The proof is a direct matrix multiplication.

HH = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \cdot \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} = \frac{1}{2}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}.

Multiply the two matrices entry by entry. Each entry of the product is the dot product of a row of the left matrix with a column of the right.

\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} = \begin{pmatrix} 1\cdot 1 + 1\cdot 1 & 1\cdot 1 + 1\cdot (-1) \\ 1\cdot 1 + (-1)\cdot 1 & 1\cdot 1 + (-1)\cdot (-1) \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix}.

Why only the diagonal survives: the off-diagonal entries each involve one +1 and one -1 multiplied and added, which cancel to 0. The diagonal entries involve like signs, which add to 2. This is the same cancellation that makes |+\rangle and |-\rangle orthogonal.

Now multiply by the 1/2 that was hanging out front:

HH = \frac{1}{2}\begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = I.

So HH = I exactly. The Hadamard is self-inverse, meaning H^{-1} = H — the gate that undoes H is just H itself.

Geometrically this should not be a surprise: H is a 180° rotation, and doing any 180° rotation twice gives you a 360° rotation, which is the identity. The algebra is just double-checking the picture.

Practical consequence: if you apply H to create a superposition, then later want to get back to the computational basis (to measure, for example), you just apply H again. There is no separate "un-Hadamard" gate. You will see this trick in every algorithm — a Hadamard layer at the front to build superposition, and a matching Hadamard layer at the back to rotate to a basis where interference has pushed the amplitudes onto informative outcomes. Same gate, used for opposite purposes.

Worked examples

Example 1: Apply H to a superposition state

Compute H|\psi\rangle where |\psi\rangle = \tfrac{1}{\sqrt{2}}|0\rangle + \tfrac{i}{\sqrt{2}}|1\rangle.

Step 1. Write |\psi\rangle as a column vector.

|\psi\rangle = \begin{pmatrix} 1/\sqrt{2} \\ i/\sqrt{2} \end{pmatrix}.

Why: the definition of the computational basis says that a state \alpha|0\rangle + \beta|1\rangle corresponds to the column vector (\alpha, \beta)^T. Here \alpha = 1/\sqrt{2} and \beta = i/\sqrt{2}.

Step 2. Multiply the Hadamard matrix by this column.

H|\psi\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} 1/\sqrt{2} \\ i/\sqrt{2} \end{pmatrix} = \frac{1}{\sqrt{2}}\begin{pmatrix} 1/\sqrt{2} + i/\sqrt{2} \\ 1/\sqrt{2} - i/\sqrt{2} \end{pmatrix}.

Why: this is just ordinary matrix-times-column multiplication, entry by entry. The 1/\sqrt{2} out front comes from the Hadamard's own normalisation; the 1/\sqrt{2} inside the column comes from |\psi\rangle's normalisation.

Step 3. Simplify the arithmetic. Each entry of the column is (1 \pm i)/\sqrt{2}, and there is a 1/\sqrt{2} multiplying the whole thing, so the combined factor is 1/\sqrt{2} \cdot 1/\sqrt{2} = 1/2.

H|\psi\rangle = \frac{1}{2}\begin{pmatrix} 1 + i \\ 1 - i \end{pmatrix}.

Why: pulling the 1/\sqrt{2} inside simplifies the numbers. The entries 1+i and 1-i are complex conjugates — the Hadamard has turned a state with a phase of i into a state whose two amplitudes are complex conjugates of each other.

Step 4. Translate back to bra-ket form.

H|\psi\rangle = \frac{1+i}{2}|0\rangle + \frac{1-i}{2}|1\rangle.

Why: reading the column vector back as a basis-state combination is just reversing step 1.

Step 5. Sanity check with probabilities. The probability of measuring 0 is \left|\tfrac{1+i}{2}\right|^2 = \tfrac{1^2 + 1^2}{4} = \tfrac{1}{2}. The probability of measuring 1 is \left|\tfrac{1-i}{2}\right|^2 = \tfrac{1}{2}. They sum to 1, so the state is correctly normalised. Why: |a+bi|^2 = a^2 + b^2 by the definition of the modulus of a complex number. The fact that the two probabilities sum to 1 confirms you did not drop a factor anywhere.

Result. H|\psi\rangle = \tfrac{1+i}{2}|0\rangle + \tfrac{1-i}{2}|1\rangle.

Input and output of Example 1 on the Bloch sphereTwo small Bloch spheres side by side. The left sphere shows the input state |psi⟩ as a dot on the positive y equator (|+i⟩). The right sphere shows the output state after Hadamard as a dot on the positive y equator rotated; the Hadamard moves |+i⟩ to |-i⟩ because the y axis is perpendicular to the H axis.|0⟩|1⟩x|+i⟩input |ψ⟩ = |+i⟩|0⟩|1⟩x|−i⟩output H|ψ⟩ = |−i⟩
On the Bloch sphere, the input $(|0\rangle + i|1\rangle)/\sqrt{2}$ is the state $|+i\rangle$, sitting on the $+y$ equator point. The Hadamard rotation (axis in the $x$-$z$ plane) reflects it to the $-y$ point, giving $|-i\rangle = (|0\rangle - i|1\rangle)/\sqrt{2}$ — the same state, scaled by the phase factor $(1+i)/\sqrt{2}$.

What this shows. H acts linearly: it splits the input into its |0\rangle and |1\rangle pieces, applies itself to each, and recombines. When the input is a state on the equator of the Bloch sphere, H rotates it to another point on the equator — and the change in phase between the two amplitudes tells you exactly where.

Example 2: Apply H⊗H to the 2-qubit state |00⟩

Compute H \otimes H applied to |00\rangle — that is, what happens when you apply a Hadamard to each of two qubits, both starting in |0\rangle. This is the opening move of nearly every quantum algorithm.

Step 1. Use linearity and tensor-product algebra. The state |00\rangle is |0\rangle \otimes |0\rangle. When you apply H to the first qubit and H to the second:

(H \otimes H)(|0\rangle \otimes |0\rangle) = (H|0\rangle) \otimes (H|0\rangle) = |+\rangle \otimes |+\rangle.

Why: the tensor product distributes over single-qubit gates. Applying a gate on qubit 1 only touches the first factor; applying a gate on qubit 2 only touches the second. So (A \otimes B)(|\psi\rangle \otimes |\varphi\rangle) = (A|\psi\rangle) \otimes (B|\varphi\rangle).

Step 2. Expand |+\rangle \otimes |+\rangle.

|+\rangle \otimes |+\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \otimes \tfrac{1}{\sqrt{2}}(|0\rangle + |1\rangle).

Why: replace each |+\rangle with its definition in terms of |0\rangle and |1\rangle. Now the tensor product can be expanded using ordinary distributivity.

Step 3. Distribute the tensor product.

\tfrac{1}{2}\big(|0\rangle \otimes |0\rangle + |0\rangle \otimes |1\rangle + |1\rangle \otimes |0\rangle + |1\rangle \otimes |1\rangle\big).

Why: the tensor product is bilinear, so it distributes over sums just like ordinary multiplication. The 1/\sqrt{2} \cdot 1/\sqrt{2} = 1/2 comes from the two normalisation factors combining.

Step 4. Rewrite using compact multi-qubit notation.

H \otimes H \,|00\rangle = \tfrac{1}{2}\big(|00\rangle + |01\rangle + |10\rangle + |11\rangle\big).

Why: |a\rangle \otimes |b\rangle is written |ab\rangle for short. Every one of the four 2-bit computational-basis states appears with the same amplitude 1/2. The probabilities are |1/2|^2 = 1/4 each — exactly the uniform distribution over 2-bit strings.

Result. H^{\otimes 2}|00\rangle = \tfrac{1}{2}(|00\rangle + |01\rangle + |10\rangle + |11\rangle).

Two Hadamards create uniform superposition over 4 basis statesA two-wire circuit diagram: two wires labeled |0⟩ on the left, each passing through its own H gate, producing the state 1/2(|00⟩ + |01⟩ + |10⟩ + |11⟩) on the right. Below the circuit, a bar chart shows four bars of equal height, one per basis state, all labeled 1/4 for their probabilities.HH|0⟩|0⟩½(|00⟩+|01⟩+|10⟩+|11⟩)|00⟩|01⟩|10⟩|11⟩¼¼¼¼
Two Hadamards acting on $|00\rangle$ produce equal amplitude on every 2-bit string. The bar chart shows the resulting probability distribution — flat, with each of the four outcomes at $1/4$.

What this shows. A layer of Hadamards on n qubits turns |00\cdots 0\rangle into a uniform superposition over all 2^n computational-basis strings. This is the payoff that every quantum algorithm relies on: a single parallel move creates a superposition over an exponentially large state space, and later gates interfere the amplitudes to push the answer to the strings you want.

In general:

H^{\otimes n}|0\rangle^{\otimes n} = \frac{1}{\sqrt{2^n}}\sum_{x \in \{0,1\}^n}|x\rangle.

For n = 20 qubits, that is 2^{20} basis states (about a million) all in one superposition, created by 20 Hadamards. For n = 40 qubits — the rough scale Grover's search might use to hunt a trillion records — it is 2^{40} basis states, created by 40 Hadamards. The Hadamard layer is how quantum computing gets its reach.

Where H appears in quantum algorithms

Look at the canonical quantum algorithms and you will see the same opening move every time.

Hadamards at the start of a quantum algorithmThree horizontal wires, each labeled |0⟩ on the left, each passing through its own H gate, followed by a large box marked "oracle / U_f" that spans all three wires, followed by another layer of H gates and measurement meters on each wire. The overall circuit pattern is H, oracle, H, measure.HHHoracleU_fHHH|0⟩|0⟩|0⟩Deutsch-Jozsa, Grover, Simon: all follow this pattern
The canonical shape of almost every quantum algorithm: a Hadamard layer to create uniform superposition, an oracle (or unitary) that encodes the problem, a Hadamard layer to interfere amplitudes, and measurement. The opening and closing moves are always Hadamards.

Deutsch and Deutsch-Jozsa. The very first quantum algorithm to beat its classical counterpart, Deutsch's algorithm (1985) and its generalisation Deutsch-Jozsa (1992), start with H on every qubit. The Hadamard layer puts every possible input into superposition simultaneously, the oracle marks the right answer with a phase, and a final Hadamard layer converts that phase back into something measurable.

Grover's search. When Grover's algorithm searches an unsorted database of N = 2^n items, the first thing it does is apply H^{\otimes n} to an n-qubit register starting at |0^n\rangle. This creates a uniform superposition over all N possible database indices. If you imagined searching Aadhaar's billion-plus records for one matching biometric, a Grover-style circuit would begin with a Hadamard on each of about 30 qubits (since 2^{30} \approx 10^9). Every record index starts in the superposition with equal amplitude; Grover's rotation then amplifies the matching index over \sqrt{N} iterations.

Shor's factoring. Step one of Shor's algorithm is H^{\otimes n} on the counting register — to create a superposition over all possible "exponents" before querying the modular-exponentiation function. The quantum Fourier transform at the end is itself built on top of Hadamards and controlled phase gates; remove H and Shor's algorithm has no starting move.

Bell-pair creation. The simplest entanglement circuit ever written — one H on qubit 1, followed by a CNOT — creates the Bell state \tfrac{1}{\sqrt{2}}(|00\rangle + |11\rangle). Again: the first gate is a Hadamard.

The pattern is so universal that "apply H to every qubit" is the quantum-computing equivalent of "set all registers to zero" in a classical program. It is where everything begins.

Common confusions

Going deeper

If you are just here to know what the Hadamard does, you have it — it swaps the two bases, creates superposition from |0\rangle, is a 180° rotation, and opens every quantum algorithm. The rest of this section goes deeper: why the Hadamard is really a basis change, its role in the discrete Fourier transform on \mathbb{Z}_2, why this specific rotation is the "natural" one, and how H fits into the Clifford group that structures quantum error correction.

H as a change of basis

Every unitary matrix can be read as a change of basis. H's columns, \tfrac{1}{\sqrt{2}}(1, 1)^T and \tfrac{1}{\sqrt{2}}(1, -1)^T, are exactly |+\rangle and |-\rangle expressed in the computational basis. So H is the matrix whose columns are the new basis vectors — and that is precisely the "change of basis" matrix from the plus-minus basis to the computational basis.

Equivalently, applying H to a state |\psi\rangle expressed in the computational basis gives you the representation of the same physical state in a basis rotated from it — or, said more slickly, applying H converts a state that was \alpha|+\rangle + \beta|-\rangle (in plus-minus notation) into \alpha|0\rangle + \beta|1\rangle (in computational notation).

This is why the H-before-measurement trick works. If you want to measure in the plus-minus basis (asking "is the qubit |+\rangle or |-\rangle?") but your hardware only measures in the computational basis, apply H first and then measure. The H rotates the measurement axis from x to z, so a z-measurement after H is effectively an x-measurement before it.

More generally, this is how every "measurement in an arbitrary basis" is implemented on real quantum hardware: rotate the state so that the basis you wanted becomes the computational basis, then measure. A Hadamard is the specific rotation that accomplishes the X-basis-to-Z-basis swap.

H as the Fourier transform on Z₂

Here is where the Hadamard's full name becomes honest: the Hadamard transform is the quantum Fourier transform on a two-element group.

The discrete Fourier transform on a group G of order N takes a function on G and rewrites it in terms of the characters of G. For the simplest non-trivial group — \mathbb{Z}_2, the group of two elements with addition mod 2 — the Fourier transform is exactly H (up to normalisation). That is, H is literally the Fourier transform on one bit.

For n bits — the group \mathbb{Z}_2^n — the Fourier transform is H^{\otimes n}, a Hadamard on every qubit.

This is not numerology. It explains why quantum algorithms built on "period finding" (Simon's algorithm, Shor's algorithm) start and end with Hadamard layers: those layers are the Fourier transforms that convert between "values" and "frequencies" of quantum states, in the same way a classical Fourier transform converts between time and frequency. Interference in the frequency domain is how Shor and Simon extract global structure that no classical algorithm can match in polynomial time.

When you see H^{\otimes n} bookending a circuit, read it as: "enter the Fourier domain, do your trick, return to the value domain, measure." The Hadamard is where the entire idea of "quantum Fourier" starts.

Why H, and not some other rotation

You might wonder: of all the possible 180° rotations on the Bloch sphere, why is the specific one between x and z the one that gets a name?

Three reasons, in increasing order of depth.

First, it is the one that swaps the two bases you always care about. The computational basis (z-axis) and the plus-minus basis (x-axis) are the two most natural bases for a single qubit — the computational basis because that is how measurement hardware works, and the plus-minus basis because that is where phase information lives. The Hadamard axis bisects them, so H is precisely the rotation that swaps them.

Second, it has rational (and real) matrix entries. H = \tfrac{1}{\sqrt{2}}\begin{pmatrix}1 & 1 \\ 1 & -1\end{pmatrix} has entries that are \pm 1/\sqrt{2}, which means the only non-trivial real number involved is 1/\sqrt{2} for normalisation. Rotations by other angles (like 45° about the x-axis) have trigonometric entries like \cos(22.5°), which are irrational and ugly. The clean form makes H cheap to reason about on paper and easy to compile on hardware.

Third, it is self-inverse. Many rotations you could write down require a separate inverse gate. H does not. You apply H once to enter a superposition; you apply it again to exit. One gate, two uses. That economy is why circuit designers reach for H instead of some less-convenient alternative.

Together, these properties make H the single most useful non-Pauli single-qubit gate.

H and the Clifford group

The single-qubit gates \{H, S, X, Y, Z\} (where S is the phase gate, the 90° rotation about the z-axis you will meet in the next chapter) generate a finite group called the single-qubit Clifford group. There are 24 of them — the same as the symmetry group of a cube.

The Clifford group has a very useful property: it maps Pauli operators to Pauli operators. That is, conjugating any Pauli by a Clifford gate gives another Pauli. Concretely: HXH = Z, HZH = X, HYH = -Y. The Pauli Y picks up a minus sign (a global phase), but X and Z swap exactly.

This "Pauli-to-Pauli" property is why the Clifford group is the backbone of quantum error correction [5]. Error-correcting codes typically protect against Pauli errors on individual qubits; doing computation on an encoded qubit by applying only Clifford gates keeps the error structure tractable. The Hadamard, being a Clifford gate, is one of the gates that can be done "cheaply" on a fault-tolerant quantum computer.

What Cliffords alone cannot do is universal quantum computation — that requires at least one non-Clifford gate (conventionally T, the 45° z-rotation). Chapter 24 explores this: the T-gate is the expensive one that breaks out of the Clifford group and unlocks the rest of quantum computation. But H is the cheap workhorse.

The Bose connection

One of the deep reasons quantum mechanics can even be written in terms of qubits — identical, interchangeable, indistinguishable units — goes back to Satyendra Nath Bose's 1924 paper on photon statistics. Bose established that in quantum mechanics, identical particles must be treated as genuinely identical: their states combine with specific symmetry properties, and no observable can distinguish one from another.

Qubits, in a quantum computer, inherit this principle: two qubits in the same state are not "qubit number 1" and "qubit number 2" but two interchangeable copies of the same quantum object. The Hadamard acting independently on each of them — H^{\otimes n} — builds a uniform superposition not just because of the matrix algebra, but because the underlying particles are genuinely symmetric. Bose's insight, published when he was lecturing at Dhaka University, is why this works. Without Bose statistics as the foundation, "apply H to every qubit" would not be a sensible instruction.

Where this leads next

References

  1. Nielsen and Chuang, Quantum Computation and Quantum Information (2010), §1.3.1 and §4.2 — Cambridge University Press.
  2. John Preskill, Lecture Notes on Quantum Computation, Ch. 6 (quantum Fourier transform and the Hadamard) — theory.caltech.edu/~preskill/ph229.
  3. Wikipedia, Hadamard gate — the matrix, circuit symbol, and Clifford-group role.
  4. Qiskit Textbook, Single Qubit Gates — hands-on H, X, Y, Z with live simulators.
  5. Daniel Gottesman, The Heisenberg Representation of Quantum Computers (1998) — the Clifford-group structure that makes HXH = Z an error-correction workhorse. arXiv:quant-ph/9807006.
  6. Wikipedia, Satyendra Nath Bose — the 1924 statistics paper behind qubit indistinguishability.