0

Suppose I want to put a qubit whose initial state is $|0\rangle$ to the final state $\frac{1}{\sqrt{3}}|0\rangle + \sqrt{\frac{2}{3}}|1\rangle$.

Well, in that case, the unitary matrix that performs such operation is given by: $$U = \frac{1}{\sqrt{3}}\begin{pmatrix}1&-\sqrt{2}\\ \sqrt{2} & 1 \end{pmatrix}$$ So the question is, how can I build a quantum circuit with the usual quantum gates (X, Y, Z, etc) which reproduces this behavior?

Dani
  • 287
  • 2
  • 8

1 Answers1

0

You can use $Ry$ (y-rotation gate). Its general matrix is

$$ Ry(\theta) = \begin{pmatrix} \cos(\theta/2) & -\sin(\theta/2) \\ \sin(\theta/2) & \cos(\theta/2) \end{pmatrix} $$

Applying the gate on $|0\rangle$ state, you get a state

$$ |\psi\rangle = \cos(\theta/2)|0\rangle + \sin(\theta/2)|1\rangle $$

Hence $\cos(\theta/2) = \frac{1}{\sqrt{3}}$ and

$$ \theta = 2\arccos\Big(\frac{1}{\sqrt{3}}\Big) = 1.910633. $$

You can validate that such setting of $\theta$ gets your matrix $U$.

Martin Vesely
  • 15,244
  • 4
  • 32
  • 75