Typo in Quantum Codebook I.6.4

I believe that the sign of \sin(\theta/2) should be positive in Exercise I.6.4
image

Hey @AvanishM! Welcome to the forum :sun_with_face:

The equations here are correct :slight_smile:. The X operator flips the qubit state:

X \vert 0 \rangle = \vert 1 \rangle,
X \vert 1 \rangle = \vert 0 \rangle.

So, the \vert 1 \rangle state with the \sin(\theta/2) coefficient flips to \vert 0 \rangle. Let me know if this makes sense!

Yes that makes sense, but I was actually looking at the first step, where we substitute RY(\theta) \vert 0 \rangle!

RY(\theta) \vert 0 \rangle = \cos(\theta/2) \vert 0 \rangle + \sin(\theta/2) \vert 1 \rangle

This example seems to have substituted:

RY(\theta) \vert 0 \rangle = \cos(\theta/2) \vert 0 \rangle - \sin(\theta/2) \vert 1 \rangle

What’s in the codebook is correct :slight_smile:

RY(\theta) \vert 0 \rangle = \begin{pmatrix} \cos(\theta/2) & -\sin(\theta/2) \\ \sin(\theta/2) & \cos(\theta/2) \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} \cos(\theta/2) + 0 \\ \sin(\theta/2) + 0 \end{pmatrix} = \cos(\theta/2)\vert 0 \rangle + \sin(\theta/2)\vert 1 \rangle