I am currently reading https://arxiv.org/abs/1501.03099.

In the third part of the paper, "Measuring and detecting quantumness", the authors define the SWAP operators, use them on the initial state $\rho_a \otimes \rho_a \otimes \rho_b\otimes \rho_b $ and take the trace.

Now, I know that $\mathrm{Tr}(\rho_a \otimes \rho_b)$ = $\mathrm{Tr}(\rho_a)\mathrm{Tr}(\rho_b)$ according to the property of the Trace operator on a product state. Does this mean that the SWAP operator acting on these two qubits must also preserve the trace?

Therefore if my interpretation is correct, I have two questions regarding this.

  1. Why would the SWAP operator $S_{CD}$ change the whole system state as the states of the qubits C and D are the same in equation (12)?

  2. How is the trace in equations (12) and (13) different if the SWAP operators must preserve trace? And how do these equations hold?

  • 1
    $\begingroup$ Can you make your post more self-contained, please? $\endgroup$ Commented Aug 8, 2020 at 11:27
  • $\begingroup$ @NorbertSchuch done $\endgroup$ Commented Aug 8, 2020 at 13:08
  • $\begingroup$ Making screenshots is not what "self-contained" means. $\endgroup$ Commented Aug 8, 2020 at 15:53
  • $\begingroup$ @NorbertSchuch, I apologize. I really don't know what I can do to make the question better. If you have any suggestions, I would be happy to follow them. $\endgroup$ Commented Aug 8, 2020 at 15:58
  • 3
    $\begingroup$ @netflix_and_physics The way it is now the person who wants to answer has to do all the work and find the relevant parts in your question. It would be better if you would just include the relevant parts in your posts. Just imagine someone would do the same in an answer - put a whole page as a screenshot and tell you to pick this and that equation. $\endgroup$ Commented Aug 9, 2020 at 12:55

1 Answer 1


The SWAP operator has been widely used to ``linearize'' polynomial functions of the density matrix. To understand this carefully, consider the following setup: Let $\mathcal{H} = \mathcal{H}_{A} \otimes \mathcal{H}_{A'}$, where $\mathcal{H}_{A} \cong \mathcal{H}_{A'}$, that is, we take two copies of the Hilbert space. The SWAP operator acting on this doubled space is defined as, $$ \hat{S} = \sum_{i, j}|i\rangle_{A}\langle j|\otimes| j\rangle_{A'}\langle i|. $$ Why is this the SWAP operator? It's easy to see from its action on product states (which is to swap them): $| ij \rangle \overset{\hat{S}}{\mapsto} | ji \rangle$.

Now, the simplest version of this linearization takes the form takes the form, $$ \operatorname{Tr}\left( \rho^{2} \right) = \operatorname{Tr}\left( \hat{S} \rho \otimes \rho \right) . $$ (The proof is straightforward, just expand the state $\rho$ and apply the definition of the SWAP operator). A slight generalization of this is $\operatorname{Tr}\left( \rho \sigma \right) = \operatorname{Tr}\left( \hat{S} \rho \otimes \sigma \right)$. This simple equation illustrates my claim of ``linearization'': we began with a quadratic function of the state but now it is in a linear form with just the trace of the product of two operators (at the expense of doubling the space). This observation can be generalized to a $m$-th order polynomial as: $$ \operatorname{Tr}\left\{\rho^{m}\right\}=\operatorname{Tr}\left\{\hat{S} \rho^{\otimes m}\right\}, \text{ where } \hat{S}\left|\psi_{1}\right\rangle \otimes \cdots \otimes\left|\psi_{m}\right\rangle=\left|\psi_{m}\right\rangle \otimes\left|\psi_{1}\right\rangle \otimes \cdots \otimes\left|\psi_{m-1}\right\rangle $$ is the cyclic shift operator (a generalization of the SWAP operator above).

With regard to your questions: note that $$ \operatorname{Tr}\left( \rho^{2} \right) = \operatorname{Tr}\left( \hat{S} \rho \otimes \rho \right) \neq \operatorname{Tr}\left( \rho \otimes \rho \right) = \operatorname{Tr}\left( \rho \right) \operatorname{Tr}\left( \rho \right) = \left( \operatorname{Tr}\left( \rho \right) \right)^2 . $$ As an example, consider any mixed state $\rho$, the $\operatorname{Tr}\left( \rho^{2} \right)$, also known as its purity is (strictly) $<1$, while it is normalized and therefore $\operatorname{Tr}\left( \rho \right) = 1$ and so the RHS is $1$. Hence, these two aren't equal.

In Eqns. (12) and (13) in the referenced paper, they iteratively use the SWAP on different spaces (they have four copies of the original Hilbert space) and use this to linearize expressions of the form $\operatorname{Tr}\left( \rho_{a}^{2} \rho_{b}^{2} \right)$. In particular, the SWAP doesn't preserve the trace (in the sense of the equation with the $\neq$ above) and is being used as a linerization trick.

Many useful tricks of this sort have been discussed in this (wonderful) paper: Measuring polynomial functions of states.

  • $\begingroup$ what would be in general for a permutation $\pi \in S_m$ (that is not necessarily a cyclic shift) $Tr( \pi A_1 \otimes \cdots \otimes A_m)$? $\endgroup$ Commented Nov 23, 2023 at 20:40
  • $\begingroup$ So if $\pi = (1...m)$ is the complete cycle then one gets $Tr(A_m ... A_2 A_1)$. In general one gets a trace polynomial, see e.g. Eq 30 in arxiv.org/abs/2002.12887 but this fact is known much longer, Kostant, Bertram (1958), "A theorem of Frobenius, a theorem of Amitsur–Levitski and cohomology theory", J. Math. Mech., 7 (2): 237–264, doi.org/10.1512%2Fiumj.1958.7.07019. $\endgroup$ Commented Jun 21 at 21:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.