## 2 In-Cavity Pulse Shaping
### Bandwidth Programmable Optical Nyquist Pulse Generation
Here, \(\psi\) is the pulse being evaluated, and \(\chi\) is the theoretical sinc function (Equation (3)) with the same peak amplitude. In each case, we have verified that the spectrum was close to the ideal rectangular one. In Figure 5, we summarise the results obtained in the absence of in-cavity dispersion control. It is seen that when a flat-top spectral profile is applied on the filter (Figure 5a), the quality of the generated sinc pulses improves with increasing values of the filter bandwidth, which enable increasingly higher values of the nonlinear phase shift accumulated in the fibre. This confirms that the pulse-shaping mechanism of our laser design requires SPM and gets stronger with increasing pulse intensity and nonlinear phase shift. The peak nonlinear phase shift accumulated by the pulse, however, saturates to about 3.5 rad in our laser configuration. Above this value, the pulse spectrum after the fibre begins to split and oscillations begin to appear in its central part. Sinc-shaped pulses with low \(M\) values (\(M\leq 0.06\)) are obtained over the bandwidth range from a few hundred gigahertz to a few terahertz. At smaller bandwidths, in order to enhance the spectral breathing, hence, the filtering process, more nonlinear pulse propagation is necessary in the cavity. To this end, one may either use a longer gain fibre segment or incorporate a short segment of passive nonlinear fibre into the cavity [36]. Our results [36] confirmed that high-quality sinc-shaped pulses can indeed be obtained over the bandwidth range from a few tens to a few hundreds of gigahertz in this case. For larger bandwidths than the upper bound of the interval shown in Figure 5, stable single-pulsing was not possible. On the other hand, when the enhanced spectral filtering strategy is deployed, misfit values to a sinc pulse shape below 0.03 are possible over the full bandwidth range being studied (Figure 5b). Remarkably, the misfit parameter is reduced by a factor of more than ten (and even reaching a hundred in some cases) with respect to the rectangular filtering approach for bandwidths between the lower bound of the interval studied (10 GHz) and more than two terahertz. This relaxes the need for large nonlinear phase accumulation or, in other words, large spectral broadening in the fibre section to obtain a fairly flat pulse spectrum within the filter bandwidth. Indeed, a higher degree of concavity of the output spectrum from the fibre stemming from a lower extent of nonlinear spectral expansion can be offset by a higher value of the correction factor \(\alpha\) (Figure 4). The increase of the misfit parameter with increasing bandwidth after approximately 1.5 THz is due to the fact that at such large bandwidths, some structure of the nonlinearly-broadened pulse spectrum at the fibre output falls within the filter bandwidth. Such a structure cannot be efficiently cancelled by applying a simple convex function. Consequently, the strength of the corrective spectral shaping approach increasingly diminishes with increasing bandwidth, as is evident from the misfit parameter increasingly approaching the values obtained with the basic shaping approach. Ultimately, the corrective approach becomes dispensable. However, within such a bandwidth range, the generated sinc pulses with the basic approach are already of very high quality (Figure 5a) and, thus, do not compulsorily require corrections. The operation of the laser under different dispersion conditions revealed a typical scenario of when a corrective Gaussian-top profile is applied on the filter: when anomalous GVD is added into the cavity by the filter, a larger shape correction factor \(\alpha\) can compensate for the higher degree of concavity of the pulse spectrum at the output of the fibre to some extent, and so, better quality sinc-shaped pulses can be obtained compared to the basic filtering method.