Quantum Lab
Quantum Lab

An interactive quantum mechanics learning platform and cryostat wiring co-design tool. From plain-language intuition to formal mathematics.

contact@quantumcircuitsimulator.com

Product

  • Circuit Lab
  • Learn
  • Hardware Studio
  • Pricing

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Quantum Lab. All rights reserved.

This site, including its original quantum simulations, cryostat reference systems, 3D models, and interface design, contains protected proprietary material.

Home/Quantum Physics/Lessons/Hadamard Gate
H

Hadamard Gate

BasicSingle-qubitsuperposition

Creates equal superposition from a basis state.

Intuition

The Hadamard gate is often the first gate you encounter in quantum computing, and for good reason. It takes a qubit that is definitely in |0⟩ or |1⟩ and puts it into an equal superposition of both possibilities. This is the fundamental operation that separates quantum computing from classical computing — it creates the parallelism that quantum algorithms exploit. Think of it as opening a door: before Hadamard, your qubit is locked into one value. After Hadamard, both values exist simultaneously as amplitudes in the quantum state, ready for interference and entanglement.

Matrix representation
2​1​(11​1−1​)
Action on states
∣0⟩→2​∣0⟩+∣1⟩​,∣1⟩→2​∣0⟩−∣1⟩​
Bloch sphere
|0⟩
→
|+⟩
Circuit
Open in simulator →
q0H
▶ Try it in the simulator
State comparison
Before Hadamard
|0⟩
|0\u27E9
100%
|1\u27E9
0%
Bloch: (0.00, 0.00, 1.00)
→
After Hadamard
|+⟩
|0\u27E9
50%
|1\u27E9
50%
Bloch: (1.00, 0.00, 0.00)
Precise explanation

Hadamard is a unitary, Hermitian, and involutory operator (H² = I). It maps the computational basis to the diagonal basis: |0⟩ → |+⟩ = (|0⟩ + |1⟩)/√2 and |1⟩ → |−⟩ = (|0⟩ − |1⟩)/√2. Geometrically, it is a 180° rotation around the axis halfway between X and Z on the Bloch sphere. The key insight is that H creates states with definite relative phase (±0), and that phase carries information even though the measurement probabilities look identical for |+⟩ and |−⟩ in the computational basis.

Observable effect

Measurement odds spread to roughly 50/50.

Hidden effect

The relative phase (± sign) carries information that a later Hadamard or interference step can reveal.

Bloch sphere

Rotates 180° around the axis halfway between X and Z. Maps the north pole (|0⟩) to the equator (|+⟩) and the south pole (|1⟩) to the opposite equatorial point (|−⟩).

Worked example

Creating and undoing superposition

  1. 1Start with |0⟩, the qubit at the north pole of the Bloch sphere.
  2. 2Apply H: the state becomes (|0⟩ + |1⟩)/√2. Measurement now gives 0 or 1 with equal probability.
  3. 3Apply H again: since H² = I, the state returns to |0⟩. Measurement gives 0 with certainty.
  4. 4This round-trip shows that Hadamard is its own inverse — it undoes itself.
Common use cases
  • Creating superposition at the start of nearly every quantum algorithm
  • Switching between computational and diagonal bases
  • Building interference circuits (H–Z–H = X)
  • Preparing the input register in Deutsch’s and Deutsch–Jozsa algorithms
  • Generating uniform superpositions for Grover’s search
Relation to other gates
  • H² = I — applying Hadamard twice returns to the original state
  • HZH = X — Hadamard conjugates Z into X, converting phase flips to bit flips
  • HXH = Z — the reverse conjugation also holds
  • H is equivalent to RY(π/2) followed by a phase correction
Common misconception

Hadamard does not make a qubit “both 0 and 1 at once” in any classical sense. It creates a superposition where both outcomes have well-defined amplitudes, but each measurement still produces a single definite result.

Why this gate matters

Without Hadamard, quantum circuits would just be classical permutations. It is the gateway to superposition, and superposition is what makes interference and quantum speedups possible.

Test your understanding

You apply H to |0⟩ and then apply H again. What state do you get?

▶ Try it in the simulatorQuick reference →↗ Nielsen and Chuang, Quantum Computation and Quantum Information↗ MIT OCW 8.06: quantum computing notes
←
Previous
Z Gate
Next
CNOT
→
← Back to all lessons