Fig. 3

Quantum optical neural networks (QONNs) for Hamiltonian simulation. a Ising model. A three-layer QONN is trained for a range of interaction strengths J/B ∈ [−5, 5] and the probability for particular output spin configuration is plotted (points) given the |↑↑〉 initialization state. The expected evolution is plotted alongside (lines). Critically, during the training process our QONN was never exposed to the initialization state. b Bose–Hubbard model. Number of layers required to reach a particular test error for the simulation of a (2,4) strongly interacting U/thop = 20 Bose–Hubbard Hamiltonian (schematic shown in inset) with t = 1. Training is performed 20 times for each layer depth, and the lowest test error is recorded. The single-layer system gives a mean error in the test set of 42% and seven layers yields an error of 0.1%