## 3 Experimental Setup  
In this experiment, we built a single-channel experimental setup for long-distance wireless communication in the D-band using photonics-assisted technologies. The transmitter and receiver were situated on two campuses of Fudan University. The wireless transmitter was positioned atop Guanghua Building in Handan Campus, which stands at 142 m, and the wireless receiver was situated on the top floor of the Physics Building, at a 4600 m distance from the transmitter and at a height of 24 m. The system architecture is depicted in Figure 3a. Figure 3b illustrates the distinct procedures pertaining to the transmitter DSP (Tx DSP) and receiver DSP (Rx DSP). The baseband signal was created offline in MATLAB (R2023b) on the transmitter side. The bit sequence was first mapped to QPSK signals. Subsequent to up-sampling, the signals underwent root-raised cosine (RRC) pulse shaping with a roll-off value of 0.01. Next, we produced the digital signal by resampling and input it into a 120 Gsa/s arbitrary waveform generator (AWG), resulting in a 25 Gbaud QPSK signal. The signals were enhanced by two parallel electrical amplifiers (EAs), each possessing a gain of 25 dB. Figure 3: The experimental setup: (a) single-channel 4600 m wireless testing configuration, (b) transmitter-side and receiver-side DSP. Two free-running external-cavity lasers (ECLs) were utilized in the experiment. ECL-1 possessed a wavelength of 1550.00 nm, a linewidth under 100 kHz, and an output power of 12 dBm; ECL-2 had a wavelength of 1551.08 nm, with identical linewidth and output power as ECL-1. The steady light from ECL-1 was adjusted by an I/Q modulator that had a 3 dB bandwidth of 30 GHz, using the 12 dBm optical carrier from ECL-1 to complete the optical modulation. The modulated signal was boosted to 12 dBm by polarization maintaining erbium-doped fiber amplifier (PM-EDFA), and then it was combined with optical carrier from ECL-2 by polarization maintaining optical combiner (PM-OC). The combined signal travelled through 100 m of Single-Mode Fiber-28, and then its optical power was adjusted by a variable optical attenuator (VOA) before it went into a untraveling carrier photodiode (UTC-PD). In the UTC-PD, a D-band millimeter-wave signal was produced using optical heterodyne beating. Due to the quick attenuation of the signal during free-space transmission, amplification was necessary. Cascaded LNA-1, possessing a gain of 18 dB, and PA, exhibiting a saturated output power of 13 dBm, were employed to facilitate 4600 m wireless transmission. A transmitting horn antenna (HA-1) with a gain of 25 dB emitted the enhanced signal into free space. To improve the directivity and transmission range of the signal, a pair of lenses was positioned in front of the transmitting and receiving antennas, respectively. Lens 1 possessed a diameter of 10 cm, whereas Lens 2 had a diameter of 60 cm. At the receiver end, the signal was initially amplified by LNA-2 with a gain of 33 dB. The 12.51 GHz local oscillator (LO) was then increased in strength by 12 times in the mixer, mixed with the terahertz signal, and changed into an intermediate-frequency (IF) signal. The down-converted IF signal was then boosted by EA-3, which increased its strength by 26 dB, and was finally recorded by a digital storage oscilloscope (DSO) that sampled at 100 GSa/s and had a 3 dB bandwidth of 33 GHz. Figure 3b illustrates that the IF signal acquired at the receiver was processed offline using DSP in MATLAB. Initially, down-conversion and resampling were executed to transform the IF signal into a baseband signal. A 31-tap T/2 constant modulus algorithm (CMA) was used to improve the signal quality and reduce interference caused by the way the channel transmits data. Next, frequency-offset estimation (FOE) was done to reduce the effects of frequency drift caused by the laser's frequency offset, and carrier-phase recovery (CPR) was performed to improve the phase noise caused by the laser's linewidth.