  The problem of quantum state preparation is one of the main challenges in
achieving the quantum advantage. Furthermore, classically, for multi-level
problems, our ability to solve the corresponding quantum optimal control
problems is rather limited. The ability of the latter to feed into the former
may result in significant progress in quantum computing. To address this
challenge, we propose a formulation of quantum optimal control that makes use
of artificial boundary conditions for the Schr\"odinger equation in combination
with spectral methods. The resulting formulations are well suited for
investigating periodic potentials and lend themselves to direct numerical
treatment using conventional methods for bounded domains.
