1
$\begingroup$

How does a controlled R gate look like (matrixwise)? And how to generate CCR, CCCR and so on?

$\endgroup$

2 Answers 2

4
$\begingroup$

I found the answer and it seems like for a gate

$$ U = \begin{bmatrix} x_{00} & x_{10}\\ x_{00} & x_{11} \end{bmatrix} $$

its controlled variant would be: $$ CU=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & x_{00} & x_{01} \\ 0 & 0 & x_{10} & x_{11} \end{bmatrix} $$

Hence for R, which is $$ R(\theta) = \begin{bmatrix} 1 & 0\\ 0 & e^{i \theta} \end{bmatrix} $$

CR would be: $$ CR(\theta)=\begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & e^{i \theta} \end{bmatrix} $$

P.S.: Please, correct me if I'm wrong.

$\endgroup$
1
  • 1
    $\begingroup$ Yes, you are right. Similarly you can get a C...CU gate, $U$ is in the right bottom corner of a C...CU gate, other diagonal elements are ones and other non-diagonal elements are zeros. $\endgroup$ Dec 8, 2019 at 22:20
0
$\begingroup$

The phase shift is a family of single-qubit gates that map the basis states ket(0) to ket(0) and ket(1) to exp(i theta)* ket(1) so by using this we can find matrix of controlled phase shift operator.

$\endgroup$
1
  • $\begingroup$ Hi and welcome to Quantum Computing SE. Please use proper formating of maths with Latex. $\endgroup$ Jun 10, 2022 at 6:13

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.