  We study the preparation of coherent quantum states in a two-photon
micromaser for applications in quantum metrology. While this setting can be in
principle realized in a host of physical systems, we consider atoms interacting
with the field of a cavity. We focus on the case of the interaction described
by the Jaynes-Cummings Hamiltonian, which cannot be achieved by the
conventional approach with three-level atoms coupled to the cavity field at
two-photon resonance. We find that additional levels are required in order to
cancel Stark shifts emerging in the leading order. Once this is accomplished,
the dynamics of the cavity features a degenerate stationary state manifold of
pure states. We derive the analytic form of these states and show that they
include Schr\"odinger cat states with a tunable mean photon number. We also
confirm these states can be useful in phase estimation protocols with their
quantum Fisher information exceeding the standard limit. To account for
realistic imperfections, we consider single-photon losses from the cavity,
finite lifetime of atom levels, and higher order corrections in the far-detuned
limit, which result in metastability of formerly stationary cavity states and
long-time dynamics with a unique mixed stationary state. Despite being mixed,
this stationary state can still feature quantum Fisher information above the
standard limit. Our work delivers a comprehensive overview of the two-photon
micromaser dynamics with particular focus on application in phase estimation
and, while we consider the setup with atoms coupled to a cavity, the results
can be directly translated to optomechanical systems.
