# Gaussian Quantum Trajectories for the Variational Simulation of Open Quantum-Optical Systems
## Quantum Trajectories for Expectation Values and Gaussianity
### Quantum Trajectories for Expectation Values
#### 2.1.2 Homodyne and Heterodyne Unravelings  
Apart from photon-counting, (generalized) homodyne detection can be performed, where the emitted light is interfered with a classical reference signal (local oscillator) \(\beta=|\beta|e^{i\omega_{L}t}\), resulting in the measurement of the quadrature variables \(X\) and \(P\) (these are defined by \(\hat{X}=\frac{\hat{\mathrm{a}}+\hat{\mathrm{a}}^{\dagger}}{2}\) and \(\hat{P}=\frac{\hat{\mathrm{a}}-\hat{\mathrm{a}}^{\dagger}}{2i}\), analogous to the position and momentum variables of a harmonic oscillator [60]). Homodyne measurement corresponds to jump operators \(\hat{\mathsf{J}}=\sqrt{\gamma}(\hat{\mathrm{a}}+\beta)\). One readily finds that by inverting this relation towards \(\hat{\mathrm{a}}=\frac{\mathsf{J}}{\sqrt{\gamma}}-\beta\) and substituting in Equation (1), again, an equation in the Lindblad form is retrieved when absorbing a contribution \(\sqrt{\gamma}\,\mathrm{Im}[\beta^{*}\,\hat{\mathsf{J}}]\) in the Hamiltonian. Therefore, homodyne detection is equally valid as an unraveling of the master equation. In practice, because \(\beta\) is macroscopic, a diffusion approximation of the jumps is justified [8], yielding the Ito equation:  
\[d|\widetilde{\psi}\rangle=\left(-i\,\hat{\mathrm{H}}\,dt-\frac{\gamma}{2}\, \hat{\mathrm{a}}^{\dagger}\,\hat{\mathrm{a}}\,dt+\gamma\left\langle\hat{ \mathrm{a}}^{\dagger}\right\rangle\hat{\mathrm{a}}\,dt+\sqrt{\gamma}\,\hat{ \mathrm{a}}\,dZ^{*}\right)|\psi\rangle \tag{7}\]  
for the unnormalized wavefunction \(\widetilde{|\psi\rangle}\). Here, we have divided the decay rate into two channels \(\gamma=\gamma_{X}+\gamma_{P}\) for which either \(X\) or \(P\) is monitored. That is, if \(\beta\) is in-phase with the cavity field, there is only one independent measurement record, and we speak of 'true' homodyne detection, for example if only \(X\) is measured (Hom. (X)), \(\gamma_{X}=\gamma\) and \(\gamma_{P}=0\). If \(\beta\) is far-detuned from the cavity field on the other hand, both quadratures are equally measured such that \(\gamma_{X}=\gamma_{P}=\frac{\gamma}{2}\). This latter detection scheme is known as heterodyne detection (Het.). From the next section on, we will assume this heterodyne case unless indicated otherwise. The complex Wiener noise in Equation (7) has a Gaussian distribution with zero mean and variance \(dZ=\sqrt{\frac{\gamma_{X}}{\gamma}}dW_{X}+i\sqrt{\frac{\gamma_{P}}{\gamma}} dW_{P}\) with \(dW_{X}^{2}=dW_{P}^{2}=dt\) and \(dW_{X}dW_{P}=0\), meaning that \(\left|dZ\right|^{2}=dt\) and, in the heterodyne case, \(dZ^{2}=dZ^{*2}=0\).  
Analogous to the deterministic part of photon-counting, Equation (7) can be translated to the evolution of normalized expectation values, yielding:  
\[d\left\langle\hat{\mathcal{O}}\right\rangle= i\left\langle\left[\hat{\mathrm{H}},\hat{\mathcal{O}}\right]\right\rangle dt\] \[-\frac{\gamma}{2}\left\langle\hat{\mathrm{n}}\,\hat{\mathcal{O}} \right\rangle dt-\frac{\gamma}{2}\left\langle\hat{\mathcal{O}}\,\hat{\mathrm{n }}\right\rangle dt+\gamma\left\langle\hat{\mathrm{a}}^{\dagger}\,\hat{ \mathcal{O}}\,\hat{\mathrm{a}}\right\rangle dt\] \[+\sqrt{\gamma}\left(\left\langle\hat{\mathrm{a}}^{\dagger}\,\hat{ \mathcal{O}}_{O}\right\rangle\,dZ+\left\langle\hat{\mathcal{O}}_{O}\,\hat{ \mathrm{a}}\right\rangle\,dZ^{*}\right), \tag{8}\]  
where we have introduced the generic fluctuation \(\hat{\mathcal{S}}_{O}=\hat{\mathcal{O}}-\left\langle\hat{\mathcal{O}}\right\rangle\).