This is one in a series of posts working through the exercises in the Quantum Country online introduction to quantum computing and related topics. The exercises in the original document are not numbered; I have added my own numbers for convenience in referring to them.
Exercise 4. Consider a quantum circuit in which the Hadamard gate is applied to a quantum state and then the outout is measured in the computational basis. Show that when the state
Answer: First consider the case when the state
So the result of applying to the state is the state .
In the general case the state will produce the result 0 with probability and the value 1 with probability when measured in the computational basis. Since the result in this case is we have and so the result will be with probability , with the result having probability . So the output as measured will always be .
When the state
So the result of applying to the state is the state , which when measured in the computational basis will always produce the value .