## 3 Simulation Setup and System Parameters  
This section presents the simulation setup and parameter settings of the proposed all-optical pattern recognition system using VPItransmissionMaker 8.5. The data rate is set to 100 Gbps in our simulation considering the parameters of HNLF used in the system. Figure 5 shows the numerical simulation setup of the proposed system, and the parameter setting of various modules in simulation is displayed in Table 1.  
**Data and Target:** The incoming data and target sequence are represented by two synchronized BPSK signals, which are generated using predetermined data and ideal phase modulators. The input data stream is structured as a periodically replicated sequence, thereby avoiding the storage loop. The center frequency of the target is always set to 193.4 THz. To verify the performance of the system in processing the input data with tunable frequency, we set the center frequency of the input data to 192.8 THz and 193.4 THz in the simulation, which are symmetrical about the center frequency of the local CW. **DI:** The DI module consists of two 50:50 couplers and an optical delay line (ODL). For the right DI following the input data, the delay time of the ODL is set to \(T\), while for the left DI following the target, the delay time of the ODL is set to \(nT\). **Switch:** The switch module selects one of two input signals through a control signal. In the first loop, the optical switch selects a null source to pass through. After that, it selects the output of DI to pass through, so as to eliminate the interference brought about by the initial state. The output of the right switch is amplified by 20.06 dB and 20.02 dB when the center frequencies of the input data are 192.8 THz and 193.4 THz, respectively. **NOLM:** The NOLM is constructed by a bidirectional 50:50 coupler, two multiplexers, and a bidirectional HNLF. First, the local CW with a center frequency of 193.1 THz passes through the unidirectional isolator and bidirectional coupler sequentially to generate the clockwise and counterclockwise carriers. Then, the input data and the counterclockwise carrier are injected into the HNLF through the right multiplexer. Meanwhile, the target and the clockwise carrier are injected through the left multiplexer. Subsequently, these two carriers are coherently interfered in the bidirectional coupler. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Module** & **Parameter** & **Value** \\ \hline \multirow{3}{*}{input data} & center frequency & 192.8 THz and 193.4 THz \\  & average power & 0.5 mW [17] \\  & initial phase & \((0,\pi]\) \\  & center frequency & 193.4 THz \\ target & average power & 63.22 mW \\  & initial phase & \((0,\pi]\) \\ local CW & center frequency & 193.1 THz \\  & average power & 1 mW \\  & length & 1007 m [18] \\  & attenuation & \(0.2\times 10^{-3}\) dB/m \\ all HNLFs & nonlinearity coefficient & \(\sim\)29 W\({}^{-1}\times\) km\({}^{-1}\)[19] \\  & chromatic dispersion & \(-\)0.69 ps/nm \(\times\) km \\  & dispersion slope & 0.0074 ps/nm\({}^{2}\times\) km \\ all BPFs & bandwidth & 100 GHz [20; 21] \\ all lasers & line width & 100 KHz [22] \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameter setting of various modules in simulation. Figure 5: Numerical simulation setup of the proposed all-optical pattern recognition system. **NOT:** The output of the NOLM passes through another unidirectional isolator and a BPF with a center frequency of 193.1 THz to obtain the bit-recognition result. Before entering the NOT gate, an amplifier with a gain of 18.19 dB is used to increase the power of the bit-recognition result. Meanwhile, the probe with an average power of 0.5 mW at 192.8 THz inside the NOT gate is split into two branches. Then, the bit-recognition result, which serves as the pump, and the upper branch of the probe propagate through the following HNLF to generate the XPM effect. The upper branch of the probe experiences a phase shift induced by XPM, with its magnitude linearly dependent on the pump power.