  Accurate and efficient preparation of quantum state is a core issue in
building a quantum computer. In this paper, we investigate how to prepare a
certain single- or two-qubit target state from arbitrary initial states in
semiconductor double quantum dots with the aid of deep reinforcement learning.
Our method is based on the training of the network over numerous preparing
tasks. The results show that once the network is well trained, it works for any
initial states in the continuous Hilbert space. Thus repeated training for new
preparation tasks is avoided. Our scheme outperforms the traditional
optimization approaches based on gradient with both the higher designing
efficiency and the preparation quality in discrete control space. Moreover, we
find that the control trajectories designed by our scheme are robust against
static and dynamic fluctuations, such as charge and nuclear noises.
