# What is the form of a unitary $U$ that preserves the marginals on a given state, $\text{Tr}_A(U\rho_{AB} U^\dagger) = \rho_B$?

Suppose for some quantum state $$\rho_{AB}$$ and unitary $$U_{AB}$$, one has

$$\text{Tr}_A(U\rho U^\dagger) = \rho_B$$

does this imply that $$U_{AB} = U_A\otimes I_B$$?

Also, the same question as above, but if it holds for all states, $$\rho_{AB}$$, is that sufficient to claim that $$U_{AB} = U_A\otimes I_B$$?

As glS says, if you can transform a single pure state $$|\psi\rangle$$ into another $$|\phi\rangle$$ with the same marginals, then there always exists a way of performing the transformation using a unitary of the form $$U_A\otimes I$$. You can easily see this in terms of the Schmidt decomposition of the two states. While this is always possible, it does not mean it is the only form that can achieve this. After all, $$U|\psi\rangle=|\phi\rangle$$ only defines one row of the unitary matrix, and there remains much freedom in the way it can be completed. I don't know if that's what the question meant, but I read it as asking to enumerate all those possibilities. Practically, that's not a very interesting thing to do.

On the other hand, if you demand a $$U$$ for which any bipartite pure state's marginals will be preserved, then, yes, $$U_A\otimes I$$ is the only way of writing this. We start to prove this by noting that $$U$$ must not be entangling: by definition, an entangling gate takes some separable state and makes it entangled, and hence there must be at least one state for which the marginals are not preserved. Thus, $$U$$ must be of separable form, meaning it's either$$^1$$ $$U_A\otimes U_B\qquad \text{or}\qquad (U_A\otimes U_B)\cdot\text{SWAP}.$$ In this first case, it's trivial that $$U_B=I$$, which we can verify simply by examining the action of $$U$$ on separable basis states. In the second case, a similar examination would require $$U_B=V_BV_A^\dagger$$ where $$V_A$$ and $$V_B$$ are the unitaries that convert some basis into the Schmidt bases of the two systems. This is clearly state dependent and therefore cannot work in general.

$$^1$$ I'm confident this is true for two qubits. I believe it's true for higher dimensional systems, but there's always a risk that my memory is being coloured by working with qubits too much.

There might be a better way to see this, but:

1. If $$\rho$$ is a pure product state, then yes, this implies that $$U$$ is also a local unitary operation. To see this, write $$\rho=\mathbb P(\psi)\otimes\mathbb P(\phi)$$ with $$\mathbb P(\psi)\equiv|\psi\rangle\!\langle\psi|$$ projector onto $$|\psi\rangle$$. Then $$\operatorname{Tr}_A(U\rho U^\dagger) = \sum_k \mathbb P(A_k |\phi\rangle),$$ where $$A_k\equiv (\langle k|\otimes I)U (|\psi\rangle\otimes I)$$. Note that we are essentially just doing the Kraus decomposition of the channel $$\mathbb P(\phi)\mapsto \operatorname{Tr}_A[U(\mathbb P(\psi)\otimes\mathbb P(\phi)) U^\dagger]$$.

So, the result of this operation is a convex combination of (rescaled versions of) the projectors $$\mathbb P(A_k|\phi\rangle)$$. If the result of this operation is to be a single projector $$\mathbb P(\phi)$$, being this by definition an extremal point, this is only possible if all $$A_k|\phi\rangle$$ are collinear, which in turn means that the channel has a single nontrivial Kraus operator (i.e. its Choi has rank 1).

More explicitly, that means that there are unitaries $$U_1,U_2$$ such that $$U=U_1\otimes U_2$$, where $$U_1$$ is such that $$U_1|\psi\rangle=|k\rangle$$, and then in turn we must have $$U_2=I$$.

2. On the opposite side, consider the totally mixed state, $$\rho=I/d_A d_B$$ with $$d_A,d_B$$ the dimensions of the two spaces. Then your condition is clearly satisfied for any $$U$$, including non-local ones.