  Homo- and heterodyne detection are fundamental techniques for measuring
propagating electromagnetic fields. However, applying these techniques to
stationary fields confined in cavities poses a challenge. As a way to overcome
this challenge, we propose to use repeated indirect measurements of a two-level
system interacting with the cavity. We demonstrate numerically that the
proposed measurement scheme faithfully reproduces measurement statistics of
homo- or heterodyne detection at the single-shot level. The scheme can be
implemented in various physical architectures, including circuit quantum
electrodynamics. Our results pave the way to the implementation of quantum
algorithms requiring linear detection, including quantum verification
protocols, in stationary modes.
