1
$\begingroup$

I read that the relation $\operatorname{CPHASE}_{12}=\operatorname{CPHASE}_{21}$ in the matrix representation but when I tried to work it out I don't see how.

$\operatorname{CPHASE}_{12}$ acts in the following way:

$$\operatorname{CPHASE}_{12}|00\rangle=\operatorname{CPHASE}_{12}|0\rangle|0\rangle=|0\rangle|0\rangle=|00\rangle$$

$$\operatorname{CPHASE}_{12}|01\rangle=\operatorname{CPHASE}_{12}|0\rangle|1\rangle=|0\rangle|1\rangle=|01\rangle$$

$$\operatorname{CPHASE}_{12}|10\rangle=\operatorname{CPHASE}_{12}|1\rangle|0\rangle=|1\rangle(-|0\rangle)=-|10\rangle$$

$$\operatorname{CPHASE}_{12}|11\rangle=\operatorname{CPHASE}_{12}|1\rangle|1\rangle=|1\rangle(-|1\rangle)=-|11\rangle$$

Which means its matrix representation is:

$$\operatorname{CPHASE}_{12}= \begin{pmatrix} 1 &0&0&0\\0&1&0&0\\0&0&-1&0\\0&0&0&-1 \end{pmatrix}$$

$\operatorname{CPHASE}_{21}$ though acts as follows:

$$\operatorname{CPHASE}_{21}|00\rangle=\operatorname{CPHASE}_{12}|0\rangle|0\rangle=|0\rangle|0\rangle=|00\rangle$$

$$\operatorname{CPHASE}_{21}|01\rangle=\operatorname{CPHASE}_{12}|0\rangle|1\rangle=(-|0\rangle)|1\rangle=-|01\rangle$$

$$\operatorname{CPHASE}_{21}|10\rangle=\operatorname{CPHASE}_{12}|1\rangle|0\rangle=|1\rangle|0\rangle=|10\rangle$$

$$\operatorname{CPHASE}_{21}|11\rangle=\operatorname{CPHASE}_{12}|1\rangle|1\rangle=(-|1\rangle)|1\rangle=-|11\rangle$$

Which will give matrix representation:

$$\operatorname{CPHASE}_{21}=\begin{pmatrix} 1 &0&0&0\\0&-1&0&0\\0&0&1&0\\0&0&0&-1 \end{pmatrix}$$

Obviously, the way I have done it has not produced the aforementioned identity, so where am I going wrong?

$\endgroup$
2
$\begingroup$

The gates you calculated are not controlled gates.

The $\operatorname{CPHASE}_{12}$ and $\operatorname{CPHASE}_{21}$ you calculated are just $\sigma_z \otimes \mathbb{I}$ and $\mathbb{I} \otimes \sigma_z$ respectively. These are not controlled gates. A general controlled phase gates controlled on 1 is

\begin{equation} \operatorname{CPHASE}_{12} = \vert 0 \rangle \langle 0 \vert \otimes \mathbb{I} + \vert 1 \rangle \langle 1 \vert \otimes R_{\phi}, \end{equation}

where, \begin{equation} R_{\phi} = \begin{bmatrix} 1 & 0 \\ 0 & e^{i\phi} \end{bmatrix} \end{equation}

Which means $\operatorname{CPHASE}_{12}$ is \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & e^{i\phi} \end{bmatrix} You can similarly calculate the other one, Now, even these gates are not equivalent, maybe you read that their action on some states are equivalent. Please provide the reference of your claim about the equivalency of the two gates.

How to relate to $\operatorname{CNOT}_{12}$

For $\phi = \pi$ \begin{equation} \operatorname{CPHASE}_{12} = \vert 0 \rangle \langle 0 \vert \otimes \mathbb{I} + \vert 1 \rangle \langle 1 \vert \otimes R_{\pi} = \vert 0 \rangle \langle 0 \vert \otimes \mathbb{I} + \vert 1 \rangle \langle 1 \vert \otimes \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}, \end{equation} A $\operatorname{CNOT}_{12}$ gate is \begin{equation} \operatorname{CNOT}_{12} = \vert 0 \rangle \langle 0 \vert \otimes \mathbb{I} + \vert 1 \rangle \langle 1 \vert \otimes \sigma_x = \vert 0 \rangle \langle 0 \vert \otimes \mathbb{I} + \vert 1 \rangle \langle 1 \vert \otimes \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}, \end{equation}

Which means, \begin{equation} \operatorname{CNOT}_{12} = (\mathbb{I} \otimes R^{\pi/2}_y) \cdot \operatorname{CPHASE}_{12} \cdot (\mathbb{I} \otimes R^{-\pi/2}_y) \end{equation}

$\endgroup$
  • $\begingroup$ I don't understand how this matrix can be the $CNOT_{12}$ gate ( I'm not saying you're wrong but I don't understand) . We want the phase to be flipped if the first qubit is 1, so I would have thought the transformation would be $|\psi \rangle = c_{00}|00>+c_{01}|01>+c_{10}|10 \rangle +c_{11}|11\rangle \rightarrow c_{00}|00>+c_{01}|01>-c_{10}|10 \rangle -c_{11}|11\rangle$, but it looks to me as though the gate you provided will give $|\psi \rangle = c_{00}|00>+c_{01}|01>+c_{10}|10 \rangle +c_{11}|11\rangle \rightarrow c_{00}|00>+c_{01}|01>+c_{10}|10 \rangle -c_{11}|11\rangle$, $\endgroup$ – bhapi Apr 27 at 19:55
  • $\begingroup$ And the identity was from an assignment paper I only have a paper copy of. Note though that it was the second assignment we're on assignment 8 now, dealing with open quantum systems, so this isn't a homework question I'm just going back over everything for exams $\endgroup$ – bhapi Apr 27 at 19:57
  • $\begingroup$ 1) For $\phi = \pi$ the above gate is controlled-z gate, you can shift the basis of second system to make the gate equivalent to $CNOT_{12}$. I can edit my answer to show this explicitly if this doesn't make sense! $\endgroup$ – Hemant Apr 27 at 20:14
  • $\begingroup$ That would be so helpful thank you so much :) I'm just a little lost about this one XD $\endgroup$ – bhapi Apr 27 at 20:17
  • $\begingroup$ 2) I think you are confused what controlled phase gate does. A CNOT gate applies a NOT gate depending on the control, similarly a CPHASE gate applies a phase gate depending on the control. what you are doing (by changing phases) is just a rotation operation its not controlled. $\endgroup$ – Hemant Apr 27 at 20:19

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.