  A projective measurement on a quantum system prepares an eigenstate of the
observable measured. Measurements of collective observables can thus be
employed to herald the preparation of entangled states of quantum systems with
no mutual interactions. For large quantum systems numerical handling of the
conditional quantum state by the density matrix becomes prohibitively
complicated, but they may be treated by effective approximate methods. In this
article, we present a stochastic variant of cumulant mean-field theory to
simulate the effect of continuous optical probing of an atomic ensemble, which
can be readily generalized to describe more complex systems, such as ensembles
of multi-level systems and hybrid atomic and mechanical systems, and protocols
that include adaptive measurements and feedback. We apply the theory to a
system with tens of thousands of rubidium-87 atom in an optical cavity, and we
study the spin squeezing occurring solely due to homodyne detection of a
transmitted light signal near an atom-photon dressed state resonance, cf., a
similar application of heterodyne detection to this system [Nat. Photonics,
8(9), 731-736 (2014)].
