# Optical Realization of Wave-Based Analog Computing with Metamaterials
## 2 Computational Metamaterials
### [PERSON]'s Function Approach  
In the original GF approach proposed by [PERSON] et al. [102], the transmission or reflection coefficient of multi-layered stacked slabs with transversely homogenous and longitudi  
Figure 3: **(a)** The sketch of graphene-based metaline; adapted with permission from [32] © The Optical Society. **(b)** Dielectric metamaterial with drilling hole arrays to solving second-order differential equation; adapted with permission from [123], IOP Publishing, 2016. **(c)** Schematic of on-chip 1D high-contrast transmitarray, the rectangular slot arrays are etched on the silicon-on-insulator (SOI) substrate with the period of 500 nm. **(d)** Comparison of the input (top) and output (bottom) intensity profile of an on-chip differentiator; adapted with permission from [100], Springer Nature, 2019. **(e)** Left: schematic of the concept for spin-dependent function control; middle: schematic of the dielectric metasurface spatial filter; right: photograph of the fabricated metasurface. Scale bar: 500 \(\upmu\)m. Insets: scanning electron micrographs showing the top and oblique view of TiO\({}_{2}\) nanopillar array. Scale bar: 1 \(\upmu\)m. Adapted with permission from [125], ACS Publications, 2020.  
nally inhomogeneous are engineered to approximate the desired transfer function without getting into the Fourier domain. Since additional Fourier lenses are not required, the GF approach has advantages over the MS approach with a more compact size and an easier fabrication process. The basic idea of the GF approach is to find the proper transmittance coefficient \(\widetilde{T}(k_{y})\) of the multi-layered slab to fit the desired GF kernel \(\widetilde{G}(k_{y})\) within \(0<k_{y}<k_{0}\), in which \(k_{y}\) is the transverse wavevector, and \(k_{0}\) is the free space wavevector. A fast synthesis algorithm is adopted to minimize the difference between \(\widetilde{T}(k_{y})\) and \(\widetilde{G}(k_{y})\), which can be expressed as:  
\[err=\sum_{i=1}^{M}\biggl{(}w_{r}\Bigl{(}\mathrm{Re}\Bigl{[}\widetilde{G}(k_{y,i})-\widetilde{T}(k_{y,i})\Bigr{]}\Bigr{)}^{2}+w_{i}\Bigl{(}\mathrm{Im}\Bigl{[} \widetilde{G}(k_{y,i})-\widetilde{T}(k_{y,i})\Bigr{]}\Bigr{)}^{2}\biggr{)} \tag{5}\]  
where \(M\) is the number of layers, \(w_{r}\) and \(w_{i}\) are weight coefficients for real and imaginary parts. The optimized transmission spectrum is in good agreement with the desired GF which correspond to 2 th spatial derivative provided that \(M=10\), \(w_{r}=2\), \(w_{i}=1\), and relative permeability of each layer keep at unity.  
In recent years, extensive studies with resonant or non-resonant structures were proposed with the GF approach, such as multi-layered slabs [126; 127], photonic crystal [128], diffraction gratings [15; 31; 129; 130; 131; 132; 133; 134], surface plasmon-based devices [135; 136; 137; 138; 139; 130; 137], dielectric metasurfaces [138; 139; 140; 141; 142; 143], nonlocal metasurfaces [144; 145], random medium [146] and inverse-designed meta-structures [147]. Moreover, various physical mechanisms including Brewster effect [148], Goos-Hanchen effect [149] and spin hall effect [150] can also be applied to perform optical analog computing. Therefore, the GF approach can be generalized to a fundamental protocol for designing the particular transfer function (defined as \(H(k_{x},k_{y})=\widetilde{E}_{y}^{out}(k_{x},k_{y})/\widetilde{E}_{y}^{in}(k_{ x},k_{y})\)) which should be approximately proportional to the desired mathematical operations.