# Quantum Photonic Simulation of Spin-Magnetic Field Coupling and Atom-Optical Field Interaction
## 4 Quantum Geometric Phases
### Elimination of the Dynamical Phase in Spin-Magnetic Field Photonic Simulation  
It is well known in the mechanical case that the geometric phase is hidden in the spin-magnetic field interaction because it is combined with the dynamical phase within \(\phi^{\pm}\); therefore, the dynamical phase has to be eliminated in order to take advantage of the properties of a geometric phase. We present a photonic solution, which is similar to the one used in the mechanical case, that is if the quantum state, after evolution under a first Hamiltonian \(\hat{H}_{1}=\hat{H}\) for time \(T\), finds a second Hamiltonian \(\hat{H}_{2}=-\hat{H}\), then the dynamical phase are mutually canceled; however, the eigenstates do not change, therefore neither does the geometrical phase.  
In the photonic case, we have to find a new momentum operator, that is a new integrated optical grating, such as \(\hat{M}_{2}=-\hat{M}\). We assume that such a new optical grating has the same frequency \(\gamma\); therefore, we have the same rotating system, that is the same transformation (28). Accordingly, the condition for eliminating the dynamical phase is obtained from the operator \(\hat{M}^{\prime}\), that is,  
\[\hat{M}^{\prime}_{2}=\frac{\hbar}{2}\left(\begin{array}{cc}\Delta\beta^{ \prime}-\gamma&C^{\prime}_{o}\\ C^{\prime}_{o}&-\Delta\beta^{\prime}+\gamma\end{array}\right)=-\hat{M}^{ \prime}=-\frac{\hbar}{2}\left(\begin{array}{cc}\Delta\beta-\gamma&C_{o}\\ C_{o}&-\Delta\beta+\gamma\end{array}\right); \tag{48}\]  
therefore, \(C^{\prime}_{o}=-C_{o}\) and \((\Delta\beta-\gamma)=-(\Delta\beta^{\prime}-\gamma)\). The first condition can be achieved by introducing an initial phase in the second grating, that is \(\Delta e(x,z)=\Delta e(x)\cos(\gamma z+\pi)\), and the second one is achieved if \(\Delta\beta^{\prime}=2\gamma-\Delta\beta\). These results indicate that we need an additional grating with a new difference between propagation constants (linear momentum of the photon) \(\Delta\beta^{\prime}=(\beta^{\prime}_{0}-\beta^{\prime}_{1})\). In Figure 5 the system for eliminating the dynamical phase is shown. Therefore, the total phases are \(\phi_{\pm}=\
u(\mp p\Lambda/\hbar-\pi)\), and the dynamical phases are:  
\[\phi^{\pm}_{\rm d}=\frac{p_{\pm}}{\hbar}\
u\Lambda\mp\
u\pi\cos\alpha^{\prime} \tag{49}\]  
Therefore, the total dynamical phase is \(\Phi_{d}=0\), and the total geometrical phase after the single-photon state propagates through the two integrated gratings is twice the value acquired in the first grating, that is,  
\[\Phi^{\pm}_{\rm g}=\mp 2\
u\pi(1-\cos\alpha^{\prime})=\mp\Phi_{g}. \tag{50}\]  
Alternatively, propagation constants can be unchanged, and the grating frequency can be modified, that is \(\gamma^{\prime}=2\Delta\beta-\gamma\); however, in this case, the transformation (28) must be applied with the factor \(\gamma^{\prime}\). In short, we eliminated the dynamical phase; therefore, these results could be used for implementing logic gates or transformations based on topological phases, which are much more insensitive to fabrication errors, unlike dynamical phases, which as mentioned are of order \(\omega\). With these results, robust P-gates (Phase gates) can be designed; thus, the following transformation is implemented between the eigenstates:  
\[P=\left(\begin{array}{cc}\exp(-i2\
u\pi\cos\alpha^{\prime})&0\\ 0&\exp(i2\
u\pi\cos\alpha^{\prime})\end{array}\right)=\exp(-i\Phi_{g}\,\sigma _{z}) \tag{51}\]  
Note that for \(4\
u\cos\alpha^{\prime}=\pm 1\), a \(Z\)-gate is obtained, and for \(4\
u\cos\alpha^{\prime}=\pm 1/2\), an S-gate is implemented, and so on.