See also: Hadamard matrix

Denoting by , the Hadamard gate does the following to the computational basis state:

In general, the Hadamard gate takes a superposition to

The matrix representation of the gate is

Just like the X Gate, the inverse of the Hadamard Gate is itself, which means the two Hadamard Gate cancel each other: This can be counterintuitive since one Hadamard Gate “spread out” in basis states to states like , but the second Hadamard Gate does not further “spread out” the states but instead restore the original basis states.