Solution (source code)

= Solution

Run the perfect discriminator on the supplied state and record whether the result is $i=0$ or $i=1$. For each $i$, choose a unitary $V_i$ satisfying
$$
V_i|0\rangle=|\phi_i\rangle,
$$
which is possible by extending $|\phi_i\rangle$ to an orthonormal basis. Prepare two fresh systems in $|0\rangle|0\rangle$ and, controlled by the classical outcome $i$, apply $V_i\otimes V_i$. The output is
$$
|\phi_i\rangle|\phi_i\rangle.
$$
The discriminator may destroy its input; the two freshly prepared outputs still implement cloning on this known pair. This is the construction that <perfect discrimination implies cloning for a known state family>.