= Solution
Define the <Hadamard basis> $|\pm\rangle=(|0\rangle\pm|1\rangle)/\sqrt2$ and write $s=e^{-i\phi}$. After $U_\phi$ the two-<qubit> <quantum state> is
$$
U_\phi|++\rangle=\frac{|00\rangle+s|01\rangle+|10\rangle+|11\rangle}{2}.
$$
Applying the <Hadamard gate> to the first <qubit> gives the normalized <quantum state>
$$
|\chi_2(\phi)\rangle
=\frac{2|00\rangle+(1+s)|01\rangle+(s-1)|11\rangle}{2\sqrt2}.
$$
For $\phi=n\pi$, $s=(-1)^n$, so
$$
\boxed{|\chi_2(n\pi)\rangle=
\begin{cases}
|0\rangle|+\rangle,&n\text{ even},\\
(|00\rangle-|11\rangle)/\sqrt2=|\phi^-\rangle,&n\text{ odd}.
\end{cases}}
$$
The first is a <product state>. The second is exactly the minus <Bell state> in the printed <phase gate> convention; its <reduced density matrices> are $I/2$.
For three <qubits>, let $U_{12}$ use the ordered pair $(1,2)$ and $U_{23}$ the ordered pair $(2,3)$. The two diagonal <quantum gates> commute. For $\phi=n\pi$ their action before the final <Hadamard gates> is
$$
U_{23}U_{12}|+++\rangle
=\frac1{\sqrt8}\sum_{a,b,c=0}^1(-1)^{n[(1-a)b+(1-b)c]}|abc\rangle.
$$
If $n$ is even this is $|+++\rangle$, and $H_1H_3$ gives $|0\rangle|+\rangle|0\rangle$. If $n$ is odd, group the <quantum superposition> by the middle <qubit>:
$$
U_{23}U_{12}|+++\rangle
=\frac{|+\rangle_1|0\rangle_2|-\rangle_3
-|-\rangle_1|1\rangle_2|+\rangle_3}{\sqrt2}.
$$
Since $H_{\rm Had}|+\rangle=|0\rangle$ and $H_{\rm Had}|-\rangle=|1\rangle$, the final states are
$$
\boxed{|\chi_3(n\pi)\rangle=
\begin{cases}
|0\rangle|+\rangle|0\rangle,&n\text{ even},\\
\displaystyle|G\rangle=\frac{|001\rangle-|110\rangle}{\sqrt2},&n\text{ odd}.
\end{cases}}
$$
The odd case is a <GHZ state>: each individual <qubit> has <reduced density matrix> $I/2$, and it is related to $(|000\rangle+|111\rangle)/\sqrt2$ by the local <Pauli gates> $Z_1X_3$. Conversely, applying those gates converts $|G\rangle$ to that standard form. They have not been applied in the printed network, so the actual output used in the next part is $|G\rangle=(|001\rangle-|110\rangle)/\sqrt2$.
Back to article page