# How do I prove the identity for ${\rm tr}_p [e^{-iS\Delta t}(\rho\otimes\sigma)e^{iS\Delta t}]$ in Seth Lloyd's 2014 Quantum PCA Paper?

Equation (1) in Seth Lloyd's paper on Quantum PCA says:

$$\text{tr}_{p}\text{e}^{-iS\Delta t} \rho \otimes \sigma \text{e}^{iS\Delta t} = \cos^2(\Delta t)\sigma + \sin^2(\Delta t) \rho - i \sin(\Delta t)\cos(\Delta t) [\rho, \sigma]$$

Where $$S$$ is the swap matrix, and $$\Delta t$$ is a small slice of time $$t/n$$, and $$\sigma$$, $$\rho$$ are density matricies (we wish to apply $$\text{e}^{-i\rho t}$$ to density matrix $$\sigma$$)

How would I go about proving this?

Attempt:

From Wikipedia, we have that

$$\text{e}^{tA} = \text{e}^{st}[(\cosh(qt) - s \frac{\sinh(qt)}{q}) I + \frac{\sinh(qt)}{q} A]$$ where $$s = \frac{\text{tr}A}{2}$$ and $$q = \pm \sqrt{-\text{det}(A-sI)}$$, by Cayley-Hamilton. Thus, we can expand:

$$\text{tr}_{p} \text{e}^{-iS\Delta t} \rho \otimes \sigma \text{e}^{iS\Delta t} = \text{tr}_{p}(\text{e}^{-i\Delta t}(-I + S)\rho \otimes \sigma \text{e}^{i\Delta t} (-I + S)) = \text{tr}_{p}(\text{e}^{-i\Delta t}[\rho \otimes \sigma - S(\rho \otimes \sigma) - (\rho \otimes \sigma) S + \sigma \otimes \rho] \text{e}^{i\Delta t})$$

However, I do not see how this simplifies to $$\cos^2(\Delta t)\sigma + \sin^2(\Delta t) \rho - i \sin(\Delta t)\cos(\Delta t) [\rho, \sigma]$$.

Am I making a mistake in my math, or is there a trick that I am not seeing to simplify the expression I obtained down to the one in the paper?

1. Note that, for any pair of matrices $$A,B$$, you have $$e^A B e^{-A} = e^{{\rm ad}(A)} B \equiv \sum_{k=0}^\infty \frac{1}{k!}[\underbrace{A,[A,\cdots ,[A}_k,B]\cdots]] \equiv B + [A,B] + \frac12 [A,[A,B]] + \dots,$$ where $${\rm ad}(A)$$ denotes the adjoint operator, $${\rm ad}(A):B\mapsto [A,B]$$, and the complicated-looking object in the series is a repeated commutator with $$k$$ terms.
2. Note that, if $$S$$ is the SWAP operator, then $$\operatorname{Tr}_2\left(S(\rho\otimes\sigma)\right) = {\rm Tr}(\sigma\rho), \qquad \operatorname{Tr}_2\left((\rho\otimes\sigma)S\right) = {\rm Tr}(\rho\sigma).$$ Apart from directly showing this expliciting via the matrix elements of the components of the expression, you can see this identity quite nicely in diagrammatic notation.