the unitaries are classical. It seems plausible that allowing these parameters to be in superpositions, whilst experimentally more challenging, could give further advantages.

Whilst adding the ancillary qubits ensures that the network is a strict generalisation of the classical network, it can of course be experimentally and numerically simpler to omit these. Then one would sacrifice performance in the classical mode of operation, and the network may not be as good as a classical network with the same number of neurons for all tasks.

Visualising the cost function landscape {#visualising-the-cost-function-landscape .unnumbered}
---------------------------------------

To gain intuitive understanding, one can visualise the gradient descent in 3D by reducing the number of free parameters. We sampled the cost surface and gradient descent path of a one-input neuron ($4 \times4$ unitary matrix). With the second qubit expressed as the dummy-then-output qubit, the task for the neuron was $\ket{+
}\otimes\ket{0}\rightarrow
\ket{+}\otimes\ket{0}$ and $\ket{-}\otimes\ket{0} \rightarrow
\ket{-}\otimes\ket{1}$. We optimised, similarly to Eq. \[eq:u\_nrestr\], over unitaries of the form $$U=\ket{\tau}\bra{\tau}\otimes \mathbb{1} + \ket{\tau^{\perp}}\bra{\tau^{\perp}}\otimes\sigma_{1},$$ where $\ket{\tau} = \cos(\theta/2)\ket{0} +
e^{i\phi}\sin(\theta/2)\ket{1}$ and $\ket{\tau^{\perp}} = \sin(\theta/2)\ket{0} -
e^{i\phi}\cos(\theta/2)\ket{1}$. We performed gradient descent along the variables $\theta$ and $\phi$ as shown by the red path in FIG. \[fig:grad\_des\_path\].

![\[fig:grad\_des\_path\]A 3-D plot of 