# Quantum Photonic Simulation of Spin-Magnetic Field Coupling and Atom-Optical Field Interaction
## 3 Quantum Photonic Simulations
### Photonic Simulation of Light-Matter Interaction  
For the case of light-matter interaction, we have a more direct photonic simulation by using a two-mode planar guide perturbed by an integrated optical grating. Thus, by defining \(\Delta\beta=\beta_{0}-\beta_{1}\) and \(\tilde{\beta}=(\beta_{0}+\beta_{1})/2\) and for the sake of simulation purposes, choosing an initial phase \(\alpha_{o}=\pi\), the momentum operator defined in Equation (20) can be rewritten as follows:  
\[\hat{M}|L(z)\rangle=\hbar\Big{[}(\tilde{\beta}+C_{+})\mathbf{I}+(\frac{\Delta \beta}{2}-C_{-})\sigma_{z}-C_{o}\cos(\gamma z)\sigma_{x}\Big{]}|L(z)\rangle, \tag{32}\]  
where \(C_{\pm}=(C_{00}(z)\pm C_{11}(z))/2\). As in the mechanical case, these terms could be zero if the optical modes \(\epsilon_{n,m}(x)\) and perturbation \(\Delta\epsilon(x)\) have a suitable parity, that is even or odd modes along with an odd perturbation. Next, we perform the following relevant change in the vector representation of the single-photon state \(|L(z)\rangle\equiv\big{(}l_{0}(z)\exp(i\gamma z/2),l_{1}(z)\exp(-i\gamma z/2) \big{)}^{\dagger}\equiv\exp(i\gamma\sigma_{z}z/2)|l(z)\rangle\), with \(\mathfrak{t}\) indicating the transpose. By inserting this state into the above equation, using \(\hat{M}=-i\hbar\partial/\partial z\), and neglecting terms that are rapidly oscillating, that is \(\exp(\pm iq\gamma z)\) with \(q=1/2,1,3/2\), the following momentum operator is obtained for the state \(|l(z)\rangle\equiv\big{(}l_{0}(z),l_{1}(z)\big{)}^{\dagger}\):  
\[\hat{M}^{\prime}|l(z)\rangle\approx\bigg{(}\hbar\tilde{\beta}\,\mathbf{I}+\frac {\hbar\delta_{s}}{2}\sigma_{z}-\frac{\hbar C_{o}}{2}\sigma_{x}\bigg{)}|l(z) \rangle, \tag{33}\]  
with \(\delta_{s}=\Delta\beta-\gamma\). This momentum operator simulates the Hamiltonian given by Equation (13), where the following simulation parameters are obtained:  
\[\bar{\omega}\leftrightarrow-\tilde{\beta},\quad\delta=(\omega_{o}-\omega) \leftrightarrow\delta_{s}=(\Delta\beta-\gamma),\quad\Omega\leftrightarrow C_{o}, \tag{34}\]  
with \(\delta\leftrightarrow\delta_{s}\) the detuning simulation parameter and \(\Omega\leftrightarrow C_{o}\) the Rabi frequency simulation parameter. Hence, this photonic device simulates light-matter interaction under a spatial RWA. Obviously, all temporal dynamics obtained by light-matter interaction can be simulated by means of this photonic device, as for example Rabi oscillations, logic gates for one-qubit transformations, and so on. In order to make clear these possibilities, let us consider the synchronous (or resonant) case, that is \(\Delta\beta=\gamma\). The momentum operator is thus simplified, and the solutions can be easily obtained. In matrix form, the solution of the equation above is given by:  
\[\left( \begin{array}{c}l_{0}(z)\\ l_{1}(z)\end{array} \right)=\left( \begin{array}{cc}\cos\frac{C_{0}}{2}z&-i \sin\frac{C_{0}}{2}z\\ -i\sin\frac{C_{0}}{2}z&\cos\frac{C_{0}}{2}z\end{array} \right)\left( \begin{array} []{c}l_{0}(0)\\ l_{1}(0)\end{array} \right)\equiv\text{X}(\Theta/2)\left( \begin{array}{c}l_{0} (0)\\ l_{1}(0)\end{array} \right), \tag{35}\]  
with \(\Theta{=}C_{o}z\) and where an irrelevant global phase \(e^{i\tilde{\beta}z}\) has been omitted. As a simple example, if we choose a length of the grating (interaction length) \(z=2\pi/C_{o}\), then a Xquantum logic gate is implemented. We must stress that these are transformations corresponding to the so-called \(\Theta\)-pulses in atom-light temporal interaction for computing purposes [22]. For example, given an input state \(|1_{0}\rangle\), the state propagating along the optical grating will be:  
\[|L(z)\rangle=l_{0}(z)|1_{0}\rangle+l_{1}(z)|1_{1}\rangle. \tag{36}\]  
On the other hand, for the case \(|\delta_{s}|\ll C_{o}\) and by omitting again the global phase \(e^{i\tilde{\beta}z}\), we obtain, as a solution to Equation (33), a phase gate, that is,  
\[\left( \begin{array}{c}l_{0}(z)\\ l_{1}(z)\end{array} \right)=\left( \begin{array}{cc}\exp(i\frac{\tilde{\beta} }{2}z)&0\\ 0&\exp(-i\frac{\delta_{s}}{2}z)\end{array}