# Electro-Optic Modulator

## Classical model


```python
import sympy as sy
from math import pi
import cmath
```

The electro-optic modulator theory is taken from this paper https://www.osapublishing.org/josab/abstract.cfm?uri=josab-27-6-a119:


\begin{equation}
\Delta \phi (t) = \frac{2 \pi L \Delta n}{\lambda_0}
\end{equation}

\begin{equation}
\frac{\Delta \phi (t)}{\Delta n} \to \frac{d \phi (t)}{d n} = \frac{2 \pi L }{\lambda_0}
\end{equation}


Note that if we substitute, in this case from the electro-optic effect (TODO find specific origin of this equation):
\begin{equation}
\Delta n = \frac{r n^3_0 V(t)}{d}
\end{equation}

Hence, for $V(t) = V_{DC} + \Delta V(t)$, it can be written as:

\begin{equation}
\Delta \phi (t) =  \frac{\pi n_0^{3} r L (V_{DC} + \Delta V(t))}{d \lambda_0} = \frac{\pi (V_{DC} + \Delta V(t))}{V_{\pi}}
\end{equation}

Since

\begin{equation}
V_{\pi} = \frac{d \lambda_0}{n^3_0 r l}
\end{equation}

Hence:
\begin{equation}
\Delta \phi (t) = \frac{\pi (V_{DC} + \Delta V(t))}{V_{\pi}}
\end{equation}

Note:
* $r$ Electro-optic coefficient


```python
lambda_0, L, rfr, r, t = sy.symbols("\\lambda_0 L rfr r t")
phi = sy.Function("\\phi")(t)
V = sy.Function("V")(t)
phi
```




$\displaystyle \phi{\left(t \right)}$




```python
V
```




$\displaystyle V{\left(t \right)}$




```python

```

#### Assumptions on $r$ Electro-optic Index Value

The electro-optic index is a constant value according to the material? Depends on the polarization of light.

(TODO tell full story and get all the parameter calculations that validate a specific value, and whether this changes over temperature, and bias and time)

The assumption is that input light is monochromatic and polarized in $\hat{x}$ direction with amplitude given by $\omega_0$

\begin{equation}
\mathbf{E_{in}}(z,t)= {E_0} \hat{\mathbf{x}} e^{{(j(\omega_o t-k(\omega_0)z}}={E_0} \hat{\mathbf{x}} e^{{j \omega_0(t-z/v)}}
\end{equation}

It is also assumed that the modulator is located between $z=-l$ and $z=0$, so that the input light acquires an additional phase at the output 

\begin{equation}
\mathbf{E_{out}}(0,t)= \mathbf{E_{in}}(0,t)e^{{j\Delta\phi(t)}}= {E_0}\hat{\mathbf{x}} e^{{j\omega_o t}}e^{{j\phi_b}}e^{{j\pi\Delta V(t)/V_{\pi}}}
\end{equation}

Here $\phi_b=\pi V_{DC}/V_\pi$. 



```python
E_0,omega_0,phi_b,Vpi,t,delta_V,j=sy.symbols("E_0,omega_0,phi_b,Vpi,t,delta_V,j")
E_out=E_0*sy.exp(j*omega_0*t)*sy.exp(j*phi_b)*sy.exp(j*pi*delta_V/Vpi)
E_out
```




$\displaystyle E_{0} e^{j \phi_{b}} e^{\frac{3.14159265358979 \delta_{V} j}{Vpi}} e^{j \omega_{0} t}$



The case of special interest to us is sinusoidal modulation of frequency $\Omega$ which is given by 
\begin{equation}
\Delta V(t)=V_m\cos{(\Omega t+\theta)}
\end{equation}

Here $m$ is so-called 'modulation' index given by $m=\pi V_m/V_\pi$ and it defines the ratio between applied voltage's amplitude and $V_\pi$, voltage needed to obtain $\pi$ phase shift. 

Further, the expression for the light output coming from $z=0$ is:

\begin{equation}
\mathbf{E_{out}}(0,t)=\mathbf{E_{in}}(0,t)e^{{j\Delta\phi(t)}}=E_0\mathbf{\hat{x}}e^{{j\omega_0t}}e^{{jm\cos{(\Omega t+\theta)}}}
\end{equation}



```python
V_m, Omega,theta,Vpi = sy.symbols("V_m Omega t theta Vpi")
deltaV=V_m*sy.cos(Omega*t+theta)
m=pi*V_m/Vpi
deltaV
```




$\displaystyle V_{m} \cos{\left(\Omega t + \theta \right)}$



Furthermore, it can be shown that the modulating signal not only produces the 'base' modulated signal, but also higher harmonics, which can be shown using Jacobi-Anger expansion of Bessel functions. Theoretically, there are infinite of these harmonics displaced from the carrier frequency by integer multiple of $\Omega$. However, practically, the ratio between carrier (optical) frequency $\omega_0$ and modulation frequency $\Omega $ is order of $10^4$ so the higher harmonics are negligible.

\begin{equation}
e^{jz\cos{\theta}}=\displaystyle\sum_{n=-\infty}^{+\infty}{j^n J_n(z)e^{jn\theta}}
\end{equation}

That means that after the modulation output signal consists of travelling waves of higher frequencies

\begin{equation}
\mathbf{E_{out}}(z,t)=E_0\mathbf{\hat{x}}e^{j\phi_b}\displaystyle\sum_{n=-\infty}^{+\infty}{(je^{j\theta})}^nJ_n(m)e^{j(\omega_0+n\Omega)(t-z/v)}=E_0\mathbf{\hat{x}}\displaystyle\sum_{n=-\infty}^{+\infty}C_ne^{j(\omega_0+n\Omega)(t-z/v)}
\end{equation}

Coefficients $C_n$ are defined as
\begin{equation}
C_n=e^{j\phi_b}(je^{j\theta})^nJ_n(m)
\end{equation}


```python

```

### Considerations 

As seen in previous text, classical electro-optical modulator can be modelled as a black box with input parameters being applied voltage and input light, which is here considered to be monochromatic and linearly polarized. The applied sinusoidal modulating signal does not produce just a single sideband displaced by modulating frequancy $\pm\Omega$, but also higher harmonics which are infinite in theory. 
Looking at the derived output expression, there is inconsistency for harmonics high enough - it yields to negative frequency. In practice (looking at the classical model) those frequency don't represent an actual problem due to the fact that optical carrier frequency $\omega_0$ is four orders of magnitude higher than $\Omega$. However, this will be a problem when building a quantum model. 

## Quantum model

As already mentioned in classical model considerations, optical signal modulation not only generates sidebands we want (first harmonics) but also infinite number of sidebands, which eventually for large enough displacement from carrier frequency leads to unphysical negative frequencies. In classical case we can take the 'handwavy' approach and just ignore them due to the fact that optical frequencies are much larger that RF signal that modulates it, but for quantum model this approach is inadequate, since the model has to preserve unitarity and include even the most unprobable transitions. 
Here, both negative and non-negative frequency models will be presented.

NOTE: This should probably inherit from linear model.


### Negative frequency model 

This problem can be approached as 1D scattering problem, where the modulator acts as a scatterer. We should ignore the reflections on the boundaries and approach the modulation as inelastic process where the incoming CW radiation exchanges energy with external RF field, this exchange being mediated by the dielectric material. For the record, the action of the modulator on the input light coming from the left and input light coming from the right side of the modulator would be slightly different, due to the fact that RF phase matching to the optical wave phase matching is valid for one direction of light propagation. 

So, the assumptions for the quantum model is that this scattering problem is defined in one dimension with quantization length L. The travelling wave modes $\exp{[j(\omega t-kz)]}$ allowed by the boudary conditions are given by $kL=2\pi n$. Here $n$ is a nonzero integer $n=\pm 1,\pm 2,...$
That means that corresponding frequency is $\omega=v|k|=2\pi |n|v/L$. The sign of $n$ denotes the direction in which the input light travels - we will be analyzing the wave that's propagating to the right i.e. $n>0$.
Next, we will describe the action of the modulator by constructing the scattering operator $\hat{S}$.



NOTATION: Since we'll be dealing with $n>0$ that means that we can label wavevector $k=2\pi n_0/L$ as $\omega_0$ since we know it's a non-negative frequency. We can use then wavevector and corresponding frequency interchangeably to describe the mode. Furthermore, a state $|{1}\rangle_{\omega_0}$ is a single occupancy Fock-state with frequency $\omega_0$. We can also use its unique integer index $n_0$ to describe it $|{1}\rangle_{n_0}$.
This is also valid for the modulation frequency $\Omega$: $\Omega=2\pi N c/L$. Integer $N>0$ describes the mode that corresponds to this frequency.

First, we begin describing the scattering operator $\hat{S}$ using the coherent states. For single mode input:

\newcommand{\ket}[1]{\left|{#1}\right\rangle}
\newcommand{\bra}[1]{\left\langle{#1}\right|}

\begin{equation}
|{\Psi_{in}}\rangle=|{\alpha}\rangle_{n_0}\rightarrow |\psi_{out}\rangle =\hat{S}|\alpha\rangle_{n_0}=\bigotimes_{q=-\infty}^{+\infty}|C_q\alpha\rangle_{n_0+qN}
\end{equation}

Without proving, this expression is unitary (proof can be found in the paper). 


```python

```

Since we want to be able to use this operator to any input quantum state, this can be generalized because it's been derived by using an the overcomplete base of coherent states. Using the closure relation for coherent state basis we can transform the previous expression using the mode creation operators. 

\begin{equation}
\hat{S}\hat{a_{n}}^{\dagger}\hat{S}^\dagger=\displaystyle\sum_{q=-\infty}^{+\infty}C_{q}\hat{a}_{n+qN}^{\dagger}
\end{equation}

\begin{equation}
\hat{S}^\dagger\hat{a_{n}}^{\dagger}\hat{S}=\displaystyle\sum_{q=-\infty}^{+\infty}C^{*}_{-q}\hat{a}_{n+qN}^{\dagger}
\end{equation}

For single photon input, as the vacuum state $|vac\rangle$ can be also seen as coherent vacuum state, $\hat{S}^\dagger|vac\rangle=|vac\rangle$ and further $\hat{a}_n^\dagger|vac\rangle=|1\rangle_n$ so we get
\begin{equation}
\hat{S}\hat{a}^{\dagger}_{n}\hat{S}^{\dagger}|vac\rangle=\hat{S}\hat{a}_n^{\dagger}|vac\rangle=\hat{S}|1\rangle_n=\displaystyle\sum_{q=-\infty}^{+\infty}C_q\hat{a}_{n+qN}^{\dagger}|vac\rangle=\displaystyle\sum_{q=-\infty}^{+\infty}C_q|1\rangle_{n+qN}
\end{equation}


```python

```

$C_q$ is a probability amplitude of a single photon state in mode $n$ transitioning to a single photon state in a mode $n+qN$.
Further, when we have the form of the operator $\hat{S}$ we should derive the expression for the coefficients $C_q$.
The explicit form of the operator $\hat{S}$ is:
\begin{equation}
\hat{S}=\hat{S}_N(\chi,\phi_b)=\exp{[j\hat{G}_N(\chi,\phi_b)]}=\exp{[j(\chi\hat{T}_N+\chi^*\hat{T}_N^\dagger+\phi_b\hat{N}_{ph})]}
\end{equation}

Here, $\hat{T}_N=\sum_{n=-\infty}^{+\infty}\hat{a}_{n+N}^\dagger\hat{a}_n$ and $\chi=e^{j\theta}m/2$. Terms in $\hat{T}_N$ represent creation of photon in mode $n+qN$ by annihilation of photon in mode $n$. 



```python

```

The final form of the operator $\hat{S}$ is:

\begin{equation}
\hat{S}\hat{a}_n^\dagger\hat{S}^\dagger=\displaystyle\sum_{q=-\infty}^{+\infty}e^{j\phi_b}(je^{j\theta})^qJ_q(m)\hat{a}_{n+qN}^\dagger)=\displaystyle\sum_{q=-\infty}^{+\infty}C_q\hat{a}_{n+qN}^\dagger
\end{equation}

Here, $J_q(m)$ is the first-kind Bessel function

\begin{equation}
J_q(m)=(\frac{m}{2})^q\displaystyle\sum_{n=0}^{\infty}\frac{(-1)^n(m/2)^{2n}}{n!(q+n)!}
\end{equation}


```python

```

7360b681249fde601cc2fa2cadc26425e7882641
ipynb
Jupyter Notebook
docs/models/electro_optic_phase_shifter.ipynb
bigphoton/arch
95a197d6b89bc2316b0d88b2b1345cbbb90088ec
Unlicense
docs/models/electro_optic_phase_shifter.ipynb
bigphoton/arch
95a197d6b89bc2316b0d88b2b1345cbbb90088ec
Unlicense
docs/models/electro_optic_phase_shifter.ipynb
bigphoton/arch
95a197d6b89bc2316b0d88b2b1345cbbb90088ec
Unlicense
Qwen/Qwen-72B
1. YES
2. YES