## 4 Numerical Simulation and Analysis
### Analysis of \(Q\)-Value and Gain Threshold  
The quality factor, \(Q\), is an important parameter for evaluating the performance of the cavity, reflecting the ability of the cavity to bind to the photon. The larger the \(Q\) value is, the longer it stores photons, and its expression is [43]:  
\[Q=2\pi f\tau_{\rm R}=2\pi f\frac{L}{\delta c} \tag{5}\]  
where \(f\) is the frequency of the optical field in the cavity, \(\tau_{\rm R}\) is the time constant of the cavity, \(\delta\) is the loss in the cavity, \(L\) is the length of the cavity, and \(c\) is the speed of light in the vacuum.  
The threshold (\(g_{\rm th}\)) is the minimum gain required to satisfy the laser's realization of stimulated radiation and is an important basis for reflecting the performance of the laser. The lower the threshold is, the less gain the laser needs to achieve lasing, and the higher the quality of its work is. The \(g_{\rm th}\) expression is:  
\[g_{\rm th}=[k_{0}\alpha_{\rm eff}+\ln(1/R)/L]/\Gamma(n_{\rm eff}/n_{\rm wire}) \tag{6}\]  
where \(k_{0}=2\pi/\lambda\) is the wave number in vacuum, \(n_{\rm wire}\) is the refractive index of the CdS nanowire, \(n_{\rm eff}\) is the real part of the effective index of the mode, \(\Gamma\) is the confinement factor, and the scaling factor, \(n_{\rm eff}/n_{\rm wire}\), is the enhancement part of the effective index of the mode. \(R\) is the end face reflectivity, defined as [44; 45]:  
\[R=(n_{\rm eff}-1)/(n_{\rm eff}+1) \tag{7}\]  
As can be seen from Figure 5a, the gain threshold, \(g_{\rm th}\), decreases first and then increases with the expansion of the air gap width. \(g_{\rm th}\) gradually increases with the increase of \(h_{\rm t}\) when \(w_{\rm g}\) is constant. At \(w_{\rm g}=35\) nm, \(h_{\rm t}=\) At 5 nm, a minimum value of 0.14 \(\upmu\)m\({}^{-1}\) is obtained because the escalation in the depth of the air gap increases the loss of plasmon on the metal surface, which requires more optical gain, so the threshold is increased.  
Figure 5b shows that as the width of the air gap, \(w_{\rm g}\), increases, when the distance, \(h_{\rm t}\), from the bottom of the fixed nanowire to the top of the graphene is constant, the quality factor, \(Q\), decreases gradually. When the \(w_{\rm g}\) is constant, the quality factor decreases as the \(h_{\rm t}\) increases. In the selected range of values, the maximum value is 150.9, indicating that the resonant cavity has a stronger ability to limit photons.  
Figure 5: The change of gain threshold and quality factor with the structures (**a**); threshold, \(g_{\rm th}\); and (**b**) quality factor, \(Q\).  
In summary, in order to optimize the performance of the nanolaser, the influence of geometric parameters on its mode characteristics, quality factor, and gain threshold are considered as a whole. Finally, the air gap width, \(w_{\mathrm{g}}\), is chosen to be 35 nm, and the distance, \(h_{\mathrm{t}}\), from the bottom of the nanowire to the top of the graphene is 10 nm. At this time, the laser has a propagation loss of 0.0096, an effective mode area of 0.001\(\lambda^{2}\), a threshold as low as 0.14 \(\upmu\)m\({}^{-1}\), and a quality factor of 147.21, so that a low loss, low threshold, and deep subwavelength-constrained lasing can be achieved.