Solution (source code)

= Solution

Suppose $|W\rangle=(U_A\otimes U_B\otimes U_C)|GHZ\rangle$. Measure C in the <orthonormal basis> $\{U_C|0\rangle,U_C|1\rangle\}$. Its two AB conditional <vectors> would be proportional to
$$
(U_A|0\rangle)\otimes(U_B|0\rangle),\qquad (U_A|1\rangle)\otimes(U_B|1\rangle),
$$
respectively. Both are <product states>, because measuring the original GHZ state's C factor in the <computational basis> selects $|00\rangle$ or $|11\rangle$. This contradicts part (i), which applies to every <basic measurement> basis of the W state's C factor. Therefore \b[no local <unitary transformation> maps GHZ to W].

An additional invariant makes the distinction visible without measurement records. Across the partition AB versus C, the GHZ <reduced density matrix> on C has <eigenvalues> $1/2,1/2$, whereas the W state's are $2/3,1/3$. By <local-unitary invariance of reduced-state spectra>, these spectra cannot be changed by local unitaries. This supplies the same impossibility and emphasizes that the proposed transformation is a product of unitaries, not arbitrary postselected local processing.