2
A general $n$-qubit state can be written
| \psi \rangle = \sum_x c_x |x\rangle = \sum_x \Re (c_x) |x\rangle + i \Im (c_x) |x\rangle,
where the |x\rangle here denote the $n$-qubit Z basis states.
For each such state we can write an equivalent state for which all amplitudes are real. Since the complex nature of the amplitudes effectively adds an extra degree of superposition to the state, we need to add an extra qubit to the system to encode the same information. The n+1 qubit state | \tilde \psi \rangle equivalent to | \psi \rangle is then
| \tilde \psi \rangle = \sum_x \Re (c_x) |x\rangle \otimes |0\rangle + \Im (c_x) |x\rangle \otimes |1\rangle.
Note that the i in | \psi \rangle is replaced by the |1\rangle state on the extra qubit in | \tilde \psi \rangle.
a) For each n qubit unitary U we can define an equivalent n+1 qubit unitary \tilde U, such that
\tilde U (|x\rangle \otimes |0\rangle) = \widetilde{U |x\rangle}, \,\, \forall x
Write the effects of \tilde U (|x\rangle \otimes |0\rangle) and \tilde U (|x\rangle \otimes |1\rangle) in terms of U.
b) Show that any two gates \tilde U and \tilde V will combine equivalently to their counterparts U and V, i.e.,
\tilde U \tilde V = \widetilde{U V}.
c) The controlled-S gate is a two qubit gate which applies a phase of i when the two qubits are in the state |11\rangle and acts trivially otherwise. Find the equivalent gate acting on real states, and express it in terms of gates that we have seen already during the course.