## 1 Introduction  
With the rapid advancement of virtual reality, big data, and ultra-high-definition-video services, meeting the demand for high-speed, large-capacity, and broadband services has emerged as a key objective in the development of communication networks [1, 2]. The use of higher carrier frequencies is an effective approach to increasing bandwidth and enhancing transmission capacity and thus offers a promising solution for high-speed communication [3]. The terahertz band, which falls in the range 0.1-10 THz, has significant advantages in alleviating shortages of spectrum resources and capacity bottlenecks in communication systems owing to its wide bandwidth and capacity for ultra-high-speed data-transmission [4]. Moreover, terahertz signals exhibit good directivity and anti-interference characteristics, making them well suited for use in short-range, high-density wireless communication. As a result, the terahertz band is widely regarded as a core technology that can be used to promote the development of future 6G mobile communication and one that shows great potential for use in ultra-high-frequency-band communication, ultra-dense networks, and emerging application scenarios [5; 6]. However, a terahertz signal generated in electronic constrained by limitations such as narrow frequency bandwidth, significant signal loss, and low transmission rate, constraining its application in long-distance transmission [7]. As optical-fiber communication technology has matured, the photon-assisted generation of terahertz signals has become a more efficient option. There are two common methods used for the generation of photonic terahertz signals. One approach employs an optical frequency comb (OFC) to generate a highly stable terahertz carrier [8; 9]. The other utilizes two narrow linewidth lasers with fixed frequencies, where the terahertz signal is produced via the heterodyne beating process in the photodiode. This method enables the generation of a terahertz signal with a wide tuning range and extremely high bandwidth, which give it the potential to meet the demand for high-speed and large-capacity transmission in future 6G and higher-generation communications systems [10; 11]. In recent years, photon-assisted technology has opened up a new path for high-speed terahertz communication. Nevertheless, advanced signal-modulation technology is still necessary to achieve efficient and reliable data transmission. Orthogonal frequency division multiplexing (OFDM), a well-established multi-carrier modulation technology, is widely used in optical communication [12; 13]. OFDM converts high-speed serial data streams into orthogonal low-speed parallel sub-data streams, effectively reducing intersymbol interference (ISI) and improving signal stability and transmission efficiency. Due to these advantages, OFDM has attracted considerable research attention and has been widely studied in recent years [14; 15]. To further enhance the transmission performance of OFDM signals, probabilistic shaping (PS) technology has garnered increasing attention in both research and practical applications [16; 17; 18]. PS adjusts the probability distribution of constellation points by transforming them from a uniform distribution to one that approximates a Gaussian distribution. This technique increases the probability of selecting constellation points closer to the center while reducing the probability of selecting points farther from the center, thereby effectively reducing the signal's average power. Research on PS algorithms has attracted widespread attention and has been progressing rapidly in recent years. In [19], a PS scheme based on trellis-coded modulation (TCM) is presented; this scheme enhances the efficiency of PS signals within bandwidth-constrained intensity-modulation and direct-detection (IMDD) systems. A hierarchical distribution matcher (HiDM) scheme with parallel input and output is proposed in [20]; this scheme simplifies the operation compared to constant component distribution matchers.