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.
Table 4 Hadamard gate truth table
| Input | Output |
|
|
|
|
|
|
OpenLearn - Introduction to quantum computing
Except for third party materials and otherwise, this content is made available under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Licence, full copyright detail can be found in the acknowledgements section. Please see full copyright statement for details.





