5.2.2 The Hadamard gate
The Hadamard gate is a single-qubit gate defined by a matrix
In a circuit diagram representing a quantum algorithm, the symbol for the Hadamard gate is shown in Figure 8.
Consider the action of a Hadamard gate on logical state .
First, the gate and logical state are written as matrices,
Next, the matrices are multiplied to obtain the final state matrix
Finally, the final state matrix is rewritten in terms of the logical states and :
You can see that the final output state, is a superposition state. This calculation shows that a Hadamard gate allows the transformation of the logical qubit state into a superposition state.
Exercise 13
Use matrices to work out the action of a Hadamard gate on logical state .
Answer
Noting, logical state and the Hadamard gate is Using matrices gives
You can see that the Hadamard gate has transformed logical state into a superposition state.
The effect on a general state can be determined by combining the results of the action of a Hadamard gate on logical states and .
All these results are summarised in the truth table for the Hadamard gate in Table 4.
| Input | Output |