[Math] Confusion with Trace and Dirac (Bra-Ket) notation

linear algebraoperator-theoryquantum mechanicstracevectors

I'm am confused with the following:

Let $|\psi\rangle$ and $|\phi\rangle$ be two qubit state vectors, with Bloch vectors $\mathbf{n}$ and $\mathbf{m}$ , respectively.
$$P_\psi = |\psi\rangle\langle\psi|\\ P_\phi = |\phi\rangle\langle\phi|
$$

Then,
$$
\begin{align}
\text{Tr}(P_\psi P_\phi) &= \text{Tr}(|\psi\rangle\langle\psi| |\phi\rangle\langle\phi|)
\\&= \text{Tr}(\langle\psi|\phi\rangle \langle\phi|\psi\rangle)
\\&= | \langle\psi|\phi\rangle | ^2
\end{align}
$$

I do not understand how one get's $\langle\psi|\phi\rangle \langle\phi|\psi\rangle$ from $|\psi\rangle\langle\psi| |\phi\rangle\langle\phi|$. It doesn't even seem to make sense to me since $\langle\psi|\phi\rangle \langle\phi|\psi\rangle$ is a scalar and $|\psi\rangle\langle\psi| |\phi\rangle\langle\phi|$ an operator.

Also, does it make sense to take the trace of a scalar? Is the trace of a scalar the scalar itself? If so, I understand that we would have
$$
\begin{align}
\text{Tr}(\langle\psi|\phi\rangle \langle\phi|\psi\rangle) &= \langle\psi|\phi\rangle \langle\phi|\psi\rangle
\\&= \langle\psi|\phi\rangle (\langle\psi|\phi\rangle)^*
\\&= | \langle\psi|\phi\rangle | ^2
\end{align}
$$

Best Answer

$\langle\psi |\phi\rangle\langle\phi|\psi\rangle$ is a 1x1 matrix (scalar) and the trace of a 1x1 matrix is the scalar itself. Therefore,

$$ \text{Tr}(\langle\psi |\phi\rangle\langle\phi|\psi\rangle) = \langle\psi|\phi\rangle \langle\phi|\psi\rangle $$

Or, in english, the trace of a scalar is the scalar itself!


It has nothing to do with the fact that $$ |\psi\rangle\langle\psi|\phi\rangle\langle\phi| \neq \langle\psi|\phi\rangle \langle\phi|\psi\rangle $$ It is, instead, to do with $$ \text{Tr}(AB)=\text{Tr}(BA) $$ (If A is an $m × n$ matrix and B an $n × m$ matrix)

Then, there is nothing wrong with: $$ \begin{align} \text{Tr}(|\psi\rangle\langle\psi |\phi\rangle\langle\phi|) &= \text{Tr}(\langle\psi |\phi\rangle\langle\phi|\psi\rangle) \\&= \langle\psi|\phi\rangle \langle\phi|\psi\rangle \\&= \langle\psi|\phi\rangle \overline{\langle\psi|\phi\rangle} \\&= | \langle\psi|\phi\rangle | ^2 \end{align} $$


Original Answer

Here is my proposed answer:

$$ \begin{align} \text{Tr}(P_\psi P_\phi) &= \text{Tr}(|\psi\rangle\langle\psi| |\phi\rangle\langle\phi|) \\&= \langle\psi|\phi\rangle \text{Tr}(|\psi\rangle\langle\phi|) \\&= \langle\psi|\phi\rangle \langle\phi|\psi\rangle \\&= \langle\psi|\phi\rangle \overline{\langle\psi|\phi\rangle} \\&= | \langle\psi|\phi\rangle | ^2 \end{align} $$ , which coincides with the original answer. Nevertheless, I still think that the method ilustrated in the question is wrong. Meaning that: $ |\psi\rangle\langle\psi|\phi\rangle\langle\phi| \neq \langle\psi|\phi\rangle \langle\phi|\psi\rangle $ , where the LHS is an operator and the RHS a scalar.


By the way, $$ \text{Tr}(|\psi\rangle\langle\phi|) = \langle\phi|\psi\rangle $$ comes from $$ \langle\phi|\psi\rangle = \sum_n \langle\phi|n\rangle\langle n|\psi\rangle $$

Related Question