Qubit in a mix sin/cosine state


The question is pretty simple. How can I get an input qubit $|0⟩$ in the state, say $$\cos{\frac{\pi}{10}}|0⟩ + \sin{\frac{\pi}{10}}|1⟩$$ Or any other sine/cosine mix state? Which gates do I need to use?



Posted 2020-03-26T23:38:42.683

Reputation: 101

What gates do you have available? – DaftWullie – 2020-03-27T06:10:30.043



$$R_y(\theta) = e^{-i\frac{\theta}{2}Y} = \begin{bmatrix} \cos\frac{\theta}{2} & -\sin\frac{\theta}{2} \\ \sin\frac{\theta}{2} & \cos\frac{\theta}{2} \end{bmatrix}$$

This gate might be named slightly differently depending on the source; Wikipedia doesn't seem to know it but this primer on rotations on Bloch sphere lists all rotation gates nicely.

Mariia Mykhailova

Posted 2020-03-26T23:38:42.683

Reputation: 6 616

Just to add, on IBM Q the gate $R_y$ is implemented, you can also use $U3$ gate with parameters $\phi = \lambda = 0$ giving y-rotation. – Martin Vesely – 2020-03-27T05:17:43.557

Thanks for your help Mariia and Martin. It means a lot! – Annonymus – 2020-03-27T18:10:49.583