## 2 Parametric Model and Methods  
A binary linear grating model was selected as the simulation model, which was widely used to study the sensitivity of the wavefront to CGH fabrication errors [15; 16; 17]. The lithography process forms a sidewall slope in the microstructure of CGHs. Therefore, a trapezoidal geometry was introduced to describe a binary grating with a sidewall slope, as shown in Figure 1. For a normal incident plane wavefront of \(\lambda\), the output wavefront function can be expressed according to [11],  
\[u(x)=A_{0}+(A_{1}e^{i\phi}-A_{0})\cdot rect(\frac{x}{d})*\frac{1}{c}rect(\frac {x}{c})*\frac{1}{S}comb(\frac{x}{S}) \tag{1}\]  
where the symbol \({}^{*}\) represents the convolution operation and the related variables are defined in Figure 1.  
According to the scalar diffraction theory, the far-field diffraction wavefront \(U(\xi)\) is obtained via a simple Fourier transform of \(u(x)\). \[ \begin{split} U(\xi)=F\{u(x)\}&=\bigg{\{}A_{0} \delta(\xi)+[A_{1}\cos(\phi)-A_{0}]\cdot D\cdot sinc(b_{\xi}^{x})\cdot sinc(c_{ \xi}^{x})\cdot\sum\limits_{m=-\infty}^{m=+\infty}\delta(\xi-\frac{m}{S})\bigg{\}} \\ &+i\bigg{\{}A_{1}\sin(\phi)\cdot D\cdot sinc(b_{\xi}^{x})sinc(c_{ \xi}^{x})\cdot\sum\limits_{m=-\infty}^{m=+\infty}\delta(\xi-\frac{m}{S})]\\ &\text{Therefore, diffraction wavefronts of different orders can be written as follows:}\\ U(\xi)=\left\{\begin{array}{ll}\{A_{0}+[A_{1}\cos(\phi)-A_{0}] \cdot D\}+i\{A_{1}\sin(\phi)\cdot D\}&m=0\\ \{[A_{1}\cos(\phi)-A_{0}]\cdot D\cdot\sin c(mD)\sin c(mL)\}&m=\pm 1,\pm 2,\cdots\\ +i\{A_{1}\sin(\phi)\cdot D\cdot\sin c(mD)\sin c(mL)\}\end{array}\right.\end{split}  \tag{2}\]  
Figure 1: Cross-section of the binary linear grating model. Herein, \(S\) is the period, \(h\) is the etching depth, \(c\) is the project length of sidewall in the horizontal direction and \(d\) is the width of the grating ridge. The duty cycle \(D\) is defined as \(D=d/S\) and the sidewall slope ratio \(L\) is given by \(L=c/S\). In addition, \(A_{0}\) and \(A_{1}\) correspond to the amplitude of the output wavefront from the unetched and etched areas of the grating, respectively. For a phase grating made of a material with refractive index \(n\), the phase step \(\phi\) is defined as \(2\pi(n-1)h/\lambda\), where \(\lambda\) is the wavelength of incident light set to 632.8 nm. The diffraction efficiency \(\eta_{scalar}\) and output phase \(\psi_{scalar}\) can be obtained by,  
\[\eta_{scalar}=\left\{ \begin{array}{c}A_{0}^{2}(1-D)^{2}+A_{1}^{2}D^{2}+2A_{0}A_{ 1}D(1-D)\cos(\phi)\quad m=0\\ \left\{A_{0}^{2}+A_{1}^{2}-2A_{0}A_{1}\cos(\phi)\right\}\cdot D^{2}\sin c^{2}(mD )\sin c^{2}(mL)\ m=\pm 1,\pm 2,\ldots\end{array} \right. \tag{4}\]  
and, as follows:  
\[\tan\psi_{scalar}=\frac{\text{Im}\{U(\xi)\}}{\text{Re}\{U(\xi)\}}=\left\{ \begin{array}{c}\frac{A_{1}D\sin(\phi)}{A_{0}(1-D)+A_{1}D\cos(\phi)}\ \ m=0\\ \\ \frac{A_{1}\sin(\phi)}{-A_{0}+A_{1}\cos(\phi)}\ \ m=\pm 1,\pm 2,\ldots\end{array} \right. \tag{5}\]  
If the periods of the CGHs are far larger than the wavelength, the scalar approximation is sufficiently accurate. However, it will exhibit imperfections for regions with small periods. The FDTD simulation is introduced for rigorous calculations, and the flow is illustrated in Figure 2. First, the structure group is constructed according to the parametric grating model. Periodicity is set as a boundary condition in the direction along which the gratings are arranged repeatedly. To calculate the electromagnetic field based on FDTD, the simulation region is discretized into spatial grids, and adjacent field components along any axis are separated by grid space steps of 1/2. The iterative calculation process is similar to the leapfrog calculation of the time step [18]. The numerical value of the electromagnetic field at the current moment can be obtained using the results of the electromagnetic field at the previous moment.