  We develop an optimization-based maximum likelihood approach to analyze the
cross-correlation of the Cosmic Microwave Background (CMB) and large-scale
structure induced by the kinetic Sunyaev-Zeldovich (kSZ) effect. Our main goal
is to reconstruct the radial velocity field of the universe. While the existing
quadratic estimator (QE) is statistically optimal for current and near-term
experiments, the likelihood can extract more signal-to-noise in the future. Our
likelihood formulation has further advantages over the QE, such as the
possibility of jointly fitting cosmological and astrophysical parameters and
the possibility of unifying several different kSZ analyses. We implement an
auto-differentiable likelihood pipeline in JAX, which is computationally
tractable for a realistic survey size and resolution, and evaluate it on the
Agora simulation. We also implement a machine learning-based estimate of the
electron density given an observed galaxy distribution, which can increase the
signal-to-noise for both the QE and the likelihood method.
