  The complexity of experimental quantum information processing devices is
increasing rapidly, requiring new approaches to control them. In this paper, we
address the problems of practically modeling and controlling an integrated
optical waveguide array chip, a technology expected to have many applications
in telecommunications and optical quantum information processing. This photonic
circuit can be electrically reconfigured, but only the output optical signal
can be monitored. As a result, the conventional control methods cannot be
naively applied. Characterizing such a chip is challenging for three reasons.
First, there are uncertainties associated with the Hamiltonian describing the
chip. Second, we expect distortions of the control voltages caused by the
chip's electrical response, which cannot be directly observed. Finally, there
are imperfections in the measurements caused by losses from coupling the chip
externally to optical fibers. We developed a deep neural network approach to
solve these problems. The architecture is designed specifically to overcome the
aforementioned challenges using a Gated Recurrent Unit (GRU)-based network as
the central component. The Hamiltonian is estimated as a blackbox, while the
rules of quantum mechanics such as state evolution is embedded in the structure
as a whitebox. The resulting overall graybox model of the chip shows good
performance both quantitatively in terms of the mean square error and
qualitatively in terms of the predicted waveforms. We use this neural network
to solve a classical and a quantum control problem. In the classical
application we find a control sequence to approximately realize a
time-dependent output power distribution. For the quantum application we obtain
the control voltages to realize a target set of quantum gates. The proposed
method is generic and can be applied to other systems that can only be probed
indirectly.
