0
$\begingroup$

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?

Thanks!

$\endgroup$
  • $\begingroup$ What gates do you have available? $\endgroup$ – DaftWullie Mar 27 at 6:10
2
$\begingroup$

$$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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Martin Vesely Mar 27 at 5:17
  • $\begingroup$ Thanks for your help Mariia and Martin. It means a lot! $\endgroup$ – Annonymus Mar 27 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.