Quantum Computing
Intermediate

Hadamard Gate

Puts a qubit into an equal superposition — the most common single-qubit gate.

Formula

H=12(111−1)H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}

Variables

HHadamard gate matrix

Example

H|0⟩ = (|0⟩ + |1⟩)/√2

How it works

The Hadamard gate is a single-qubit operation that mixes the amplitudes of |0⟩ and |1⟩ so that a definite basis state can become an equal quantum superposition. The factor 1/\sqrt{2} is there to keep the total probability equal to 1, because the squared magnitudes of the two output amplitudes must add up to 1. The sign flip in the lower-right entry creates a relative minus sign, which is what makes the gate useful for interference in quantum algorithms.

When to use it

Use the Hadamard gate when you want to create superposition before measurement, such as in quantum search, interference-based circuits, and Bell-state preparation. It is also a standard first step in many algorithms that need to spread probability across multiple computational paths.

Worked example, step by step

Start with the qubit |1⟩, written as the column vector \begin{pmatrix}0\\1\end{pmatrix} Apply the Hadamard matrix: H|1⟩ = \frac{1}{\sqrt{2}}\begin{pmatrix}1 & 1\\1 & -1\end{pmatrix}\begin{pmatrix}0\\1\end{pmatrix} Multiply the matrix by the vector: \begin{pmatrix}1\cdot 0 + 1\cdot 1\\1\cdot 0 + (-1)\cdot 1\end{pmatrix} = \begin{pmatrix}1\\-1\end{pmatrix} Include the scale factor: \frac{1}{\sqrt{2}}\begin{pmatrix}1\\-1\end{pmatrix} Write in ket notation: H|1⟩ = (|0⟩ - |1⟩)/\sqrt{2} Check normalization: (1/\sqrt{2})^2 + (-1/\sqrt{2})^2 = 1/2 + 1/2 = 1

Common mistakes to avoid

  • Forgetting the 1/\sqrt{2} factor and producing a non-normalized state
  • Thinking the Hadamard always gives the same output for |0⟩ and |1⟩; the relative sign changes
  • Treating the minus sign as a probability subtraction instead of a phase difference that affects interference

Did You Know?

Almost every quantum algorithm begins with Hadamard gates to create the superposition needed for quantum parallelism.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026