generated by a polynomial length circuit of a given set of gates, it is natural to let the unitary be restricted to that set of gates.

The evaluation of the cost function can be kept to a sensible scaling if we restrict it to be a function of local observables on each qubit, in particular a function of the local Pauli expectation values, as was used in this paper, for which case a vector of $3n$ expectation values suffices for $n$ qubits.

Quantum photonics neuron module {#quantum-photonics-neuron-module .unnumbered}
===============================

To investigate the physical viability of these quantum neural networks we consider quantum photonics. This is an attractive platform for quantum information processing: it has room temperature operation, the possibility of robust miniaturisation through photonic integrated circuits; in general it harnesses the highly developed optical fibre-related technology for QIP purposes [@silicon]. Moreover optical implementations have been viewed as optimal for neural networks, in the classical case, due to the low design cost of adding multiple connections (as light passes through light without interacting) [@Rojas]. A final motivation for choosing this platform is that the tuning can be naturally implemented, as detailed below.

We design a neuron as a module that can 