1
$\begingroup$

Is it possible in IBM quantum composer to set specific values for the amplitudes of a certain qubit, say alpha = 0.8 and beta = 0.6 ?

$\endgroup$

1 Answer 1

2
$\begingroup$

You can use RY-gate for this task. $$\begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}RY(\theta) = \exp\left(-i \th Y\right) = \begin{pmatrix} \cos{\th} & -\sin{\th} \\ \sin{\th} & \cos{\th} \end{pmatrix}\end{split}\end{aligned}\end{align}$$ You just need to get the angle $\theta$ such that alpha = 0.8 = $\cos(\theta/2)$

So, $\theta = 2\arccos(0.8) = 1.28700222$

enter image description here

$\endgroup$
1
  • $\begingroup$ Does it change something if you use RX or RZ gate instead ? $\endgroup$
    – Duen
    Mar 23, 2023 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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