# Asymmetric Localization by Second Harmonic Generation

H. Ghaemi-Dizicheh1, A. Targholizadeh1, B. Feng 2, H. Ramezani1
<EMAIL_ADDRESS>1Department of Physics and Astronomy, University
of Texas Rio Grande Valley, Edinburg, Texas 78539, USA
2 School of Mathematical and Statistical Sciences, University of Texas Rio
Grande Valley, Edinburg, TX 78539, USA

###### Abstract

We introduce a nonlinear photonic system that enables asymmetric localization
and unidirectional transfer of an electromagnetic wave through the second
harmonic generation process. Our proposed scattering setup consists of a non-
centrosymmetric nonlinear slab with nonlinear susceptibility $\chi^{(2)}$
placed to the left of a one-dimensional periodic linear photonic crystal with
an embedded defect. We engineered the linear lattice to allow the localization
of a selected frequency $2\omega_{\star}$ while frequency $\omega_{\star}$ is
in the gap. Thus in our proposed scattering setup, a left-incident coherent
transverse electric wave with frequency $\omega_{\star}$ partially converts to
frequency $2\omega_{\star}$ and becomes localized at the defect layer while
the unconverted remaining field with frequency $\omega_{\star}$ exponentially
decays throughout the lattice and gets reflected. For a right-incident wave
with frequency $\omega_{\star}$ there won’t be any frequency conversion and
the incident wave gets fully reflected. Our proposed structure will find
application in designing new optical components such as optical sensors,
switches, transistors, and logic elements.

##  I Introduction

The method of generating a localized mode in periodic structures has paved its
footprints in some photonics systems. One can achieve this localization by
breaking the translation symmetry through embedding a defect in a periodic
lattice Joannopoulos et al. (1995); Noda et al. (2000); Akahane et al. (2003);
Song et al. (2005); Navadeh-Toupchi et al. (2020); Mostafavi et al. (2020).
Photonic crystal lasers Painter et al. (1999); Park et al. (2004); Ellis et
al. (2011), strain field traps Sievers and Takeno (1988), strong photon
localization John (1987), and mode selection Poli et al. (2015) are instances
for applications of defect mode in periodic photonic systems.
Because of the time-reversal symmetry, the photon confinement happens
regardless of the direction of the incident electromagnetic wave. In recent
years, the applications of asymmetric photonic transport have drawn attention
in optical systems Ramezani et al. (2010); Lira et al. (2012); Bender et al.
(2013); Wang et al. (2013); Peng et al. (2014); Fujita et al. (2000). To
create a system with nonreciprocal light propagation characteristics, we can
apply some techniques such as magnetic biasing Jalas et al. (2013); Saleh and
Teich (2019); Ramezani et al. (2014), and spatiotemporally modulating index of
refraction Yu and Fan (2009). In the last method, the frequency and wavevector
of the photon shift simultaneously during the photonic transition process. One
can embed a defect in spatiotemporally periodic modulated photonic lattice to
localize photons in a non-reciprocal manner Ramezani et al. (2018). While
spatiotemporal modulation is a powerful method to achieve unidirectional
localization, achieving such modulation in practice, specifically in a high-
frequency regime, is arduous. Consequently, it is imperative to propose a new
photonic structure capable of localizing photons asymmetrically.
This paper provides a technique of asymmetric photon localization by
exploiting second-harmonic generation (SHG). The process of SHG is the well-
known observation in nonlinear optics where an electromagnetic wave, called a
fundamental wave (FW), interacts with the nonlinear material and generates a
new wave with twice the frequency of initial light. The generated wave is
referred to as the second harmonic wave (SHW). To achieve the asymmetric
localization, we introduce an optical setup consisting of a nonlinear slab
located to the left side of a linear periodic lattice. By embedding an
engineered defect in the linear lattice, we show that the generated SHW
becomes localized with a finite transmission while the remaining unconverted
FW gets reflected by the bandgap. In the opposite direction, the photon in the
same frequency as the fundamental wave gets totally reflected.
We employ the transfer matrix approach to study our scattering system. This
approach provides us with a theoretical understanding of the idea investigated
in this paper for asymmetric localization. The transfer matrix approach for a
second harmonic generation as a method has been developed in optical systems
to overcome low nonlinear conversion efficiency Li et al. (2007); Ren and Li
(2010); Li et al. (2015). We apply a similar approach in a different context
to deal with our scattering problem. Indeed, we follow a formalism that is
introduced in refs. Mostafazadeh et al. (2018); Mostafazadeh (2019) for a
nonlinear scattering process. The main characteristic of the transfer matrix
for nonlinear scattering potential is that its entries depend on the
amplitudes of incoming waves. This property in some nonlinear scattering
problems makes it complicated to find the nonlinear transfer matrix. However,
despite its severity, the main motivation for using a nonlinear transfer
matrix is its composition rule.

For the SHG process, the fundamental and generated electromagnetic fields
satisfy a system of nonlinear coupled Helmholtz equation Boyd (2020). The
solution of these equations in a slowly varying envelope approximation is
given in terms of the Jacobi elliptic functions. It demands cumbersome
calculations to find the exact form of the entries of the nonlinear transfer
matrix. Instead, we subject our method to a limitation in the nonlinear
process for the second-harmonic generation to overcome this difficulty. In
this limitation, we suppose that the energy conversion to the second harmonic
is very low such that the fundamental wave remains essentially undepleted.
This process is known as a non-depletion approximation in a second harmonic
generation Javurek and Perina (2019). To show that our approximation method
gives a qualitatively correct result in the last section, we use the finite-
element method to demonstrate asymmetric photon localization in a system with
similar composition.

##  II Scattering Setup

To facilitate the semi-analytical approach, let’s consider a photonic
scattering setup as depicted in Fig.1 includes a nonlinear material with
nonlinear susceptibility $\chi^{(2)}$ located to the left of a one-dimensional
photonic crystal structure with a distance $\delta$. The linear lattice is
made of $N$ segments of length $d$, and each segment consists of two
homogenous slabs. The thickness and the refractive index of section I is
respectively $d_{1}$ and $n_{1}(\omega)$, while those for section II is
$d_{2}$ and $n_{2}(\omega)$, then we have $d=d_{1}+d_{2}$. Here we consider
that, in general, a medium’s refractive index depends on the frequency
$(\omega)$ of passing light. We can embed a defect by breaking the translation
symmetry in the periodic linear lattice. To do this, we manipulate segment
$N_{i}$ by changing one of its slabs thickness or substitute it with
dissimilar material whose refractive index is different from the other part of
the lattice.
In Fig.1, the gray slab is demonstrating the nonlinear slab that generates the
SHW. On the right side, we show the defect layer of the linear periodic
structure in green and $d_{3}$ and $n_{3}(\omega)$ respectively, stand for its
thickness and refractive index.

Figure 1: (a) Schematic diagram of scattering setup consists of a nonlinear
material (gray) and one-dimensional defective photonic crystal. The defect is
depicted in green. In this diagram, to embed a defect layer, the linear
lattice consists of eight segments in which the second section of segment four
is manipulated. (b,c) Transmission $T:=|t|^{2}$ and Reflection $R:=|r|^{2}$
spectrum of the defective linear photonic crystal in the ranges of
$\lambda$=0.924-0.821 $\mu m$ and $\lambda$=2.094–1.570 $\mu m$. The arrows
indicate the transmition amplitude for the FW (with frequency
$\omega_{\star}$) and SHW (with frequency $2\omega_{\star}$).

Consider a normally left incident electromagnetic wave with frequency
$\omega=\omega_{1}$ hits the system in which its electric field is given by

$\vec{E}(\vec{r},t)=\mathcal{E}(z)e^{ik_{1}x}e^{-i\omega_{1}t}\hat{e}_{y},$
(1)

where $k_{1}:=\omega_{1}/c$ is the wavenumber, $c$ is the speed of light in
vacuum, $\mathcal{E}(z)$ is the complex amplitude of the electric field, and
$\hat{e}_{j}$ is the unit vector pointing along the $j$ axis for $j=x,y,z$.
The propagation of the fundamental wave in the nonlinear slab
$\mathcal{S}_{1}$ excites the second nonlinear polarization
$\mathbf{P}_{NL}^{(2)}=\epsilon_{0}\chi^{(2)}\vec{E}\cdot\vec{E}$. The induced
polarization by the nonlinear medium acts as a source and creates second
harmonic field with frequency $\omega_{2}:=2\omega_{1}$. The whole nonlinear
process can be described by the following nonlinear couple equation Boyd
(2020):

$\displaystyle\mathcal{E}^{\prime\prime}_{1}+\eta_{1}^{2}k_{1}^{2}\mathcal{E}_{1}=-k_{1}^{2}\chi^{(2)}\mathcal{E}^{*}_{1}\mathcal{E}_{2},$
(2)
$\displaystyle\mathcal{E}^{\prime\prime}_{2}+\eta_{2}^{2}k_{2}^{2}\mathcal{E}_{2}=-k_{2}^{2}\chi^{(2)}\mathcal{E}_{1}^{2}.$
(3)

Here, $k_{2}:=\omega_{2}/c$ is the wavenumber of the SHW and
$\eta_{1}:=n(\omega_{1})$ and $\eta_{2}:=n(\omega_{2})$ are respectively the
refractive index of the nonlinear medium for the fundamental $\mathcal{E}_{1}$
and second harmonic wave $\mathcal{E}_{2}$. In the case of the undepleted
fundamental wave, the right side of equation 2 becomes infinitesimal in
comparison with the left side, and we can neglect it. Then Eq. 2 admits the
following linear solution

$\mathcal{E}_{1}=C^{(1)}e^{ik_{1}\eta_{1}z}+D^{(1)}e^{-ik_{1}\eta_{1}z}.$ (4)

Here, $C^{(1)}$ and $D^{(1)}$ are the complex-valued plane wave coefficients
of FW and, respectively, denote forward and backward propagating waves. Then
by substituting $\mathcal{E}_{1}$ from the above equation through 3, Eq. 2
transforms to a nonhomogeneous wave equation such that the right-hand side
acts as a source for the SHW induced by FW through the second-order
coefficient $\chi^{(2)}$ of the nonlinear medium. We can express the solution
of 3 as follows

$\displaystyle\mathcal{E}_{2}(z)=$ $\displaystyle
C^{(2)}e^{ik_{2}\eta_{2}z}+D^{(2)}e^{ik_{2}\eta_{2}z}+$ (5)
$\displaystyle\chi^{(2)}\mathcal{G}_{1}[(C^{(1)})^{2}e^{2ik_{1}\eta_{1}z}+(D^{(1)})^{2}e^{-2ik_{1}\eta_{1}z}]$
$\displaystyle+\chi^{(2)}\mathcal{G}_{2}C^{(1)}D^{(1)},$

where
$\mathcal{G}_{1}:=-k_{2}^{2}/(k_{2}^{2}\eta_{2}^{2}-4k_{1}^{2}\eta_{1}^{2})$,
$\mathcal{G}_{2}:=-1/\eta_{2}^{2}$ and, similar to the pumping wave, $C^{(2)}$
and $D^{(2)}$ are the complex-valued plane wave coefficients of SHW.
By adding a photonic crystal on the right side of slab $\mathcal{S}_{1}$, we
construct a scattering setup for both fundamental and second harmonic waves.
In other word, we wish to construct a scattering solution in the form

$\displaystyle\mathcal{E}_{1,2}(z):=\left\\{\\!\\!\begin{array}[]{ccc}A_{-}^{(1,2)}e^{ik_{1,2}z}+B_{-}^{(1,2)}e^{ik_{1,2}z}&z<z_{0},\\\\[6.0pt]
\mathcal{E}_{1,2}(z)&z\in[z_{0},z_{1}],\\\\[6.0pt]
A_{j}^{(1,2)}e^{ik_{1,2}n_{j}z}+B_{j}^{(1,2)}e^{-ik_{1,2}n_{j}z}&z\in[z_{j},z_{j+1}],\\\\[6.0pt]
A_{+}^{(1,2)}e^{ik_{1,2}z}&z>z_{2N},\end{array}\right.$ (10) (11)

where $j:=1,\dots,2N$ labels sections in the multilayer film
$\mathcal{S}_{2}$.
We aim to show that for an incident wave with specific frequency
$\omega_{1}:=\omega_{\star}$, our scattering system transfers the generated
wave with frequency $2\omega_{\star}$ and bans the incident fundamental wave
from the left, i.e., $A_{+}^{(1)}=0$. For the right incoming wave, our system
completely acts as a mirror and fully reflects the fundamental wave with
frequency $\omega_{\star}$.
We theoretically analyze our system by applying the transfer matrix approach.
In this approach, we consider the scattering process of the left/right
incident wave in the following steps:
a. The fundamental wave propagating in the nonlinear medium induces the
nonlinear polarization in which it radiates SHW. In general and without
considering non-depletion fundamental wave, the propagation of the initial
fundamental wave and the second harmonic wave can be characterized by the
nonlinear transfer matrix $\mathbf{M}_{N}^{(1,2)}$. The entries of the
nonlinear transfer matrix for both FW and SHW can be given in terms of the
solutions of 2 and 3 for $\mathcal{E}_{1,2}$. The main characteristic of the
nonlinear transfer matrix is that its entries depends on the incident
amplitudes $A_{-}^{(1,2)}$ and $B_{-}^{(1,2)}$ and they are not unique
Mostafazadeh (2019). However the undepleted wave, the nonlinear transfer
matrix for the fundamental wave reduces to the linear one.
b. The FW and SHW created inside the nonlinear medium propagate through the
linear periodic structure. The scattering of both waves can be given by the
linear transfer matrix $\mathbf{M}_{L}(\omega)$. The combination of these two
steps can be expressed by a single transfer matrix given by

$\mathbf{M}^{(1,2)}=\mathbf{M}_{L}\cdot\mathbf{M}_{N}^{(1,2)}.$ (12)

In particular, for $n_{1}(\omega)=n_{0}=1$, the linear transfer matrix
$\mathbf{M}_{L}$ is uniquely determined by the reflection and transmission
amplitudes of the linear crystal $\mathcal{S}_{2}$. They are given by the
following relation:

$\displaystyle[\mathbf{M}_{L}]_{11}=t-\dfrac{r_{l}r_{r}}{t},$
$\displaystyle[\mathbf{M}_{L}]_{12}=\dfrac{r_{r}}{t},$
$\displaystyle[\mathbf{M}_{L}]_{21}=-\dfrac{r_{l}}{t},$
$\displaystyle[\mathbf{M}_{L}]_{12}=\frac{1}{t},$ (13)

where $t:=t(\omega)$ is the transmittion coefficient, and
$r_{l}:=r_{l}(\omega)$ ($r_{r}:=r_{r}(\omega)$) is left (right) reflection
coefficient. According to Eqs. 12 and 13 and in light of the scattering
solution 11, the transmitted and reflected wave of the generated wave is given
by the following relation

$\displaystyle\left(\begin{array}[]{cc}A_{+}^{(2)}\\\
0\end{array}\right)=\mathbf{M}^{(2)}\left(\begin{array}[]{cc}A_{-}^{(2)}\\\
B_{-}^{(2)}\end{array}\right)=\mathbf{M}_{L}^{(2)}\cdot\mathbf{M}_{N}^{(2)}\left(\begin{array}[]{cc}A_{-}^{(2)}\\\
B_{-}^{(2)}\end{array}\right)$ (20)
$\displaystyle=\mathbf{M}_{L}^{(2)}\left(\begin{array}[]{cc}A_{0}^{(2)}\\\
B_{0}^{(2)}\end{array}\right)=\dfrac{1}{t}\left(\begin{array}[]{cc}[t^{2}-r_{l}r_{r}]A_{0}^{(2)}+r_{r}B_{0}^{(2)}\\\
-r_{l}A_{0}^{(2)}+B_{0}^{(2)}\end{array}\right).$ (25)

This in turns implies

$\displaystyle B_{0}^{(2)}-r_{l}(2\omega)A_{0}^{(2)}=0,$ $\displaystyle
A_{+}^{(2)}=t(2\omega)A_{0}^{(2)}.$ (27)

Following the similar steps for the FW we have

$\displaystyle B_{0}^{(1)}-r_{l}(\omega)A_{0}^{(1)}=0,$ $\displaystyle
A_{+}^{(1)}=t(\omega)A_{0}^{(1)}.$ (28)

In the above equation, the intermediate amplitudes $A_{0}^{(1,2)}$ and
$B_{0}^{(1,2)}$ are complex-valued functions of incident amplitudes. Eqs. 27
and 28 form a system of complex-valued equations where one can solve it to get
the scattering amplitudes $B_{-}^{(1,2)}$ and $A_{+}^{(1,2)}$.
For the right-incident wave, the scattering solution is given by 11 for
$z\in(z_{0},z_{2N})$ and for elsewhere, we have

$\displaystyle\mathcal{E}(z):=\left\\{\\!\\!\begin{array}[]{ccc}B_{-}^{(1,2)}e^{-ik_{1,2}z},&z<z_{0},\\\\[6.0pt]
A_{+}^{(1,2)}e^{ik_{1,2}z}+B_{+}^{(1,2)}e^{-ik_{1,2}z}&z>z_{2N},\end{array}\right.$
(31) (32)

The scattering amplitudes of the system for the right-incoming wave can be
given by the following transfer matrix

$\mathbf{M}^{(1,2)}=\mathbf{M}_{N}^{(1,2)}\cdot\mathbf{M}_{L}^{-1},$ (33)

where $\mathbf{M}_{L}^{-1}$ is the inverse of the linear transfer matrix and
$\mathbf{M}_{N}^{(1,2)}$ is the nonlinear transfer matrix that its entries
depends on $A_{+}^{(1,2)}$ and $B_{+}^{(1,2)}$. By applying the above transfer
matrix, we find

$\displaystyle
B_{-}^{(j)}=\dfrac{\det\mathbf{M}_{N}^{(j)}}{[\mathbf{M}_{N}^{(j)}]_{11}}B_{0}^{(j)},$
$\displaystyle
A_{0}^{(j)}=-\dfrac{[\mathbf{M}_{N}^{(j)}]_{12}}{[\mathbf{M}_{N}^{(j)}]_{11}}B_{0}^{(j)},$
(34)

where $j=1,2$ and

$\displaystyle
B_{0}^{(j)}=\dfrac{r_{l}(\omega_{j})}{t(\omega_{j})}A_{+}^{(j)}+[t(\omega_{j})-\dfrac{r_{l}(\omega_{j})r_{r}(\omega_{j})}{t(\omega_{j})}]B_{+}^{(j)},$
(35) $\displaystyle
A_{0}^{(j)}=\dfrac{1}{t(\omega_{j})}A_{+}^{(j)}-\dfrac{r_{l}(\omega_{j})}{t(\omega_{j})}B_{+}^{(j)}.$
(36)

In general, the entries of the nonlinear transfer matrix $\mathbf{M}_{N}$ can
be given in terms of the exact solutions of Eqs. 2 and 3 Boyd (2020). In light
of them, the system of equations 27 and 28 consists of Jacobi elliptic
functions where scattering amplitudes appear in the elliptic integral of the
first kind. Therefore, finding the analytic scattering solution of the second
harmonic generation is possible but complicated.

Figure 2:  Transmitted intensity $|E_{+}^{(1,2)}|^{2}=|A_{+}^{(1,2)}|^{2}$ of
the FW (blue line) and SHW (red line). The arrows indicate the value of
transmitted intensity at $\lambda_{\star}$ and $2\lambda_{\star}$.

Under the non-depletion limit, the second harmonic generation admits a
manageable solution 5 which makes it feasible to find the entries of the
nonlinear transfer matrix. Given the non-depletion regime, the nonlinear
transfer matrix of the fundamental wave $\mathbf{M}_{N}^{(1)}$ reduces to the
linear one. In the appendix, we introduce the nonlinear transfer matrix for
the SHW that illuminates the system from the left. Here, we suppose that there
is no left incident wave with the same frequency as the second harmonic, i.e.,
$A_{-}^{(2)}=0$ and the second harmonic reflection emerges through the
reflection from the surfaces.

Figure 3:  Intensity distribution of the left incident FW (a), left incident
SHW (b) and right incident FW (c) into linear photonic crystal at
$\lambda_{\star}=1.736\mu m$.

Our strategy for localizing the SHW is to engineer the band structure of the
linear lattice $\mathcal{S}_{2}$ by embedding defects in the linear crystal.
By taking appropriate parameters of the photonic crystal and its defect, we
can get the wave-number $k_{\star}:=\frac{\omega_{\star}}{c}$ for the
fundamental wave lies in the stopband, and simultaneously, the wave-number
$2k_{\star}$ for the SHW stands on the passband.
Allowing that, on the right hand of Eq. 27, the transmission coefficient for
the SHW, i.e., $t^{(2)}(2k_{\star})$ takes finite value while for the FW, it
vanishes. Subsequently, it can be seen easily from Eqs. 27 and 28 for the
$\omega=\omega_{\star}$, that the transmitted amplitudes satisfy the following
relations

$\displaystyle A_{+}^{(1)}=0,$ $\displaystyle A_{+}^{(2)}\notin 0.$ (37)

This solution leads to a localized SHW with frequency $2\omega_{\star}$ in the
defect layer of the linear system and exponentially decayed FW Figotin and
Gorentsveig (1998). The wave-number lies in the stopband for the right
incident wave with frequency $\omega_{\star}$, which means the transmission
coefficient is zero.By substituting $t(\omega_{\star})$ in Eqs. 35 and 36, we
have

$\displaystyle A_{0}^{(1)}=B_{0}^{(1)}=0.$ (38)

In this case, the photonic crystal totally reflects the wave, and there is no
passing FW in the nonlinear medium. In other words, the source term generating
a second harmonic is absent. Consequently, the right incident fundamental wave
exponentially decays in the linear lattice.
In Fig. 1, we plot the transmission ad reflection for the linear multilayer
slab with a defect layer. In our design, the defective linear crystal consists
of $N=8$ segments each made of two sections with refractive index $n_{1}=1.2$
(Blue layer) and $n_{2}=3.2$ (Orange layer) and sections take the same
thickness, i.e., $d_{1}=d_{2}=1\mu m$. The linear structure becomes defective
by making twice the thickness of the second section of the fourth segment
$(d_{3}=2\mu m)$.
The transmission coefficient $T:=|t|^{2}$ and reflection coefficient
$R:=|r|^{2}$ are given by 13. We plot them in terms of the wavelength in
Fig.1. One can see that defect state appears within the photonic bandgap
between 0.924-0.821 $\mu m$ (left diagram) and 2.094–1.570 $\mu m$ (right
diagram). For this defective structure, a fundamental wave with
$\omega_{\star}=10.783\times 10^{2}$Hz is trapped through the crystal while
the generated wave with frequency $2\omega_{\star}$ is transmitted. In Fig. 2,
we plot the intensity of the transmitted wave
$|E_{+}^{(1)}|^{2}=|A_{+}^{(1)}|^{2}$ ($|E_{+}^{(2)}|^{2}=|A_{+}^{(2)}|^{2}$)
for the FW (SHW) on the right side of the scattering setup. In the
calculation, the second-order nonlinear coefficient for the nonlinear slab is
$\chi^{(2)}=100$ pm/V and the refractive index for the FW and SHW is
respectively $\eta_{1}=3.21$ and $\eta_{2}=3.22$. Since the efficiency of the
nonlinear medium is very low, we assume that a strong light with an amplitude
$|E_{0}|=|A_{-}|=100V/\mu m$ incident normally on the system. In this case the
localization and the transmission of the passing SHW is detectable. The
intensity distribution of the FW and SHW into the linear defective crystal is
plotted in Fig. 3. For the left incident wave, the SHW localizes through the
defective layer while the FW exponentially decays. We also show the mode
distribution of the right coming wave. One can see that the FW exponentially
decays in the linear lattice.

Figure 4:  Logarithmic diagram of transmission $T:=|t|^{2}$ and reflection
$R:=|r|^{2}$ spectrum of the defective linear photonic crystal in the numeric
simulation. In the upper diagram, the frequency of the fundamental wave
($\omega_{\star}=282.82$ Hz ) lies in the bandgap while the second harmonic
generated frequency $2\omega_{\star}$ is located on the passband.

##  III Numeric Simulation

This section numerically demonstrates second harmonic localization by using
finite element method simulations in a time-dependent area. We use COMSOL
Multiphysics to perform a time-domain transient simulation of a sinusoidal
wave passing through an optical setup which is similar to the one we depict in
Fig.1. In our codes, we consider that our linear crystal consists of 12
segments made of two slabs with refractive index $n_{1}=1.2$ and $n_{2}=3.2$.
Our linear system has been made defective by adding an extra slab in the
middle of the crystal. The optimization of the linear system for finding
appropriate bandgap in the way that the generated frequency stands on the
passing band determines the length of slabs and defect layer. The optimization
defines the length of slabs such that $d_{1}=0.2\mu m$, $d_{2}=0.26\mu m$ and
$d_{3}=1.593\mu m$. Fig. 4 illustrates the corresponding transmission and
reflection amplitudes of the linear crystal in the logarithmic scale.

Figure 5:  This plot shows the contribution of the transmitted wave
($P_{i}(\omega):=|a_{i}|^{2}$) versus frequency derived from the Fourier
transform of the time domain transient. The first and second marked point
represents $P_{1}(\omega_{\star})$ and $P_{2}(2\omega_{\star})$ for the
fundamental and the second harmonic

Regarding these plots, one can see that the asymmetric localization takes
place for the left incoming photon with frequency $\omega_{\star}=282.82$ Hz.
The nonlinearity is enroled in our simulation by considering the coupling
between fundamental wave and second harmonic wave via the following
polarization

$\displaystyle\mathbf{P}_{1y}=2d_{\text{eff}}E_{2y}E^{*}_{1y},$
$\displaystyle\mathbf{P}_{2y}=d_{\text{eff}}E^{2}_{1y},$ (39)

where we aligine our polarization in $y$-direction and $d_{\text{eff}}$ is
nonlinear coefficient for the SHG process. We then probe the transient on the
right side of our system and measure the amplitude of time dependant electric
field, i.e., $E_{+y}(t)$. The corresponding contribution of an electric field
for different modes in the frequency domain is given by the following Fourier
transform

$E_{+y}(t)=\int\mathfrak{a}_{n}(\omega)e^{-in\omega t}dt.$ (40)

In Fig. 5, we show the mode contribution of the FW at $\omega_{\star}=282.82$
THz and SHW at $2\omega_{\star}=565.65$ THz. The density of the
electromagnetic wave in the linear photonic crystal is depicted in Fig. 6(b)
showing that the FW is exponentially decayed in the defective linear system
while the SHW is localized in the defect layer. For the right incident wave
with the frequency $\omega_{\star}$, we find the mode intensity in Fig. 6(c)
and show that the FW exponentially decays in the photonic crystal.

Figure 6: In these figures, we demonstrate the mode density throughout the
linear crystal. For the left incident wave (a), the higher intensity on the
left side corresponds to the Fundamental wave. One can see the localized SHW
in the middle of the diagram in the defect layer. For the right incident wave
(b), the higher intensity on the right side corresponds to the exponentially
decaying fundamental wave.

##  IV Conclusion

In summary, we suggest an optical system that makes the photon localized when
it hits the system from one side. In our method for asymmetric localization,
the incident wave is reflected from the optical device while the generated
harmonic wave transfers. The system is adjustable in which one can manipulate
the linear crystal and its defect to localize higher generated harmonic. The
main concern which is issued here is the efficiency of the nonlinear slab. In
this paper, we apply the optimization method to increase efficiency to see the
effect of localization. We also consider the large value of nonlinear
coefficient $(d_{\text{eff}})$ in our numeric code to allow for a detectable
transient field. The values of physical parameters that we find for refractive
index and $(d_{\text{eff}})$ can be actualized by applying some method such as
quasi-phase-matching.

###### Acknowledgements.

We acknowledge the support by the Army Research Office Grant No.
W911NF-20-1-0276 and NSF Grant No. PHY-2012172. The views and conclusions
contained in this document are those of the authors and should not be
interpreted as representing the official policies, either expressed or
implied, of the Army Research Office or the U.S. Government. The U.S.
Government is authorized to reproduce and distribute reprints for Government
purposes notwithstanding any copyright notation herein.

## References

  * Joannopoulos et al. (1995) J. Joannopoulos, R. Meade, and J. Winn, Princeton, NJ (1995).
  * Noda et al. (2000) S. Noda, A. Chutinan, and M. Imada, nature 407, 608 (2000).
  * Akahane et al. (2003) Y. Akahane, T. Asano, B.-S. Song, and S. Noda, nature 425, 944 (2003).
  * Song et al. (2005) B.-S. Song, S. Noda, T. Asano, and Y. Akahane, Nature materials 4, 207 (2005).
  * Navadeh-Toupchi et al. (2020) M. Navadeh-Toupchi, F. Jabeen, D. Oberli, and M. Portella-Oberli, Physical Review Applied 14, 024055 (2020).
  * Mostafavi et al. (2020) F. Mostafavi, C. Yuce, O. S. Maganã-Loaiza, H. Schomerus, and H. Ramezani, 2 (2020), URL https://doi.org/10.1103%2Fphysrevresearch.2.032057.
  * Painter et al. (1999) O. Painter, R. Lee, A. Scherer, A. Yariv, J. O’brien, P. Dapkus, and I. Kim, Science 284, 1819 (1999).
  * Park et al. (2004) H.-G. Park, S.-H. Kim, S.-H. Kwon, Y.-G. Ju, J.-K. Yang, J.-H. Baek, S.-B. Kim, and Y.-H. Lee, Science 305, 1444 (2004).
  * Ellis et al. (2011) B. Ellis, M. A. Mayer, G. Shambat, T. Sarmiento, J. Harris, E. E. Haller, and J. Vučković, Nature photonics 5, 297 (2011).
  * Sievers and Takeno (1988) A. Sievers and S. Takeno, Physical Review Letters 61, 970 (1988).
  * John (1987) S. John, Physical review letters 58, 2486 (1987).
  * Poli et al. (2015) C. Poli, M. Bellec, U. Kuhl, F. Mortessagne, and H. Schomerus, Nature communications 6, 1 (2015).
  * Ramezani et al. (2010) H. Ramezani, T. Kottos, R. El-Ganainy, and D. N. Christodoulides, 82 (2010), URL https://doi.org/10.1103%2Fphysreva.82.043803.
  * Lira et al. (2012) H. Lira, Z. Yu, S. Fan, and M. Lipson, Physical review letters 109, 033901 (2012).
  * Bender et al. (2013) N. Bender, S. Factor, J. D. Bodyfelt, H. Ramezani, D. N. Christodoulides, F. M. Ellis, and T. Kottos, 110 (2013), URL https://doi.org/10.1103%2Fphysrevlett.110.234101.
  * Wang et al. (2013) D.-W. Wang, H.-T. Zhou, M.-J. Guo, J.-X. Zhang, J. Evers, and S.-Y. Zhu, Physical review letters 110, 093901 (2013).
  * Peng et al. (2014) B. Peng, Ş. K. Özdemir, F. Lei, F. Monifi, M. Gianfreda, G. L. Long, S. Fan, F. Nori, C. M. Bender, and L. Yang, 10, 394 (2014), URL https://doi.org/10.1038%2Fnphys2927.
  * Fujita et al. (2000) J. Fujita, M. Levy, R. Osgood Jr, L. Wilkens, and H. Dötsch, Applied Physics Letters 76, 2158 (2000).
  * Jalas et al. (2013) D. Jalas, A. Petrov, M. Eich, W. Freude, S. Fan, Z. Yu, R. Baets, M. Popović, A. Melloni, J. D. Joannopoulos, et al., Nature Photonics 7, 579 (2013).
  * Saleh and Teich (2019) B. E. Saleh and M. C. Teich, _Fundamentals of photonics_ (john Wiley & sons, 2019).
  * Ramezani et al. (2014) H. Ramezani, S. Kalish, I. Vitebskiy, and T. Kottos, 112 (2014), URL https://doi.org/10.1103%2Fphysrevlett.112.043904.
  * Yu and Fan (2009) Z. Yu and S. Fan, Nature photonics 3, 91 (2009).
  * Ramezani et al. (2018) H. Ramezani, P. K. Jha, Y. Wang, and X. Zhang, Physical review letters 120, 043901 (2018).
  * Li et al. (2007) J.-J. Li, Z.-Y. Li, and D.-Z. Zhang, Physical Review E 75, 056606 (2007).
  * Ren and Li (2010) M.-L. Ren and Z.-Y. Li, JOSA B 27, 1551 (2010).
  * Li et al. (2015) H. Li, J. W. Haus, and P. P. Banerjee, JOSA B 32, 1456 (2015).
  * Mostafazadeh et al. (2018) A. Mostafazadeh, H. Ghaemi-Dizicheh, and S. Hajizadeh, JOSA B 35, 2986 (2018).
  * Mostafazadeh (2019) A. Mostafazadeh, The European Physical Journal Plus 134, 16 (2019).
  * Boyd (2020) R. W. Boyd, _Nonlinear optics_ (Academic press, 2020).
  * Javurek and Perina (2019) D. Javurek and J. Perina, Scientific reports 9, 1 (2019).
  * Figotin and Gorentsveig (1998) A. Figotin and V. Gorentsveig, Physical Review B 58, 180 (1998).
  * Mostafazadeh (2020) A. Mostafazadeh, arXiv preprint arXiv:2009.10507 (2020).
  * Jackson (1999) J. D. Jackson, _Classical electrodynamics_ (1999).

## Appendix A

In this section, we construct the nonlinear transfer matrix of a nonlinear
layer under the non-depletion signal approximationLi et al. (2007, 2015). In
terms of the definition of transfer matrix Mostafazadeh (2020) and continuity
condition for electric field $\vec{E}$ and magnetic field $\vec{H}$ at
$z=z_{0},z_{1}$ Jackson (1999), the transfer matrix $\mathbf{M}_{2}$ of slab
$\mathcal{S}_{1}$ for second harmonic generation can be given by the following
relation

$\displaystyle\left(\begin{array}[]{cc}A_{0}^{(2)}\\\
B_{0}^{(2)}\end{array}\right)=\mathcal{M}_{L}^{(2)}\left(\begin{array}[]{cc}0\\\
B_{-}^{(2)}\end{array}\right)$ (45)
$\displaystyle+\chi^{(2)}\mathcal{M}_{N}^{(2)}(A_{-}^{(1)},B_{-}^{(1)})\left(\begin{array}[]{cc}A_{-}^{(1)}\\\
B_{-}^{(1)}\end{array}\right).$ (48)

The first term on the right side presents the linear transfer matrix which is
generated by the homogenous solution of Eq. 3 and relates the free-wave
amplitude of the second harmonic field on te both sides of the nonlinear
medium. It is given by the following relation

$\mathcal{M}_{L}^{(2)}=\dfrac{1}{\eta_{2}}\textbf{Q}_{-1}^{(2)}\textbf{K}_{+}^{(2)}\textbf{P}_{+1}^{(2)}\textbf{P}_{-0}^{(2)}\textbf{K}_{-}^{(2)}\textbf{Q}_{+0}^{(2)}.$
(49)

The related matrices are defined as

$\displaystyle\mathbf{Q}_{\pm j}^{(i)}=\left(\begin{array}[]{cc}e^{\pm
ik_{i}z_{j}}&0\\\ 0&e^{\mp ik_{i}z_{j}}\end{array}\right),\mathbf{P}_{\pm
j}^{(i)}=\left(\begin{array}[]{cc}e^{\pm i\tilde{k}_{i}z_{j}}&0\\\ 0&e^{\mp
i\tilde{k}_{i}z_{j}}\end{array}\right),$ (54)
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\mathbf{K}_{\pm}^{(j)}=\frac{1}{2\eta_{j}}\left(\begin{array}[]{cc}\eta_{j}+1&\pm\eta_{j}\mp
1\\\ \pm\eta_{j}\mp 1&\eta_{j}+1\end{array}\right),$ (57)

and $\tilde{k}_{j}=\eta_{j}k_{j}$. The second part in Eq. 3 denotes the
nonlinear transfer matrix which relate the bound-wave amplitudes of the second
harmonic field created by the fundamental wave. We find the nonlinear transfer
matrix as:

$\displaystyle\mathcal{M}_{N}^{(2)}=\dfrac{\mathcal{G}_{1}}{2\tilde{k}_{2}}\mathbf{Q}_{-1}^{(2)}[\mathbf{K}\textbf{O}_{1}-\tilde{\mathbf{K}}\textbf{O}_{0}]\mathbf{N}_{1}\mathbf{P}_{-0}^{(1)}\mathbf{K}_{+}^{(1)}\mathbf{Q}_{+}^{(1)}$
$\displaystyle+\mathcal{G}_{2}\mathbf{Q}_{-1}^{(2)}\mathbf{N}_{2}\mathbf{P}_{-0}^{(1)}\mathbf{K}_{+}^{(1)}\mathbf{Q}_{+}^{(1)}$
(58)

where

$\displaystyle\tilde{\mathbf{K}}=\left(\begin{array}[]{cc}\tilde{k}_{2}+2\tilde{k}_{1}&\tilde{k}_{2}-2\tilde{k}_{1}\\\
\tilde{k}_{2}+2\tilde{k}_{1}&\tilde{k}_{2}-2\tilde{k}_{1}\end{array}\right),\mathbf{K}=\left(\begin{array}[]{cc}k_{2}+2\tilde{k}_{1}&k_{2}-2\tilde{k}_{1}\\\
k_{2}+2\tilde{k}_{1}&k_{2}-2\tilde{k}_{1}\end{array}\right),$ (63)
$\displaystyle~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}\textbf{O}_{j}=\left(\begin{array}[]{cc}e^{2i\tilde{k}_{1}z_{j}}&0\\\
0&e^{-2i\tilde{k}_{2}z_{j}}\end{array}\right),$ (66)

and, we intruduce amplitude dependant matrices

$\displaystyle\mathbf{N}_{1}=\left(\begin{array}[]{cc}C^{(1)}&0\\\
0&D^{(1)}\end{array}\right),$
$\displaystyle\mathbf{N}_{2}=\left(\begin{array}[]{cc}0&C^{(1)}\\\
D^{(1)}&0\end{array}\right).$ (71)

The amplitudes $C^{(1)}$ and $D^{(1)}$ can be defined from the FW such as

$\left(\begin{array}[]{cc}C^{(1)}\\\
D^{(1)}\end{array}\right)=\mathbf{P}_{-0}^{(1)}\mathbf{K}_{+}^{(1)}\mathbf{Q}_{+0}^{(1)}\left(\begin{array}[]{cc}A_{-}^{(1)}\\\
B_{-}^{(1)}\end{array}\right).$ (72)