← Exercise library← All exercises for this theme
Theme 3 — Postulates and Applications

The Hadamard gate and a single-qubit interferometer

Keywords: quantum computing · Hadamard gate · phase gate · interference · qubit · measurement

Exercise 1 : The Hadamard gate and a single-qubit interferometer

In quantum information, manipulations of a qubit are described by unitary operators called gates. We consider a qubit with orthonormal basis , the Hadamard gate and the phase gate , defined in this basis by the matrices

where is a real number. Note that the subscript distinguishes the Hadamard gate from the Hamiltonian.

Question 1
Show that is both Hermitian and unitary, and that . Deduce its possible eigenvalues, then determine them explicitly using the trace and the determinant.

Solution
The matrix is real and symmetric, hence Hermitian: . Let us compute its square:

Thus : the gate is unitary. This is the situation, frequent for quantum gates, of an operator which is at once an observable and an evolution operator. From we deduce that any eigenvalue satisfies , hence . The trace of vanishes and its determinant equals : the sum of the eigenvalues vanishes and their product equals , so both values and are indeed present. One may also note that .

Question 2
Compute and . The qubit being prepared in , we measure in the basis : give the probabilities of the two outcomes.

Solution
Reading off the columns of the matrix:

The Hadamard gate thus turns the basis states into balanced superpositions, which differ only by the relative sign. For the state , the Born rule gives

The measurement is perfectly random: preparing and then applying a Hadamard gate is in fact a standard method for producing a quantum random bit.

Question 3
We perform the following sequence, analogous to an interferometer: starting from , we apply , then , then again, and we measure in the basis . Compute the final state and show that

Interpret.

Solution
Let us follow the state step by step. After the first gate: . The phase gate leaves unchanged and multiplies by :

The second Hadamard gate sends to and to , hence the final state

Factoring out of each amplitude, and , so that

This is an interference pattern: the probabilities oscillate with the phase , like the output intensity of a Mach–Zehnder interferometer whose two beam splitters would be the Hadamard gates and whose path difference would be the phase gate. The two paths here are the two basis states, and their amplitudes add before taking the squared modulus. For , the qubit comes out in with certainty, since ; for , it comes out in with certainty.

Question 4
We repeat the same sequence, but we perform an intermediate measurement in the basis right after the first Hadamard gate, whose outcome we do not use. Show that the final probabilities become , whatever the value of . Comment.

Solution
After the first gate, the state is , and the intermediate measurement gives or with probability each: this is the reduction postulate. Let us follow each branch to the end. If the state is , the phase gate leaves it unchanged, and the last Hadamard gate produces : the final measurement gives with probability . If the state is , it becomes , a global phase with no effect, then : the final measurement again gives with probability . Averaging over the two branches,

independently of : the fringes have disappeared. The intermediate measurement has turned the superposition into a classical alternative, and probabilities add instead of amplitudes. Knowing which path the system took destroys the interference, even if the outcome of the measurement is ignored: this is the complementarity between which-path information and fringes, at the heart of the lessons on interferometry.