Differentiable programming, i.e., the ability to differentiate general computer program structures, has enabled the efficient combination of existing packages for scientific computation and machine learning. In this talk, we demonstrate how differentiable programming can be used to automatize the control of quantum systems. We focus on a single qubit subject to homodyne detection, whose dynamics is described by a stochastic differential equation.