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?
-1.875( \sigma_z \otimes \sigma_z )$.
– Sanchayan Dutta Oct 19 '18 at 12:24matrix 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 Oct 19 '18 at 12:55