# Quantum Photonic Simulation of Spin-Magnetic Field Coupling and Atom-Optical Field Interaction
## 3 Quantum Photonic Simulations
### Photonic Simulation of Spin-Magnetic Field Interaction  
Let us consider an integrated optical grating characterized by the function given by Equation (14). It will be useful to work with the slowly varying operators \(\hat{A}_{n}\), defined as \(\hat{A}_{n}=\hat{a}_{n}\exp(-i\beta_{n}z)\). On the other hand, the coupling coefficients for a grating with initial phase \(\alpha_{o}=0\) can be written as \(C_{00}=c_{00}\cos\gamma z\), \(C_{11}=c_{11}\cos\gamma z\), and \(C_{01}=C_{10}=C_{o}\,\cos\gamma z\), where \(c_{nm}=(\omega/2)\int\Delta e(x)e_{n}(x)\cdot e_{m}^{*}(x)dx\), and so on. Therefore, from Equation (18), we obtain, for the two-mode case, the following spatial Heisenberg equations:  
\[i\frac{\mathrm{d}\hat{A}_{0}(z)}{\mathrm{d}z} =-\hat{A}_{0}\,c_{00}\cos\gamma z-\hat{A}_{1}\frac{C_{0}}{2}e^{- i\Delta\beta_{01}z}[e^{i\gamma z}+e^{-i\gamma z}], \tag{21}\] \[i\frac{\mathrm{d}\hat{A}_{1}(z)}{\mathrm{d}z} =-\hat{A}_{1}\,c_{11}\cos\gamma z-\hat{A}_{0}\frac{C_{0}}{2}e^{i \Delta\beta_{01}z}[e^{i\gamma z}+e^{-i\gamma z}], \tag{22}\]  
where \(\Delta\beta_{01}=\beta_{0}-\beta_{1}\). The above equation reveals that we have oscillating terms coming from the cosine of the self-coupling terms with arguments \(\pm\gamma z\) and also terms with arguments \((\gamma-\Delta\beta_{01})z\) and \((\gamma+\Delta\beta_{01})z\). We make the assumption that \(\gamma\) is of the same order as \(\Delta\beta_{01}\), so that \((\gamma-\Delta\beta_{01})\) is small. The other terms are rapidly oscillating and, thus, will average to zero on a sufficiently large \(z\)-scale. We must stress that what we do here is essentially a spatial RWA, which is well-known in light-matter interaction in the time domain. Therefore, the above equations become, to a good approximation,  
\[i\frac{\mathrm{d}\hat{A}_{0}(z)}{\mathrm{d}z}=-\hat{A}_{1}\frac{ C_{o}}{2}\exp{[-i(\Delta\beta_{01}-\gamma)z]}, \tag{23}\] \[i\frac{\mathrm{d}\hat{A}_{1}(z)}{\mathrm{d}z}=-\hat{A}_{0}\frac {C_{o}}{2}\exp{[i(\Delta\beta_{01}-\gamma)z]}. \tag{24}\]  
Next, we make the following relabeling \(\Delta\beta_{01}\equiv\Delta\beta\) and define the new absorption operators \(\hat{A}_{0}=\hat{b}_{0}\exp(-i\Delta\beta z/2)\) and \(\hat{A}_{1}=\hat{b}_{1}\exp(i\Delta\beta z/2)\). We rewrite the Heisenberg equations in terms of the \(\hat{b}(z)\) operators,  
\[i\frac{\mathrm{d}\hat{b}_{0}}{\mathrm{d}z}=-\frac{\Delta\beta}{2 }\hat{b}_{0}-\frac{C_{o}}{2}\hat{b}_{1}\exp{(i\gamma z)}, \tag{25}\] \[i\frac{\mathrm{d}\hat{b}_{1}}{\mathrm{d}z}=\frac{\Delta\beta}{2} \hat{b}_{1}-\frac{C_{o}}{2}\hat{b}_{0}\exp{(-i\gamma z)}. \tag{26}\]It is interesting to note that \(\hat{a}_{0,1}\) and \(\hat{b}_{0,1}\) are, after the spatial RWA, the same operators, except a global phase, that is \(\hat{a}_{0,1}=b_{0,1}\exp(i\bar{\beta}z)\), \(\bar{\beta}=(\beta_{0}+\beta_{1})/2\). Finally, as mentioned above, we can write the above equation in a matrix form acting on the single-photon state \(|L_{b}(z)\rangle=b_{0}(z)|1_{0}\rangle+b_{1}(z)|1_{1}\rangle\), where \(|L(z)\rangle=|L_{b}(z)\rangle\exp(i\bar{\beta}z)\), that is,  
\[i\hbar\frac{\partial}{\partial z}|L_{b}(z)\rangle=-\frac{\hbar}{2}\left( \begin{array}{cc}\Delta\beta&C_{o}\exp\left(i\gamma z\right)\\ C_{o}\exp\left(-i\gamma z\right)&-\Delta\beta\end{array} \right)|L_{b}(z)\rangle=\]  
\[=-\frac{\hbar}{2}\text{B}\left( \begin{array}{cc}\cos\alpha&\sin\alpha\exp \left(i\gamma z\right)\\ \sin\alpha\exp\left(-i\gamma z\right)&-\cos\alpha\end{array} \right)|L_{b}(z) \rangle=-\hat{M}(z)|L_{b}(z)\rangle, \tag{27}\]  
with \(\cos\alpha=\Delta\beta/\text{B}\), \(\sin\alpha=C_{o}/\text{B}\), and \(\text{B}=\sqrt{\Delta\beta^{2}+C_{o}^{2}}\). This equation is just the spatial equivalent of Equation (2). A Hamiltonian operator is replaced by a momentum operator. Obviously, the dynamic properties are identical under the formal changes: \(\omega\leftrightarrow\gamma\), \(\gamma_{p}B_{o}\leftrightarrow\text{B}\), \(\theta\leftrightarrow\alpha\).