Trace-adjoint identity for partial transpose (source code)

= Trace-adjoint identity for partial transpose

For bipartite operators $X,Y$ in a fixed product basis,
$$
\operatorname{Tr}(XY^{T_B})=\operatorname{Tr}(X^{T_B}Y).
$$
Expand both operators in products of matrix units. On the transposed factor, the identity is $\operatorname{Tr}(AT)=\operatorname{Tr}(A^TT^T)$; bilinearity gives the bipartite result. It allows a negative <partial transpose> eigenvector to define an <entanglement witness>.