Problem in I.9.2 and I.9.3 of codebook

Hi @Manu_Chaudhary,

At the end of a quantum computation, we typically measure some physical observable relative to some basis (can sometimes be thought of as relative to some ‘orientation’ or axis). In many cases, these measurements are done in the computational basis, meaning relative to the |0 \rangle, |1 \rangle states.

For example, if we wanted to measure generic state |\psi \rangle in the computational basis, you can think of it as expressing |\psi \rangle as superposition of the computational basis states |\psi \rangle = c_{0} |0 \rangle + c_{1} |1 \rangle. Then doing a measurement on |\psi \rangle in the computational basis would yield the the state |0\rangle with probability |c_{0}|^{2} or it would yield the state |1\rangle with probability |c_{1}|^{2}.

In some cases, it is useful to do a measurement in a different basis. With our current example, that means you can also measure the state |\psi\rangle in a different basis, say the |y_{+}\rangle and |y_{+}\rangle states (which you should check/confirm form a basis). In that case, you can think of it as expressing |\psi \rangle as superposition of these new basis states |\psi \rangle = d_{0} |y_{+}\rangle + d_{1} |y_{-}\rangle. Your measurement would then be either the state |y_{+}\rangle with probability |d_{0}|^{2} or the state |y_{-}\rangle with probability |d_{1}|^{2}.

In the leadup to Codercise I.9.2, it tells you that to perform measurements in other bases, you need to rotate your states - this is what is shown in the Codebook in the case of rotating the Hadamard basis to the computational basis.

In the Codercise I.9.2, the y_basis rotation is performing the rotations needed to take the state |0 \rangle to the state |y_{+} \rangle as shown below:

y_basis_rotation_0_to_y+

and the rotations needed to take the state |1 \rangle to the state |y_{-} \rangle (I’ll let you draw the rotations for that one).

In Codercise I.9.3, you are taking the adjoint because you need to do the reverse rotation (take the state from the |y_{+} \rangle, |y_{-} \rangle basis states back to the |0 \rangle, |1\rangle states). I suggest you try to Exercise I.9.3 but for the |y_{+} \rangle, |y_{-} \rangle states instead of the Hadamard states and check that the numbers you get in Codercise I.9.3 match your calculations.

Hope that helps!

1 Like