  Optimizing the controls of quantum systems plays a crucial role in advancing
quantum technologies. The time-varying noises in quantum systems and the
widespread use of inhomogeneous quantum ensembles raise the need for
high-quality quantum controls under uncertainties. In this paper, we consider a
stochastic discrete optimization formulation of a binary optimal quantum
control problem involving Hamiltonians with predictable uncertainties. We
propose a sample-based reformulation that optimizes both risk-neutral and
risk-averse measurements of control policies, and solve these with two
gradient-based algorithms using sum-up-rounding approaches. Furthermore, we
discuss the differentiability of the objective function and prove upper bounds
of the gaps between the optimal solutions to binary control problems and their
continuous relaxations. We conduct numerical studies on various sized problem
instances based of two applications of quantum pulse optimization; we evaluate
different strategies to mitigate the impact of uncertainties in quantum
systems. We demonstrate that the controls of our stochastic optimization model
achieve significantly higher quality and robustness compared to the controls of
a deterministic model.
