Lindblad dissipator and ${\bar n}_\mathrm{th} $ the thermal photon number associated with the cavity dissipation. Letting $f$ ($\delta$) denote the drive amplitude (detuning), the cavity Hamiltonian $\hat H_0$ is $$\hat H_0 =- \delta {\hat c^\dag }\hat c - \left( f \hat c + \mathrm{H.c.} \right)  .$$ Finally, to extract the statistics of the photon number $\hat n = \hat c^\dag \hat c$, we couple the driven cavity to an ancilla qubit via $\hat H_{\mathrm{int}} \left( t\right)=    F(t) \hat n \hat \sigma_z /2$. With this setup in place, we solve the master equation in Eq.  to obtain the time-dependent qubit dephasing; from Eq. (\[Eq:MGFK\]), this directly yields the Keldysh-ordered MGF $\Lambda$ for the cavity photon number fluctuations. Even with an arbitrary time-dependent coupling $F(t)$, the qubit dephasing can be solved exactly using an extension of the phase space method in Ref. [@Utami2007] (see also SM [@SI]). An equivalent approach is to calculate correlation functions using standard techniques (e.g. quantum regression theorem, Heisenberg-Langevin equations) [@Gardiner2004], and then apply the Keldysh ordering defined in Eqs.  and . For the remainder of the paper, we will always take the long time limit $t_f \rightarrow \infty$, so that the fluctuations are stationary. One finds the 