QuantumAtlas

Gates & Circuits

Hadamard Gate

A fundamental single-qubit gate that creates an equal superposition of |0⟩ and |1⟩.

Definition

The Hadamard gate is one of the most widely used quantum gates, transforming a qubit in a definite state (|0⟩ or |1⟩) into an equal superposition of both. It's typically the very first gate applied in many quantum algorithms, including Grover's Algorithm and Shor's Algorithm.

In depth

The Hadamard gate is the most common gate for creating superposition. It sends the basis state 0 to the equal superposition of 0 and 1, and 1 to the equal superposition with a minus sign. Its matrix has entries of one over the square root of 2, with a minus sign in the lower right. It is its own inverse, so applying it twice returns the original state, which is a simple example of interference: the two paths to the outcome 1 cancel.

On the Bloch sphere, the Hadamard gate swaps the z and x axes, which makes it a change of measurement basis. A qubit that is definitely 0 in the computational basis becomes the plus state, definitely along the x axis, and the reverse. This is why Hadamards appear before and after oracles in algorithms such as Deutsch-Jozsa and Bernstein-Vazirani: they convert phase information into measurable bit values. Applying Hadamards to all n qubits of a register starting in 0 creates an equal superposition of all 2^n bit strings, the starting point for Grover's and Simon's algorithms.

The gate is not usually native on hardware. On superconducting devices it is built from a pi over 2 rotation and a phase change, and on ion devices from a combination of laser rotations, so it costs about the same as other single-qubit gates, which are the cheap ones. In error-corrected machines it is a Clifford gate, so it is cheap there too. Together with the T gate and CNOT, it forms the standard universal set, and it is used in the circuit that makes a Bell pair.

Technical Definition

Mathematically, the Hadamard gate is represented by the matrix H = (1/√2)[[1,1],[1,-1]]. Applied to |0⟩, it produces (1/√2)(|0⟩ + |1⟩); applied to |1⟩, it produces (1/√2)(|0⟩ - |1⟩).

Visual Explanation: An Analogy

Think of the Hadamard gate like flipping a fair coin that starts perfectly balanced on one edge — after the 'flip,' it has an exactly equal chance of landing heads or tails, representing the equal superposition created.

Key facts

ItemDetail
MatrixOne over the square root of 2 times the matrix with rows (1, 1) and (1, minus 1)
Action0 becomes the plus state, 1 becomes the minus state
Self-inverseApplying it twice gives the identity
On n qubitsCreates a uniform superposition of 2^n basis states
Clifford gateYes, so it is cheap on error-corrected hardware

Where the idea comes from

The matrix is named after Jacques Hadamard, who studied such matrices in 1893. Its role as the standard superposition-creating gate was established by Deutsch and Jozsa and by Simon in the early 1990s.

Real-World Use Cases

  • The standard way to initialize qubits into superposition at the start of an algorithm
  • Used repeatedly throughout the Quantum Fourier Transform
  • A key building block in creating Bell states when combined with a CNOT gate

How it differs from related ideas

  • A Hadamard creates equal-weight superpositions, while a rotation gate can create any weights.
  • The Hadamard swaps the X and Z bases, and the Pauli X gate only flips 0 and 1.
  • The Hadamard transform on n qubits is the quantum Fourier transform over bit strings.

Frequently asked questions

What does the Hadamard gate do?

It turns the 0 state into an equal superposition of 0 and 1, and it changes the measurement basis between Z and X.

Why is the Hadamard gate used in many algorithms?

It creates the uniform superpositions that algorithms start from and converts phase patterns into measurable outcomes.

Is the Hadamard gate reversible?

Yes. It is its own inverse.

Related Terms

Keep exploring

← Back to the dictionary