gauge operators is therefore captured algebraically and all expectations in these relations are with respect to the same state.

We now have

\[thm:master-matrix\] Assume $\alpha_0\neq 0$. Then the expectation $\tilde \mu_t(A \otimes X)$ (defined by (\[eq:master-mu-rep1\])) evolves according to $$\dot {\tilde \mu}_t(A \otimes X) = \tilde \mu_t (\mathcal{G}_t(A \otimes X) ),
\label{eq:matrix-master}$$ where $$\begin{aligned}
\mathcal{G}_t(A \otimes X) &=& A \otimes \mathcal{L}(X) + ( A\sigma_+)
\otimes [L^\ast, X] S \nu \xi(t) + (\sigma_- A ) \otimes S^\ast [X,L] \nu^\ast
\xi^\ast(t)  \notag \\
&& + ( \sigma_- A \sigma_+ ) \otimes (S^\ast X S - X)) \vert \nu \xi(t)
\vert^2.\end{aligned}$$

The reader may easily verify that the system of master equations (\[eq:rho-dyn-a-11\])-(\[eq:rho-dyn-a-00\]) for $\mu^{jk}_t(X)$, $j,k=1,0$, follows from equation (\[eq:matrix-master\]) by setting $A=\vert e_j \rangle \langle e_k \vert$.

Quantum Filter for the Extended System {#sec:matrix-filter}
--------------------------------------

The extended system provides a convenient framework for quantum filtering, since all expectations can be expressed in terms of the superposition state $\vert \Sigma \rangle$. Our immediate goal in this section is to determine the equation for the quantum conditional expectation $$\tilde \pi_t( A \otimes X) = \mathbb{E}_{\Sigma}[ A \otimes X(t) \, \vert \, I
\otimes \mathscr{Y}_t] ,
\label{eq:matrix-c-exp-def}$$ and in Section \[sec:single-photon-filter\] we will explain how 