  The Vera C. Rubin Observatory will, over a period of 10 years, repeatedly
survey the southern sky. To ensure that images generated by Rubin meet the
quality requirements for precision science, the observatory will use an Active
Optics System (AOS) to correct for alignment and mirror surface perturbations
introduced by gravity and temperature gradients in the optical system. To
accomplish this Rubin will use out-of-focus images from sensors located at the
edge of the focal plane to learn and correct for perturbations to the
wavefront. We have designed and integrated a deep learning model for wavefront
estimation into the AOS pipeline. In this paper, we compare the performance of
this deep learning approach to Rubin's baseline algorithm when applied to
images from two different simulations of the Rubin optical system. We show the
deep learning approach is faster and more accurate, achieving the atmospheric
error floor both for high-quality images, and low-quality images with heavy
blending and vignetting. Compared to the baseline algorithm, the deep learning
model is 40x faster, the median error 2x better under ideal conditions, 5x
better in the presence of vignetting by the Rubin camera, and 14x better in the
presence of blending in crowded fields. In addition, the deep learning model
surpasses the required optical quality in simulations of the AOS closed loop.
This system promises to increase the survey area useful for precision science
by up to 8%. We discuss how this system might be deployed when commissioning
and operating Rubin.
