  Quantum devices need precise control to achieve their full capability. In
this work, we address the problem of controlling closed quantum systems,
tackling two main issues. First, in practice the control signals are usually
subject to unknown classical distortions that could arise from the device
fabrication, material properties and/or instruments generating those signals.
Second, in most cases modeling the system is very difficult or not even viable
due to uncertainties in the relations between some variables and
inaccessibility to some measurements inside the system. In this paper, we
introduce a general model-free control approach based on deep reinforcement
learning (DRL), that can work for any closed quantum system. We train a deep
neural network (NN), using the REINFORCE policy gradient algorithm to control
the state probability distribution of a closed quantum system as it evolves,
and drive it to different target distributions. We present a novel controller
architecture that comprises multiple NNs. This enables accommodating as many
different target state distributions as desired, without increasing the
complexity of the NN or its training process. The used DRL algorithm works
whether the control problem can be modeled as a Markov decision process (MDP)
or a partially observed MDP. Our method is valid whether the control signals
are discrete- or continuous-valued. We verified our method through numerical
simulations based on a photonic waveguide array chip. We trained a controller
to generate sequences of different target output distributions of the chip with
fidelity higher than 99%, where the controller showed superior performance in
canceling the classical signal distortions.
