Dynamically logical modulation for THz wave within a dual gate–controlled 2DEG metasurface Authors: Hongxin Zeng, Xuan Cong, Huifang Zhang, Sen Gong, Tianchi Zhou, Lan Wang, Haoyi Cao, Huajie Liang, Shixiong Liang, Shiqi Wang, Feng Lan, Xun Wang, Ziqiang Yang, Yaxin Zhang, Tie Jun Cui Published: 2024 ABSTRACT High-speed logic modulation of terahertz (THz) waves is crucial for future communications, yet a technology gap persists. Here, we report a dual gate–controlled two-dimensional electronic gas logic modulation metasurface that enables symmetric and asymmetric electron distribution states through independent control of the two electron transport channels. The transition between these two states leads to various response modes in the metasurface and notably increases the diversity of the spectrum transformation, resulting in a multivalued relationship in which each output corresponds to more than one input signal, thus establishing the logical modulation. Our results demonstrate the common logical functions of AND, OR, XOR, XNOR, NOR, and NAND at different frequencies with a modulation speed faster than 250 picoseconds. This work offers a unique avenue for the high-speed, free-space logical operation of THz waves and increases the security of secure communication. INTRODUCTION Realizing free-space manipulations of electromagnetic waves has always been a goal in the development of information science and technology. Electromagnetic metasurfaces can break through the limitations of conventional materials that are difficult to manipulate at the atomic or molecular level and open new degrees of freedom to the manipulation of electromagnetic waves (1–4), because their constituent units can be arbitrarily tailored to ensure effective medium properties. Many novel physical phenomena have emerged, such as negative refraction (5–7), perfect absorption (8–10), perfect focusing (11–14), optical nonlinearity (15, 16), and extraordinary reflection and transmission dominated by the general Snell’s law (17–21). With the development of digital information technology and novel materials, metasurfaces nested with active materials or components have realized the digital processing of analog electromagnetic waves and established the interconnection between digital information and physical surfaces (22–24). The combination of metasurfaces nested with P-Intrinsic-N diodes or varactor diodes and digital coding theory has enabled the digital manipulations of microwaves, giving rise to a new regime of information systems such as programmable holographic imaging systems (25, 26), digital-metasurface microwave imaging systems (27, 28), and simplified-architecture wireless communication systems (29–31). However, in the terahertz (THz) band, conventional microwave components are difficult to operate due to the contradiction between the need for short wavelengths and the large device size. The emergence of several materials that interact with THz waves has driven the rapid development of digital manipulations of THz waves. For example, phase-transition materials (32–35), graphene (36–39), electronic components (40–42), and micro-electro-mechanical systems (MEMS) (43–45) are used to reconfigure the geometric and electromagnetic properties of the THz metasurface. The AlGaN/GaN double-heterojunction structure, which is a composite of the third-generation broadband semiconductor GaN and the ternary alloy AlGaN, has high-density two-dimensional electronic gas (2DEG) at the interface, with high electron mobility and saturation electron velocity. These properties make it a promising material for modulating THz waves and have been applied in the development of THz high-speed devices (46–48). Prior investigations have unveiled the remarkable capabilities of digital metasurfaces, showcasing their efficacy in manipulating various aspects of THz waves, including amplitude (49–52), phase (53–55), polarization (56–59), and wavefront (60–62). Logic modulation is integral to photonic microprocessors, optical signal processors, and secure communication, representing another essential realm yet to be fully investigated in the context of THz waves (63). However, the exploitation of metasurfaces for logic modulation with THz waves remains largely unexplored. In the microwave frequency bands, conventional practices involve logical modulation of signals in the digital domain, followed by conversion to the radio frequency front end through digital-to-analog processes. However, the complexity of systems notably escalates when logically modulating broadband signals using this approach. Conversely, analog logic modulation offers a direct manipulation of electromagnetic waves, obviating the need for intricate and costly digital-to-analog conversion modules. Nevertheless, this method necessitates a substantial allocation of spectrum bandwidth, presenting a formidable obstacle in microwave applications with constrained spectrum resources. In contrast, the utilization of high-frequency electromagnetic waves, notably THz waves renowned for their abundant spectrum resources, emerges as a compelling alternative for analog logic modulation applications. Leveraging the exceptional modulating characteristics of metasurfaces in the THz wave domain, hybrid metasurfaces incorporating vanadium dioxide (VO2) (64), ferroelectric polymers (65), and MEMS have exhibited multiple output states stemming from hysteretic behavior (66), thus demonstrating the realization of logic function. However, the existing logic metasurface is limited to performing either static or slow modulation of THz waves, meaning they lack the capability to process high-speed modulation signal. These metasurfaces face challenges associated with mechanical hysteresis and heat accumulation, rendering them unsuitable for meeting the application scenarios of high-speed modulation. Here, we demonstrate a dual-channel gate-controlled 2DEG metasurface that enables high-speed logical modulation of THz waves. By combining the resonant modes dominated by the 2DEG carrier concentration distribution in the dual channels controlled by the input signal, the metasurface responds to the incident THz wave with distinct output spectrum characteristics, exhibiting a multivalued relationship between the input and output. By appropriately designing the correspondence between inputs and outputs according to the logic truth table, we can customize a series of basic logic gates (NAND, NOR, XOR, XNOR, and OR) at different frequencies in the THz regime. Therefore, a space secure communication system based on such a device can have different keys at different frequencies and the attacker has to access all the keys to decipher the communication, which will greatly increase the security coefficient. Notably, our approach leverages the stability of electron transport, enabling nonvolatile and high-speed modulation while effectively circumventing issues of rigidity and thermal degradation inherent in conventional THz logical strategies. Our experimental results demonstrate the successful realization of the logic-gate platform and a high-speed logical modulation of THz waves with an execution time of 250 ps. RESULTS Design of the metasurface and operating principle The THz metasurface featuring high-speed logic functions, as depicted in Fig. 1, comprises a metal microstructure, semiconductor material, and substrate. The unit period of our designed metasurface is 300 μm × 220 μm, with the SiC substrate being 140 μm thick and possessing a dielectric constant of 9.8. In the unit structure, the metal microstructure consists of two identical I-structures in series, with all transverse metals arranged at equal spacing. The metal structure has a line width of 4 μm and a thickness of 300 nm. High electron mobility transistor (HEMT) is embedded in the middle of the I-structures. The metal wire in the middle of the I-structure acts as the gate, while the metal wires at each end function as the source and drain, respectively. The gate length, gate width, and source-drain spacing are 2, 10, and 6 μm, respectively. The specific material composition of the HEMT region in the reported THz metasurface is depicted in Fig. 1. Beneath the gate lies the Al0.27Ga0.73N/GaN heterojunction, forming a Schottky contact with the gate, serving as an electrically controlled switch. The ends of the heterostructure are connected to the metal structure via ohmic contact plates to form the source and drain of the HEMT. Spontaneous and piezoelectric polarization lead to the formation of a 3-nm 2DEG at the heterojunction interface. At room temperature, the 2DEG exhibits a carrier concentration Ns of 1.13 × 1013 cm−2 and an electron mobility of 2220 cm/(V·s). The nanostructured 2DEG element is inserted into the gap of the metal resonant structure as a channel switch to form a dynamically tunable metasurface (refer to the “Simulation Model” section of the Supplementary Materials for a detailed model and parameters). There are two external voltage input circuits that provide different control signals for the two HEMTs within the metasurface unit, as shown in Fig. 1. By adjusting the voltages applied to input 1 and input 2, we can manipulate the carrier concentration in these two electron channels. This control over carrier concentration allows us to govern the distribution of surface electrons and dictate the resonance mode of the metasurface. Schematic diagram of the logical modulations based on the 2DEG metasurface. The metasurface is composed of metal microstructures nested with 2DEG, of which the 2DEG carrier concentration can be adjusted by changing the gate voltage to induce different working modes. With different input signal combinations, the metasurface can form asymmetric and symmetric states, and can form multivalued relationships between input and output, realizing the AND, OR, XOR, XNOR, NOR, and NAND logic functions in the THz band. In the absence of a control voltage for the initial stage, the 2DEG carrier concentration remains high in both channels, ensuring robust electrical connections between both sides of the channel due to widespread distribution of free electrons within the electron channel. When the x-polarization THz wave is incident, a small number of free electrons accumulate around the gap in the metal structure, resulting in the formation of a weak electric resonance mode, referred to as the “0” state. Progressively increasing the input signal voltage can deplete the free electrons in the 2DEG, leading to the cutoff of the electronic channel. Consequently, the incident THz wave drives the free electrons in the metal structure to accumulate at both ends of the gap, generating a strong electric resonance mode termed the “1” state. Binary inputs for basic logical modulations are obtained by combining the input signals from two HEMTs in the unit, resulting in states such as (00), (01), (10), and (11). The logic output corresponds to the interference intensity of the THz wave transmitted through the metasurface, which can exhibit either high transmission (1) or low transmission (0), depending on the distributions of electrons and the resonance modes on the metasurface. For instance, state (11) signifies that both input 1 and input 2 are high voltage input signals, indicating that both HEMTs in the unit exhibit strong electric resonance modes. To aid in clarity, we classify states with the same resonance modes (00 or 11) in the two HEMTs of the unit as symmetric states, while states with different resonance modes (01 or 10) were classified as asymmetric states. The collective resonance mode, determined by the two input signals, imparts distinct spectral characteristics to the metasurface when subjected to the incident THz wave, resulting in intriguing effects such as hysteresis-like behavior and a multivalue correspondence between inputs and outputs. Through a careful comparison of logic truth tables and the appropriate design of input-output relationships, a range of THz basic logic gates, including NAND, NOR, XOR, XNOR, and OR, can be tailored. The dual 2DEG channel manipulation strategy enhances the dynamic reconstruction of THz spectral responses, introducing a multivalued correspondence between input and output that enables logical modulations of THz waves. Furthermore, this approach capitalizes on the inherent features of electron transport, which can be reliably controlled at a high speed over an extended duration. As a result, it can effectively circumvent the common problems in traditional THz logic modulation strategies related to the inability to perform high-speed dynamic reconfiguration due to rigidity and thermal degradation. Transition mechanism of asymmetric and symmetric states To investigate the transition mechanism between symmetric and asymmetric states, we examined the spectral response of the metasurface through both simulations and experiments. For the symmetric state (00) excitation, as depicted in Fig. 2A, no control voltage is applied and a high concentration of electrons in the electronic channel is present and establishes conductive interconnection among the units. The dominant resonant mode of the metasurface corresponds to an overall weak dipole resonance, characterized by a notably lower resonant frequency than the THz range. Consequently, as shown in Fig. 2D, only a weak surface current is induced in the perpendicular metallic arms within the THz frequency band, resulting in a weak electric resonance mode. Upon the simultaneous application of high voltages to both inputs, representing the symmetrical state (11), the depletion of free electrons in the 2DEG channels leads to the partitioning of the overall interconnected structure into independent dipole structures. As illustrated in Fig. 2 (B and E), this configuration induces a strong surface current in the perpendicularly aligned metallic arms, accompanied by the accumulation of numerous electrons at the gaps, thus generating a strong electric resonance mode. When a high voltage is exclusively applied to one of the two inputs, corresponding to the spatially consistent asymmetric states (01 or 10), the resonance modes from the previous symmetrical state combine. This results in the emergence of a mixed resonance mode featuring both strong and weak electrical resonances, as depicted in Fig. 2 (C and F). By closely analyzing these spectral characteristics and transition processes, we gain insight into the dynamic behavior of the metasurface and its ability to adapt its resonance modes based on the applied voltages and symmetry configurations. Electron and field distribution of metasurface and response spectrum to THz wave in simulation and experiment. (A) The surface current distribution of the 00 symmetric state. (B) The surface current distribution of the 11 symmetric state. (C) The surface current distribution of the 01/10 asymmetric state. (D) The electric field intensity distribution corresponding to the 00 symmetric state. (E) The electric field intensity distribution corresponding to the 11 symmetric state. (F) The electric field intensity distribution corresponding to the 01/10 asymmetric state. (G to I) Simulated transmission spectra for the symmetric-symmetric state (00-11), asymmetric-symmetric state (01/10-11), and symmetric-asymmetric state (00-01) at various bias voltages. (J to L) Measured transmission spectra for the symmetric-symmetric state (00-11), asymmetric-symmetric state (01/10-11), and symmetric-asymmetric state (00-01) under various bias voltages. To provide a comprehensive understanding of the state transitions, we further investigate various transitions between these state combinations, such as symmetric to symmetric state (00-11), asymmetric to symmetric state (01/10-11), and symmetric to asymmetric state (00-01/10). The transmission spectrum during the 00-11 symmetric state transition is depicted in Fig. 2G. As the carrier concentration in the 2DEG channels controlled by input 1 and input 2 decreases, the induction of a short dipole resonance becomes evident. The strongest resonance occurs at 330 GHz when the 2DEG is completely depleted. Notably, the presence of standing waves causes the transmission intensity of 00 symmetric states to gradually increase with frequency within the operational frequency band. During the transition from 00 symmetric states to 11 symmetric states, there is a rising edge of the standing wave in this region, resulting in a nonmonotonic increase in the transmission intensity of THz waves below 300 GHz. This intriguing behavior signifies that the corresponding output signal of the 00 input signal can be greater than, less than, or equal to the corresponding output signal of the 11 input signal within the observed frequency band. Furthermore, this transition process involves amplitude modulation, with a deeper modulation depth indicating higher transition efficiency. We introduce the modulation efficiency ηαβ−α*β*=(Tαβ−Tα*β*)/Tαβ, where α,β,α*,β*∈(0,1) and Tαβ is the transmission coefficient of THz wave in the αβ state, characterizing the transition performance. The modulation efficiency for the symmetric-symmetric state (00-11) transition is 76%. Next, the transmission spectrum during the 01 asymmetric to 11 symmetric state transition is shown in Fig. 2H. Here, as the carrier concentration remains low in the 2DEG channels controlled by input 2, the gradual decrease in carrier concentration in the 2DEG channels controlled by input 1 leads to the transformation of the metasurface state from the 01 asymmetric state to the 11 symmetric state. Notably, the 11 symmetric state has two 2DEG channels with low carrier concentrations, resulting in the breaking of the resonant structure at the gap and a reduction in electric length, leading to a blue shift in the resonant frequency from 306 to 330 GHz. This blue shift is accompanied by changes in the transmission intensity, and the modulation efficiency is measured to be 69%. Similarly, the transition from the symmetric to asymmetric state (00-01) exhibits comparable spectral behavior, as depicted in Fig. 2I, with a modulation efficiency of 45%. In addition, we experimentally validate the aforementioned state transitions by measuring the spectral responses of the metasurface using a vector network analyzer (refer to the “Spectrum and logic modulation experiment with DC input signals” section of the Supplementary Materials). The measured results are presented in Fig. 2 (J to L). During the symmetric-symmetric state (00-11) transition process, the strongest resonance occurs at 330 GHz, with a maximum modulation efficiency of 73%. The transition from the asymmetric to symmetric state (01-11) is displayed in Fig. 2K, exhibiting a blue shift in resonance from 310 to 330 GHz, with a maximum modulation efficiency of 68%. The symmetric-asymmetric state (00-01) transition demonstrates similar spectral behavior, with a maximum modulation efficiency of 30%. From the above results, it can be seen that each kind of state transition process corresponds to a specific spectrum response. Such a dual gate–controlled metasurface, with its expanded electronic distribution states compared to single-gated metasurfaces, notably enhances the diversity of transmission spectrum response and can serve as an approach for the implementation of multiple logic functions. Establishment of logic functions for THz waves Next, we establish the logical modulations of THz waves by analyzing the transmission spectra during the transition between the symmetric and asymmetric states. Our analysis involves the implementation of gate voltage modulation sequences, namely, V1 and V2, as input parameters. The electronic asymmetry of the metasurface is quantified by the differential voltage, δV, which is given by the absolute difference between V1 and V2. Figure 3A illustrates the variation curves of transmissions at a frequency of 303 GHz for increasing and decreasing δV. Notably, these transmission spectra exhibit two distinct paths that form a closed tropic with respect to δV. The observed transmission behavior closely resembles the hysteresis observed in various phase transition materials, like VO2. As observed in other hysteretic systems, this characteristic enables the establishment of an XNOR logical modulation. The transmission states of the metasurface, determined by the voltages of input 1 (V1) and input 2 (V2), are represented by logic binary digits. Specifically, the “down-path” of transmission corresponds to the binary numbers “00” to “01/10” (where V1 is applied to input 1 and input 2 is fixed to 0 V), while the “up-path” corresponds to the binary numbers “01/10” to “11” (where V2 is applied to input 2 and input 1 is fixed to −25 V). In this context, the True state (high transmission) and False state (low transmission) of the transmission amplitudes are denoted by the binary digits “1” and “0,” respectively. We observe that for input states “00” or “11,” the metasurface exhibits a high transmission characteristic for THz waves, corresponding to an output of “1.” Conversely, when the input states are “01” or “10,” the metasurface demonstrates a low transmission characteristic, resulting in an output of “0.” This behavior aligns with the logical modulation of an XNOR gate. Effect of voltage (concentration) difference on transmission coefficient. (A) Measured transmissions for different voltage difference (δV) at 303 GHz, where the black curves represent increasing δV applied to the structure (applied V1 on input 1, V2 = 0 on input 2), and the red curves represent reducing δV applied to the structure (applied V2 on input 2, V1 = −25 V on input 1). (B) Measured transmissions for different voltage differences (δV) at 330 GHz. (C) Simulated transmission at 330 GHz as a function of Ns1 and Ns2. (D) The corresponding measured transmission as a function of the input voltages. The arrows indicate the state transitions of (00, 01, 10, 11). To explore the impact of the operating frequency, we shift it to 330 GHz and analyze the changes in the transmission curves as δV increases or decreases (Fig. 3B). The transmission signal continues to exhibit distinct values with varying δV. Specifically, as δV increases (the black curve), the transmission coefficient experiences a slight decrease, while a notable decrease is observed as δV decreases (the red curve). Exploiting this unique behavior, we establish a logical implementation of the NAND gate. Figure 3 (C and D) shows the transmission properties at 330 GHz for the simulated and experimental states (00, 01, 10, 11), respectively. The input state “11” corresponds to the False output state (low transmission), while the input states “00,” “01,” and “10” correspond to the True output state (high transmission). This correspondence aligns precisely with the truth table of the NAND gate. Our findings confirm that the state transition process between symmetric and asymmetric states induces distinguishable effects at different operating frequencies, leading to distinct transmission spectral responses. Drawing on the aforementioned analysis, we leverage the distinguishable transmission spectral responses to establish a variety of logical modulations, including AND, OR, XOR, XNOR, NAND, and NOR gates, as depicted in Fig. 4. The experimental results demonstrate a consistent relationship between input and output signals, precisely corresponding to the truth table entries for each logic gate. Let us consider the NAND gate as an example. The left graph in Fig. 4A illustrates the frequency variation curve of the transmission power for each logical modulation state. In the middle graph, we observe the input and output signals alongside their corresponding truth table entries. Specifically, when both inputs are at high levels (1), the output remains at a low level (0). Conversely, for all other input combinations, the outputs are at high levels (1). To assess the performance of each logical modulation, we introduce the performance factor denoted as PP=(H¯−L¯)/H¯−ΔH−ΔL(1)ΔH=∑i=1m∣Hi−H¯∣/m(2)ΔL=∑j=1n∣Lj−L¯∣/n(3) The correspondences between the static experimental results and the logical relationships. (A) NAND, (B) NOR, (C) XNOR, (D) AND, (E) OR, and (F) XOR, where the left graphs are the static experimental results, the middle graphs are the corresponding logic gate truth tables and input and output signals, and the right graphs show the performance factors of the logic gates, and the red dashed line in the figure is the peak value of P. Here, H¯ and L¯ are the average values of the expected high values and low values in the logical modulations, respectively, and Hi and Lj are the measured high values and low values, respectively. m and n are the number of expected high values, respectively. The values of m and n satisfy the condition m+n=22. A positive P value indicates consistency with the expected logic, while a negative P value suggests inconsistency. The higher the P value, the higher the consistency with the expected logic corresponding to better performance. As illustrated on the right side of Fig. 4A, the P value of the NAND gate reaches its peak value of 0.82 at 332 GHz, representing the optimal static logic performance at this frequency. The experimental results for the other logical modulations are presented in Fig. 4 (B to F), where the calculation and analysis methods follow a similar approach to that of the NAND gate and are not reiterated here. Experiments for high-speed logical modulations of THz waves In our aforementioned experiments, we have successfully demonstrated the static logical modulations of THz waves on the proposed 2DEG metasurface by applying direct current (DC) voltage to all gate voltage signals. Given the prevalent use of high-speed digital signals in applications such as space optical computing and secure communications, we sought to further investigate the capabilities of the metasurface for high-speed logical modulations. To achieve this, we developed an experimental platform dedicated to measuring the logical modulation speed (see details in Materials and Methods and fig. S3). Our experimental setup encountered limitations due to the unavailability of an arbitrary-waveform generator with dual-channel outputs, which are typically required to provide precise high and low levels to the input 1 and input 2 ports of the metasurface. Nonetheless, we devised a clever alternative approach. By using two radio frequency signal sources, we generated distinct frequencies of sinusoidal waves that served as the input signals (input 1 and input 2) after applying an appropriate dc offset. In this configuration, the positive region of the sinusoidal signal denoted the high level (1), while the negative region represented the low level (0). Moreover, we intentionally set the signal frequency of input 2 to be twice that of input 1, allowing the input signal to encompass all four signal combinations: 00, 01, 10, and 11. To provide a demonstration, we specifically configured the signal frequencies of input 1 and input 2 to be 100 and 200 MHz, respectively. Figure 5 provides a visual representation of our experimental verification of the high-speed logical modulations, focusing on the AND and XNOR gates. At a carrier frequency of 286 GHz, input 1 and input 2 corresponded to sinusoidal wave signals of 100 and 200 MHz, respectively, with a peak-to-peak voltage of 12.6 V. As shown in Fig. 5A, the input 1 sequence is 0011, the input 2 sequence is 0101, and the output waveform sequence is 0001, successfully executing the AND gate process. Conversely, for all other input combinations, the output signal consistently maintains a low level (0). In addition, we explored the XNOR gate logic function at a carrier frequency of 298 GHz. Input 1 and input 2 preserved their sinusoidal waveforms of 100 and 200 MHz, respectively, with a peak-to-peak voltage falling to 9 V. In Fig. 5B, the input signal waveform remained unchanged, and the resulting output waveform sequence was 1001. This result effectively exemplifies the logical characteristics of an XNOR gate, where the output is a high level (1) when the two input signals are in the same state, while all other input combinations consistently yield a low level (0). Dynamic logic function experiment and modulation speed experiment. (A) Experimental verifications of the dynamic logic functions of the AND gate. The upper and middle graphs are the input 1 and input 2 signals, respectively, which are fed with 100- and 200-MHz sinusoidal signals, and the lower graphs are the output signals. The red area represents high level (1), and the blue area represents low level (0). (B) Experimental verifications of the dynamic logic functions of the XNOR gate. (C) Examples of the logical encryption, with AND encryption corresponding to 286 GHz on the left and logical XNOR encryption corresponding to 298 GHz on the right. (D) The modulation speed tests of the 11-symmetric state, in which the upper graph is the waveform at 1 GHz modulation speed, and the lower graph is the waveform at 2 GHz modulation speed. (E) Photograph of the sample. In the conducted experiments, we have achieved different logical modulation for THz waves at different frequencies, which means that we can perform different high-speed logical encryption on communication signals at different carrier frequencies. Illustrated in Fig. 5C, where input 1 represents the plaintext signal: 001100110011, and input 2 symbolizes the key signal: 010101010101, the resultant THz wave undergoes logical modulation to produce the ciphertext signal. At a communication carrier frequency of 286 GHz, the ciphertext signal manifests as 000100010001, while at 298 GHz, it transforms into 100110011001. The identical plaintext and key signals yield distinct ciphertexts at different operational frequencies. This unique logical phenomenon, in conjunction with frequency-hopping communication systems, holds the promise of fortifying secure communication channels. Noteworthy is the parity in length between the plaintext and ciphertext signals, signifying a one-to-one correspondence between plaintext and encryption key symbols. This encryption paradigm poses a formidable challenge for decryption, as evidenced by the exponential increase in possible decryption keys relative to the symbol length of the ciphertext sequence. With a staggering generation rate of 200 million symbols per second, the astronomical number of potential keys renders exhaustive decryption virtually insurmountable. Considering the potential issue of signal asynchrony at high speeds, we only conducted a high-speed logical modulation demonstration at a frequency of 200 MHz. Nonetheless, this represents the highest dynamic logical modulation speed achieved thus far for THz waves. However, it should be noted that signal synchronization remains a complex engineering challenge that needs to be addressed in future technical endeavors to further enhance the logical modulation speed. To explore the potential of the metasurface for achieving high logical modulation speeds, we implemented an experimental setup to measure its modulation speed using synchronous signals (refer to fig. S4 for a schematic diagram and measurement system details). In this setup, both input 1 and input 2 signals were fed separately from the same radio frequency signal source through a power divider, which aimed to minimize the impact of signal asynchrony. The measurement results, depicted in Fig. 5D, indicate the output waveform under synchronous input signals. The left graph corresponds to a 1-GHz modulation speed, equivalent to a timescale of 500 ps, while the right graph corresponds to a 2-GHz modulation speed, corresponding to a timescale of 250 ps. Notably, the peak-to-peak voltage of the output waveform maintains a high value, and the waveform exhibits a normal sinusoidal pattern. Our experimental findings provide verification that the proposed metasurface can support high-speed modulations of at least 250 ps using the synchronous signal measurement scheme, thereby showcasing the potential for achieving even higher-speed logical modulations. Figure 5E visually presents the metasurface sample, where the source and drain are connected to the ground, the gate is subjected to a negative voltage, and the two channels of input signals are loaded into the corresponding HEMT via subminiature version A (SMA) connections to achieve the desired modulation effects. DISCUSSION In summary, we have successfully demonstrated the capability of a dual channel–gated 2DEG metasurface to perform high-speed logical modulations on THz waves. The integration of a dual gate–controlled 2DEG within the netlike metallic structure enables precise control over electron transport states. This results in symmetric or asymmetric distributions of electrons on the metasurface, leading to enhanced diversity in the transmission spectra. Leveraging these spectral characteristics, we observed intriguing phenomena such as hysteresis-like effects and other multivalue correspondences between inputs and outputs. Exploiting these phenomena, we implement common logical modulations at different frequencies in our experiment, including AND, OR, NAND, NOR, XNOR, and XOR. In the field of space security communication, it has different keys at different frequency points, which greatly increases the security of space communication. Furthermore, we developed a dedicated experimental platform to measure the speed of logical modulations. By examining the AND and XNOR gates as specific examples, our experiments achieved high-speed logical modulations with a remarkable response time of 2.5 ns. Moreover, we uncovered the potential for even faster logical modulation speeds, measuring a remarkable 250 ps. These findings establish a unique platform for performing high-speed logic modulations with free-space THz waves, which holds promise for applications in optoelectronic integrated logic devices and high-speed secure communication systems. MATERIALS AND METHODS Simulation model All numerical simulations were carried out using the commercial software, CST Microwave Studio, and the transmission amplitudes were obtained with its Frequency-Domain Solver with periodic boundary conditions in the x and y directions and open boundary conditions in the z direction. In addition, the structural composition and material properties of our metasurface model embedded with GaN-HEMT are detailed in the Supplementary Materials. To analyze the electron transport characteristics of 2DEG in GaN HEMT, the Drude model in CST is adopted, and the change in carrier concentration is simulated by changing the plasma frequency in the model. Processing and assembly A series of standard lithography processes are used to process the metasurface sample. First, a 25-nm AlGaN/1.5-μm GaN heterostructure film is grown on the 140-μm SiC substrate by metal-organic chemical vapor deposition, and then the standard photolithography and overetching processes are performed on the AlGaN film to obtain the active region (3-nm-thick 2DEG nanostructures). Second, through processes such as photolithography, electron beam evaporation, and liftoff, composite metal layers are deposited in an orderly manner on both ends of the active region as the source and drain electrodes, followed by rapid annealing to form an ohmic contact with 2DEG. After similar photolithography, e-beam evaporation, and liftoff processes, a 300-nm gold layer and a 20-nm nickel adhesion layer were deposited on the GaN layer to form the metasurface structure. Last, the processed metasurface is adhered to the designed printed circuit board plate with conductive adhesive, and the electrical connection is achieved by gold wire bonding. SMA is then welded to the specified position. Logical modulation experiments of THz waves with dc input signals We use a vector network analyzer to measure the metasurface. The measured frequency ranges from 0.26 to 0.4 THz. The input signals are fed by the dc voltage source through SMA, and the voltage range is 0 to −25 V. Before the measurement, the empty substrate without metasurface is used as the normalized reference to eliminate the space loss introduced in the environment. A schematic diagram and details of the measurement system are presented in the Supplementary Materials. High-speed experiments of THz waves We use the vector network analyzer as the THz signal transmitter and the THz detector as the receiver. The high-speed sinusoidal wave signals provided by the two radio frequency signal sources are used as two input signals of the metasurface. The details of the experiments are given in the Supplementary Materials.