h-gate
Hadamard gate
Table of Contents
Hadamard gate
Hadamard gate (or H gate) is a single-qubit gate that maps the computational basis states and to equal superpositions. It is the most commonly used gate for creating superposition and appears at the start of most quantum algorithms.
The gate maps the computational basis to the Hadamard basis and back:
The Hadamard gate is its own inverse: , so . On the Bloch sphere, is a rotation about the axis halfway between and , which swaps the -axis with the -axis.
Creating superposition over qubits
Applying to each of qubits initialized to creates an equal superposition over all computational basis states:
This is the standard initialization step for Deutsch's algorithm, the Deutsch-Jozsa algorithm, Grover's algorithm, and the quantum Fourier transform.
List of code implementations
h-gate.md · Last modified:
