## 3 SNPCO Method for DUV Lithography System  
In this section, we develop a gradient-based SNPCO method to comprehensively optimize the source, NA, and process parameters for mitigating the impacts of mask absorber errors on lithographic imaging performance. For the statistical optimization problem described in Equations (10) and (11), the SGD algorithm is adept in solving such problem [26; 27]. Thus, we use the SGD algorithm to optimize the source. And the NSGD algorithm is applied to optimize the NA and process parameters of different scales to improve convergence of algorithm. The optimization procedures are carried out alternately. The pseudocode in Table 1 explains the procedure of the SNPCO method, and the supplementary explanations are detailed in the following context. As the NA and process parameters are not of the same order of magnitude, the large-scale parameters are likely to be obstructed by small-scale parameters in the optimization. Hence, we normalize the different scale process parameters in the same range of 0 to 1. The normalization is expressed as  
\[\tilde{\mathbf{x}}=\frac{\mathbf{x}-\mathbf{x}_{\text{min}}}{\mathbf{x}_{ \text{max}}-\mathbf{x}_{\text{min}}}, \tag{12}\]  
where parameter vector \(\mathbf{x}_{\text{min}}\) and \(\mathbf{x}_{\text{max}}\) are the minimum and maximum values of \(\mathbf{x}\). Since the SGD method is applied to optimize source, we need to calculate the search direction at the \(k^{\prime}th\) Zernike coefficients iteration point. The search direction is  
\[d_{S}{}^{(k)}=-\
abla F_{S}(\mathbf{c}^{(k)}),, \tag{13}\] \begin{table}
\begin{tabular}{l} \hline \hline
**Source optimization procedure** \\ \hline
1. Initialization: Assign the coefficient vector c of the starting source, source optimization step size \(\Lambda_{S}=0.1\), the increment of c for derivative calculation, the weighting coefficients of the objective functions, maximum source iteration number \(n_{S}=50\), initial source iteration number \(k_{S}=0\), initial alternate loop count \(k_{SNP}=0\), and the maximum alternate loop count \(n_{SNP}=10\). \\
2. Update the source pattern: \\ If \(k_{SNP}\leq n_{SNP}\) \\ \(k_{SNP}=k_{SNP}+1\); \\ While \(k_{S}\leq n_{S}\) \\ \(k_{S}=k_{S}+1\); \\ Randomly generate the absorber errors \(MAT_{i}\) and \(SWA_{j}\); \\ Calculate the search direction \(d_{S}\) at the current iteration point using the Equation (13); \\ Update the Zernike coefficient vector: \\ \(\mathbf{c}^{(k_{S})}=\mathbf{c}^{(k_{S}-1)}+\Lambda_{S}d_{S}{}^{(k_{S}-1)}\). \\ end \\ Else: Terminate the SNPCO method, and output the source pattern and the numerical aperture (NA) and process parameters. \\
3. Output the optimized source pattern into the NA and process parameters optimization procedure. \\ \hline
**NA and process parameters optimization procedure** \\ \hline
1. Initialization: Assign the NA and process parameters vector x, the parameters optimization step size \(\Lambda_{NP}=0.5\), the increment of x for derivative calculation \(\Delta\mathbf{x}=0.1\), maximum NA and process parameters \\ iteration number \(n_{NP}=40\), initial process and lithography-tool iteration number \(k_{NP}=0\). \\
2. Normalize the optimization parameters using Equation (12); \\
3. Update the NA and process parameters: \\ While \(k_{NP}\leq n_{NP}\) \\ \(k_{NP}=k_{NP}+1\); \\ Randomly generate the absorber errors \(MAT_{i}\) and \(SWA_{j}\); \\ Calculate the search direction \(d_{NP}\) at the current iteration point using Equation (14); \\ Update the NA and process parameters vector: \\ \(\mathbf{x}=\mathbf{x}\) \\ End \\
4. Return the optimized NA and process parameters to the source optimization procedure. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Pseudocode of the source, numerical aperture, process parameters co-optimization (SNPCO) method. The NSGD method is used to optimize the NA and process parameters.