1

I'm having a bit of trouble understand @DaftWullie's answer here.

I understood that the $4\times 4$ matrix $A$ $$ \frac{1}{4} \left[\begin{matrix} 15 & 9 & 5 & -3 \\ 9 & 15 & 3 & -5 \\ 5 & 3 & 15 & -9 \\ -3 & -5 & -9 & 15 \end{matrix}\right]$$

can be decomposed into Pauli matrices as:

$$A=15\mathbb{I}\otimes\mathbb{I}+9Z\otimes X+5X\otimes Z-3Y\otimes Y$$

So far so good.

Then he says:

Now, it is interesting to note that every one of these terms commutes. So, that means that $$ e^{iA\theta}=e^{15i\theta}e^{9i\theta Z\otimes X}e^{5i\theta X\otimes Z}e^{-3i\theta Y\otimes Y}. $$ You could work out how to simulate each of these steps individually, but let me make one further observation first: these commuting terms are the stabilizers of the 2-qubit cluster state. That may or may not mean anything to you, but it tells me that a smart thing to do is apply a controlled-phase gate. $$ CP\cdot A\cdot CP=15\mathbb{I}\otimes\mathbb{I}+9\mathbb{I}\otimes X+5X\otimes \mathbb{I}-3X\otimes X. $$

Now, I hadn't heard of clusters states before, but Wikipedia gave me some idea (I'll probably need to through it a few more times though).

Anyhow, as far as I know, the controlled phase gate $CP$ is basically a controlled-$R_{\phi}$ gate where $R_{\phi}$ is:

$$\left[\begin{matrix}1 & 0 \\ 0 & e^{i\phi}\end{matrix}\right]$$

So, controlled $R_{\phi}$ would be

$$\left[\begin{matrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & e^{i\phi} \end{matrix}\right]$$

This is where I am confused. Shouldn't $(\text{controlled }R_{\phi})A(\text{controlled }R_{\phi})$ contain a $\phi$ term somewhere? I don't understand how its Pauli decomposition $15\mathbb{I}\otimes\mathbb{I}+9\mathbb{I}\otimes X+5X\otimes \mathbb{I}-3X\otimes X$ contains no term containing the phase angle $\phi$. Wolfram Alpha also agrees that the matrix multiplication result of $\operatorname{CP\cdot A\cdot CP}$ must contain a phase term. So, I'm not quite sure how Pauli decomposition of $\operatorname{CP\cdot A\cdot CP}$ as stated by DaftWullie in his answer arises. Am I missing something?

Isn't this normally called the controlled-Z gate? It is a special case of the controlled phase shift gates when $\phi = \pi$ as far as I know. Also, if I consider $\phi$ to be $\pi$, then according to Wolfram $CP\cdot A\cdot CP$ should be $\text{diag}(15/4,15/4,15/4,-15/4)$. And for that, this Python script gives me $1.875 (\Bbb I \otimes \Bbb I )

-1.875( \sigma_z \otimes \sigma_z )$.

Maybe Wolfram is doing the matrix multiplication wrong. I'm checking again – Sanchayan Dutta – 2018-10-19T12:25:52.150

@Blue In terms of terminology, I guess you can use controlled-phase to mean arbitrary phase, but it is also used extensively meaning specifically $\phi=\pi$. The top google scholar results for the term all return $\phi=\pi$ instances. – DaftWullie – 2018-10-19T12:37:13.820

Thanks, makes sense! I realized that using the term

`matrix multiply`

in Wolfram Alpha causes it to multiply the matrices "element-wise", which is why it was giving the incorrect result. This time it looks OK: $$\left[\begin{matrix}15 & 9 & 5 & 3 \ 9 & 15 & 3 & 5 \ 5 & 3 & 15 & 9 \ 3 & 5 & 9 & 15\end{matrix}\right]$$ which decomposes into $$15(I \otimes I)+9( I \otimes X)+5(X \otimes I )+3(X \otimes X ) $$ according to the script. So apparently there was a sign error in the last term of Pauli decomposition in the other answer (which you had mentioned the possibility of). – Sanchayan Dutta – 2018-10-19T12:55:47.077This is the link for the matrix multiplication $\text{CP}\cdot A \cdot \text{CP}$. So, if I'm not mistaken, I just need to change $R_x(-3\theta)$ to $R_x(3\theta)$ in the final circuit to correct it, right? – Sanchayan Dutta – 2018-10-19T12:58:44.317

@Blue Actually, I don't agree with your initial expansion of A. I think you've used $Y\otimes Y$ instead of $-Y\otimes Y$. – DaftWullie – 2018-10-19T13:07:13.223

@Blue OK, so I did have a - sign issue, just much earlier than I expected! – DaftWullie – 2018-10-19T13:14:08.117

Yeah, it seems so :). You can use this code to check. (Sorry, I just deleted my previous comment as I thought I might have made a careless error while reading your answer :P)

– Sanchayan Dutta – 2018-10-19T13:15:20.037