Skip to content
quantum365

Glossary · Gates & circuits

Hadamard gate

Also called: H gate

In plain English

It's like flipping a coin into the air: the qubit stops being a plain 0 or 1 and becomes a perfect 50/50 toss, and doing it again lands it back where it started.

Definition: The Hadamard gate (H) is a single-qubit gate that turns 0 or 1 into an equal superposition of both. Applied twice, it undoes itself.

What the Hadamard gate does

The Hadamard gate, written H, acts on one qubit. It sends 0 to an equal mix of 0 and 1, and sends 1 to an equal mix too, but with a minus sign on the 1 part.

That minus sign is invisible if you measure straight away: both states give 50/50 odds. It matters the moment another gate follows, because it decides which amplitudes add up and which cancel.

Input Output after H Odds if measured
0 (0 + 1) / √2 50% 0, 50% 1
1 (0 − 1) / √2 50% 0, 50% 1

The maths in one line

As a matrix, H is 1/√2 times [[1, 1], [1, −1]]. The 1/√2 keeps the total probability at 100%. Multiply H by itself and you get the identity matrix, which is why two Hadamards cancel.

Why algorithms start with it

Put H on each of n qubits and the register holds an equal superposition of all 2ⁿ bit strings. Grover’s search algorithm, for example, starts exactly this way.

Simple example

Start a qubit in 0 and apply H. Measure it 1,000 times and you get roughly 500 zeros and 500 ones. Now apply H twice before measuring: you get 0 every single time, because the two paths to 1 cancel out.

FAQ

What does the Hadamard gate do in simple terms?

It puts a qubit into an even 50/50 superposition of 0 and 1. If the qubit is already in that kind of superposition, it turns it back into a definite 0 or 1.

Why is the Hadamard gate so important?

Most quantum algorithms, including Grover's search and Shor's factoring algorithm, begin by applying H to every qubit. That spreads the computer across all possible inputs at once so interference can later pick out the answer.

Is the Hadamard gate its own inverse?

Yes. Applying H twice returns the qubit to exactly where it started. In matrix terms, H multiplied by H gives the identity.

Sources

  1. 01Basics of quantum information: Single systems · IBM Quantum Learning (John Watrous)
  2. 02HGate (Qiskit API reference) · IBM Quantum documentation
  3. 03A fast quantum mechanical algorithm for database search · Lov Grover, arXiv, 1996

Researched with AI assistance and checked against the primary sources above, under the editorial standards set by our editor, Leon Avery. Spotted an error? See our editorial policy.

Newsletter

Quantum, minus the hype. Once a week.

The week's real quantum news in plain English, with why it matters and links to the sources. Free, no spam, unsubscribe any time.

We only use your email to send the newsletter. See our privacy policy.