Is it possible to design a circuit implementing the unitary matrix

$$U-\begin{bmatrix} R_{\Theta_1} & 0 & 0 & 0 \\ 0 & R_{\Theta_2} & 0 & 0 \\ 0 & 0 & R_{\Theta_3} & 0 \\ 0 & 0 & 0 & R_{\Theta_4} \\ \end{bmatrix}$$

for given four angles $\Theta_1,...,\Theta_4$ , where 0 is 2×2-dimensional zero matrix and $R_{\Theta}$ is the rotation matrix with angle $\Theta$?

If so, can we implement it on the available quantum programming platforms such as Qiskit, CirQ, PyQuil, or ProjectQ?

  • $\begingroup$ If you write the matrix explicitly and the matrix is unitary, then for qiskit, you can first from qiskit.quantum_info.operators import Operator, and then O=Operator(yourUnitaryMatrix) $\endgroup$ – Yitian Wang Dec 11 '20 at 0:58
  • $\begingroup$ @YitianWang The matrix defined by Marija is always unitary as it made from rotation matrix. I think she is asking for a generalized parameterized circuit that this matrix can be decomposed into. $\endgroup$ – KAJ226 Dec 11 '20 at 4:38
  • $\begingroup$ Thanks for the prompt, the form of her matrix is unitary. The instruction my earlier provided can do such things, but I do not know how IBM quantum computer really do when simulating such an operation(like how they decompose a single-qubit unitary, i.e., one qubit sets of $\hat S, \hat H, \hat T$ or $\sigma_x, \sigma_z$ blabla). Other packages is out of my familiarity. $\endgroup$ – Yitian Wang Dec 11 '20 at 9:20

At worst, you could perform the construction enter image description here but depending on your different rotations, you may be able to make some efficiency savings. For example, one improvement that you can always make is you could start by applying $R_1$ on the first qubit without controlling it off anything, and then applying $R_iR_1^\dagger$ for the other three controlled-controlled operations.

  • $\begingroup$ Thank you for your help. $\endgroup$ – Marija Scekic Dec 30 '20 at 21:51

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.