The Hadamard gate is a type of single-qubit quantum gate—a basic operation that can be applied to a qubit. Like all quantum gates, the Hadamard gate is a unitary transformation on a Hilbert space, and it is defined as follows:
When acted on either of the basis states, the Hadamard gate produces an even superposition of and :
with either of the measurement outcomes being equally likely.
Additionally, the Hadamard operation is its own inverse; applying it twice returns a qubit to its original state:
where is the identity matrix.