# How can the transformation between entangled states like two Bell states be derived?

As it is stated in this post: Transforming the first Bell state into the other Bell states, one can transform the $$|\phi^{+}\rangle$$ state to the $$|\psi ^{-}\rangle$$ by applying the tensor product of the X and Z Pauli gates, $$X \otimes Z$$.

Could you explain how this transformation is derived? More in general, given two arbitrary (entangled) states, how can I derive the transformation between them?

Furthermore, if I have two non-entangled many-qubit states, and I am trying to find the transformation between them, is it true that I can just find the transformations qubit by qubit and then combined these by taking their tensor product to get the overall transformation?

More precisely, let $$|\psi\rangle$$ and $$|\phi\rangle$$ be states with Schmidt decompositions $$|\psi\rangle = \sum_k \sqrt{p_k} (|u_k\rangle\otimes|v_k\rangle), \\ |\phi\rangle = \sum_k \sqrt{p_k} (|u_k'\rangle\otimes|v_k'\rangle).$$ Observe that the operator $$U$$ such that $$U|u_k\rangle=|u_k'\rangle$$ for all $$k$$ is unitary, and so is $$V$$ such that $$V|v_k\rangle=|v_k'\rangle$$. It follows that $$|\psi\rangle=(U\otimes V)|\phi\rangle$$.
In other words, given pure states with the same Schmidt coefficients, the local unitaries sending one in the other can be built as $$U = \sum_k |u_k'\rangle\!\langle u_k|, \qquad V = \sum_k |v_k'\rangle\!\langle v_k|.$$