## Introduction

The terahertz (THz) region (typically defined between 0.1 and 10 THz) has proven to be critical for numerous applications in both fundamental science and industry, including communications1,2,3, sensing4, non-invasive imaging5, nanoscopy4,6,7 and ultrafast classical and quantum systems. In particular, detecting THz radiation is central to spectroscopy since the THz range hosts low-energy material resonances. For example, THz radiation plays an ever-increasing role in security and diagnostic medicine, due to its non-invasive, non-ionizing8 ability to distinguish between different types of materials with higher resolution than microwaves: metals, water, and various organic compounds. On the other hand, THz waves can be utilized to control elementary excitations such as electrons9, spins10, molecular motion11 and photons12 on shorter timescales than microwaves in miniaturized transducers that link THz systems with other systems. This speed advantage is crucial for the exploration of novel materials and their ultimate limits, such as low-dimensional, magnetic13, Pockels14 or superconducting15 materials, e.g., before decoherence times. Finally, in communications, THz wireless links may leverage the possibility to employ narrow-angle, directional beams16 as an information channel instead of wide-angle broadcasting that is nowadays the standard in microwaves.

The realization of these applications is contingent on the ability to control the temporal waveform of THz fields on sub-THz-cycle scales. Thus, providing means for their synthesis at will is of high importance. As a result, the next generation of THz systems requires custom-tailoring various features of the electromagnetic waves, including their amplitude, frequency and phase down to a single cycle of oscillation. Currently, the THz range is generally challenging to access both using optical and electronic technologies. Notable progress in the miniaturization of THz devices has been made in the area of quantum cascade lasers that now operate without the need for cryogenic gases17,18; however, their emission is in the upper range of the THz domain (1.5–100 THz). Furthermore, pulsed emission is generally tricky directly from a THz quantum cascade laser, but active mode-locking has been demonstrated19. High-frequency spintronic emitters20 or optical Kerr combs21,22 have generated stable THz radiation but with limited control over the frequency of the output wave.

A much more widely adopted method for the generation and detection of THz is to utilize second-order (χ(2)) nonlinear processes driven by compact and high-power ultrafast lasers in the near-infrared region. Optical rectification is a generation mechanism for THz radiation that exhibits many useful features and in particular has been extensively used for the generation of high electric field strengths. In this χ(2) process, an intense laser beam generates a nonlinear polarization P(2)(t) following its intensity envelope I0(t). If the incident optical beam is a femtosecond pulse, the generated field can be a broadband THz pulse that contains few cycles23,24. Lithium niobate (LN)24,25,26,27 has always been an excellent choice of material for THz generation, owing to its high nonlinear coefficient of d33 = 27 pmV−1 28, and low optical losses in the near-infrared. LN’s high optical power handling is crucial for optical rectification since the power of the generated THz signal depends quadratically on the optical pump power.

To date, the THz generation schemes through optical rectification have been largely limited to bulk systems. In this area, several works stand out that achieve custom-tailoring of terahertz radiation, by using quasi-phase-matched crystals29,30,31,32,33 and arbitrarily poled crystals34 to tailor the frequency and amplitude of terahertz radiation, or polarization-shaped pump pulses to tailor the polarization of the emitted terahertz radiation35.

The above bulk generation schemes are well suited for high-field generation but have several shortcomings. First, further custom-tailoring of the emission is achieved either through pre-conditioning the pump pulse preceding the nonlinear crystal (e.g., through complex pump pulse shaping36,37, external switches38 or multi-pulse setups39) or post-conditioning of a broadband terahertz pulse after its emission into free space (by diffractive surfaces40 or switches41). Second, the phase-matching properties inside the bulk crystals are fixed by the refractive index mismatch at THz and pumping frequencies in bulk crystals and cannot be controlled. This fact results in the emission of Cherenkov radiation at a fixed angle in bulk LN. Third, bulk LN crystals need to be pumped close to their surface to avoid the high absorption of THz radiation in this material, but ensuring minimal distance to the surface is challenging in bulk crystals that provide no fine-tuned control over the exact propagation of the pumping field. Finally, achieving sub-THz-cycle precision of various degrees of freedom in the waveform design is challenging as their high number would inevitably increase the complexity of bulk systems. Early work recognized that miniaturization may provide solutions to these issues, such as, e.g., ion slicing bulk crystals into thinner slabs42. With advances in nano-structuring TFLN23, few theoretical proposals to generate THz radiation appeared recently43, along with experimental proposals of using topological confinement in laser-written LN slabs44.

In this work, we depart from the generation in bulk crystals and instead demonstrate chip-based generation of terahertz transients inside low-loss integrated photonic circuits in lithium niobate. We show that this implementation circumvents shortcomings of bulk systems and additionally provides uniquely versatile control over the temporal, spectral, phase, amplitude, and farfield characteristics of the generated waveform by design of chip-scale components alone (a detailed comparison of our work with various former approaches to generate arbitrary THz waveforms is provided in Supplementary Note 6). We exploit several unique features of TFLN platform that cannot at all, or only hardly, be realized in bulk crystals. First, we employ rib waveguides that allow THz generation within a few hundred of nanometers close to the surface, minimizing its absorption. Second, our low-loss fabrication capabilities allow us to connect several basic components of this platform such as grating couplers, y-splitters, and combiners for the proposed arbitrary waveform synthesis on one single chip. Paired with the wide transmission window of LN and its high power resilience, this allows us to guide pump pulses of energy of 100 pJ through complex device architectures without significant losses or denaturation of the nonlinear material. Third, the monolithic patterning of THz antennas around the waveguides provides the missing ability to not only control the spectral and temporal properties of the emitted THz radiation, but also its emission pattern into the farfield by the design of the antenna alone. Finally, the ability to choose the waveguide dimensions allows for precise control over the effective mode index, the group index, as well as the field confinement of both the pump pulses and the terahertz field as they interact in the antenna region.

## Results

### Design concept

In our THz emission scheme, single mode waveguides on x-cut TFLN are used to guide sub-picosecond laser pulses of intensity I0(t) at a central wavelength of 1560 nm to the gap of THz gold bow-tie antennas as depicted in Fig. 1 and in more detail in insets I and II. The ultrashort pump pulses are polarized along the [001]-axis of LN lying the in the thin-film plane. Due to the high nonlinear tensor element d33 in LN the propagating pulses induce a polarization P(2)(t) (inset II) that generates a local electric field amplitude dElocal at all positions along the antenna gap:

$${{{{{{{\rm{d}}}}}}}}{E}_{{{{{{{{\rm{local}}}}}}}}}({{\Omega }},y)={C}_{{{{{{{{\rm{gap}}}}}}}}}\cdot {I}_{0}({{\Omega }})\cdot {{\Omega }}\cdot \exp \left(-i\frac{{n}_{{{{{{{{\rm{g}}}}}}}}}{{\Omega }}}{c}y\right){{{{{{{\rm{d}}}}}}}}y,$$
(1)

which sums up to an overall field $${E}_{{{{{{{{\rm{OR}}}}}}}}}({{\Omega }})=\int\nolimits_{0}^{{l}_{{{{{{{{\rm{gap}}}}}}}}}}{{{{{{{\rm{d}}}}}}}}{E}_{{{{{{{{\rm{local}}}}}}}}}({{\Omega }},y)$$ acting as a source of THz radiation (Fig. 1, inset III, detailed deviation in Supplementary Note 2A). Here Cgap is a constant that depends on the material properties, Ω = 2πfTHz the generated angular THz frequency, I0(Ω) the Fourier transformation of the optical intensity envelope I0(t) and dy is the length element along the pump propagation direction (derivation in Supplementary Note 2B). At low frequencies, the THz field profile is independent of the pulse length, therefore its amplitude increases linearly with frequency (compare Supplementary Fig. 4). In the antenna’s gap, the portion of the THz field matching the resonance, described by a responsivity function R(Ω), is outcoupled from the waveguide into free space with a dipolar emission pattern (Fig. 1, inset III). The total outcoupled field is given by:

$${E}_{{{{{{{{\rm{THz}}}}}}}}}({{\Omega }})={E}_{{{{{{{{\rm{OR}}}}}}}}}({{\Omega }})\cdot R({{\Omega }}).$$
(2)

The resulting temporal waveform depends on the center frequency and linewidth of the antenna as well as the spectral and temporal characteristics of the pumping pulse. In TFLN platform, we can safely ignore THz absorption in LN due to the small propagation length of the emitted wave inside the 600 nm thick waveguide (see inset V and supporting transmission characterization of the bulk substrate in Supplementary Note 1C). Furthermore, an antenna gap of width wg = 3 μm supports efficient generation along the gap while maintaining low absorption losses of the pump pulse caused by antenna electrodes (see Supplementary Note 1A, B). The phase delay associated with each position along the antenna gap where the terahertz is generated is linked to the group velocity of the optical pulse $${v}_{{{{{{{{\rm{g}}}}}}}}}=\frac{c}{{n}_{{{{{{{{\rm{g}}}}}}}}}}$$ (simulation providing ng in Supplementary Note 1B). In conclusion, the effective generation length can be written as:

$${l}_{{{{{{{{\rm{eff}}}}}}}}}({{\Omega }})=\left | \int\nolimits_{0}^{{l}_{{{{{{{{\rm{gap}}}}}}}}}}\exp \left(-i\frac{{n}_{{{{{{{{\rm{g}}}}}}}}}{{\Omega }}}{c}y\right){{{{{{{\rm{d}}}}}}}}y\right |={l}_{{{{{{{{\rm{gap}}}}}}}}}\cdot \left|\,{{{{{{{\rm{sinc}}}}}}}}\left(\frac{{n}_{{{{{{{{\rm{g}}}}}}}}}{{\Omega }}}{2c}{l}_{{{{{{{{\rm{gap}}}}}}}}}\right)\right | .$$
(3)

lgap corresponds in the present study to a fraction of the THz field period (hence $${l}_{{{{{{{{\rm{gap}}}}}}}}} < \frac{2 \pi c}{{n}_{{{{{{{{\rm{g}}}}}}}}}{{\Omega }}}$$) for the antenna designs investigated (detailed derivation in Supplementary Note 2B). We define the coherence length as $${l}_{{{{{{{{\rm{coh}}}}}}}}}=\frac{c}{4{n}_{{{{{{{{\rm{g}}}}}}}}}\,{f}_{{{{{{{{\rm{THz}}}}}}}}}}$$.

### Distributed pulse phase matching

The low near-infrared losses of the TFLN platform45 allow the pumping of several antennas using a single pulse. This provides an additional knob to tailor the THz emission, besides the individual antenna design parameters. We introduce a parallel and a serial architecture where one pulse is used to pump multiple devices (Fig. 1, bottom devices). In this scheme, the resulting THz waveform depends strictly on the arrangement of antennas on-chip, their geometric distances and the group delay of the pumping pulses. This dependency can be summarized as a phase matching mechanism—to which we refer as distributed pulse phase matching—that is conceptually related to phased arrays with few-cycle pulses as the interfering fields (see Supplementary Note 2C). Distributed pulse phase matching is critical for the synthesis of arbitrary electric fields (the theoretical formalism is given in Supplementary Note 2D). In the parallel block, this enables constructive or destructive interference of THz pulses (inset IV), if antennas with identical parameters are employed. In the serial case, once the group delay τg of the pumping pulse between two serial antennas matches their resonant period TTHz (and hence $${\tau }_{{{{{{{{\rm{g}}}}}}}}}=\frac{1}{{f}_{{{{{{{{\rm{THz}}}}}}}}}}={T}_{{{{{{{{\rm{THz}}}}}}}}}$$), the generated pulses interfere constructively out-of-plane and increase the temporal coherence of the generated radiation (inset VI). Furthermore, the in-plane arrangement of antennas impacts the three-dimensional pattern of the emission, e.g., by increasing the aperture of generated THz light.

### Experimental investigation

Here, we experimentally tailor the THz radiation by designing chip-scale structures and generating THz waveforms with different properties enabled by distributed pulse phase matching. We employ a dual-wavelength THz time-domain setup to measure the electric field emitted by our devices on sub-THz-cycle timescales (description of setup in the Methods section “Optical setup” and Supplementary Note 5A).

First, we experimentally tailor the temporal and spectral properties as well as the amplitude of THz waveforms only by sweeping the antenna design parameters (Fig. 2, see also Supplementary Table 1). In particular, we study the impact of the antenna length Lant, and gap length lgap. lgap delimits the generation length by the geometrical dimensions of the two parallel gold bars. Lant determines the antenna resonance frequency and the temporal shape of the emitted THz fields. The measured time-trace of the THz electric field displays several rapid cycles for the shorter antenna (Lant = 57 μm) compared to the larger antenna (Lant = 200 μm) that rather emits a strong pulse with a slower cycle (Fig. 2a, b). The latter is followed by low-frequency oscillations that are characteristic of the antenna’s lower resonant frequency. The peak-to-peak electric field measures in both cases roughly 0.25 Vm−1. In the frequency domain, the initial portion of the THz pulse in Fig. 2b corresponds to a broad resonant background spanning up to 350 GHz that is typical for bow-tie antennas, whereas the lasting oscillations afterward can be associated with the resonance frequency of the antenna at 200 GHz shown in Fig. 2c (light blue line).

The measured spectra of antennas with various Lant (40–200 μm) showcase a tailorable THz emission between 180 and 680 GHz. The peak of the emission shifts toward higher frequencies for the shorter Lant (Fig. 2c). We choose lgap to correspond to only a fraction of the THz resonant frequency ($${l}_{{{{{{{{\rm{gap}}}}}}}}}=\frac{{L}_{{{{{{{{\rm{ant}}}}}}}}}}{2}$$) for all antennas. The frequency generated by optical rectification is limited by the pulse duration of the pump signal which is dispersed by the input fiber to the TFLN chip (setup described in the Methods section “Optical setup” and in detail in Supplementary Note 5A, the influence of dispersion and potential nonlinear effects inside the fiber and TFLN waveguides is discussed in Supplementary Note 3A). In combination with the lower emission efficiency of smaller bow-tie antennas the signal strength decreases for higher frequencies. Thereby our experimental results are in full agreement with finite element method simulations performed using CST Microwave studio (details in Supplementary Note 4A).

The generation length lgap influences the amplitude of the THz field through the effective generation length and must generally satisfy lgap < lcoh. We demonstrate this dependence experimentally and fix the arm length at Lant = 90 μm while sweeping lgap between 15 and 60 μm, in increments of 15 μm (Fig. 2d). The measured peak of the THz spectrum shifts toward lower frequencies for larger lgap due to different resonance frequencies (details in Supplementary Note 4B). Optical rectification efficiency increases with the generation length, as expected, since all generation lengths lgap are shorter than corresponding coherence lengths; therefore, the observed increase in the emission amplitude is not limited by phase-matching. The deviation from a quadratic increase of the intensity is well reproduced by taking into account that the resonance frequency decreases for shorter gap lengths (Fig. 2e, details about the simulations are provided in Supplementary Note 4B).

In a second experiment, we demonstrate the potential of distributed pulse phase matching to achieve full control over the temporal coherence of the emitted THz waveform at the level of single cycles of oscillation using a serial block. We largely benefit from our ultralow-loss TFLN platform. We fabricate four devices consisting of arrays of one to four antennas ($${{{\Omega }}}_{{{{{{{{\rm{res}}}}}}}}} \sim$$ 180 GHz) and record their emission in the timedomain (Fig. 3b–e). We keep lgap = 120 μm below the coherence length for a frequency of 180 GHz (lcoh = 178 μm). The pump pulse propagates through the antennas with the group velocity $${v}_{{{{{{{{\rm{g}}}}}}}}}=\frac{{c}_{0}}{{n}_{{{{{{{{\rm{g}}}}}}}}}}$$ (ng = 2.33) and triggers them consecutively. The spacing between antennas (δL) sets the time delay between the generated THz signals and thereby their resulting superposition in the farfield. Here, a δL = 710 μm between two successive antennas corresponds to a group delay that matches one single THz cycle at its peak resonance, resulting in a phase-matched emission at a normal exit angle from the chip. In this way, we generate few-cycle waveforms with an arbitrary number of oscillation cycles and modified temporal coherence, as shown in Fig. 3b–e. The device with four serial antenna exhibits a ~40% narrower linewidth of the spectral intensity around the fundamental resonance frequency (Fig. 3f). The second peak in the spectrum (n = 2, 360 GHz) corresponds to the second harmonic, since the serial block is phase matched for any nth harmonic of the fundamental THz frequency (due to a phase delay of 2πn), and thereby also for the second harmonic.

Finally, we demonstrate the ability to engineer the temporal phase characteristics (a phase-shift of π/2 and a phase flip) of a waveform on sub-THz-cycle scales by a parallel block in Fig. 4. In the frequency domain, this opens up the possibility to synthesize narrow band radiation characterized with quality factors that cannot be achieved by the single bow-tie antennas. Two pumping pulses are split to individually trigger two antennas. The difference in their arrival at the antennas determines the time delay between the two emitted THz signals. We analyze two scenarios that correspond to in-phase and out-of-phase emission of THz pulses (Fig. 4a). We trigger the two antennas simultaneously (zero relative group delay) and then with a π phase difference. We demonstrate that out-of-phase time-traces exhibit a phase shift of π/2 after half a THz cycle and a phase flip of π after one full cycle compared to the in-phase scenario (Fig. 4b, c). For the in-phase configuration, the Fourier transform of the time-domain signal reveals a bright mode around the resonance frequency (Fig. 4d). On the other hand, the phase change for the out-of-phase geometry manifests itself as a suppression in the emission leading to the creation of a dark mode in the farfield at 320 GHz (Fig. 4e). This allows us to achieve narrow-band radiation around 250 and 390 GHz, with quality factors of Q = 4.5 and Q = 9.3, respectively. Compared to the bare emission of bow-tie antennas which has a Q = 2.8, this demonstrates our ability to also synthesize narrow-band radiation with this approach.

## Discussion

In summary, we demonstrated that designer low-loss integrated circuits on TFLN platform provide unique opportunities for the synthesis of at-will THz waveforms using optical rectification. The combination of existing integrated components together with our proposed antenna scheme enables unprecedented flexibility to take control over almost all degrees of freedom of generated THz pulses from one single platform. We engineer their temporal, spectral, phase, coherence and farfield properties by various basic blocks. This could open up opportunities in the realization of high-performance and versatile THz synthesizers. Similar systems may benefit in the future from the high intrinsic electro-optic bandwidth, and fast switching of TFLN devices to offer dynamic reconfigurability of the THz emission at speeds up to Gigahertz. Engineering the antenna geometry will allow further control of the THz properties, e.g., the generation of different polarization states (corresponding simulations are provided in Supplementary Note 4C). While the current intensity of THz pulses is limited by the pump pulse energy, we provide an extensive discussion in Supplementary Note 7 that showcases possible approaches to increase the magnitude of the emitted terahertz field. By numerically solving the nonlinear Schrödinger equation, we find that the pump pulse energy may be increased up to 100 nJ without significantly suffering from self-phase modulation effects at generated frequencies below 500 GHz (Supplementary Note 3B). Also, the control  of the exact waveguide dispersion by the geometry of the waveguides may be explored to achieve pulse compression and Fourier-limited pump pulses locally in the generation region, potentially increasing the generation efficiency and the spectral bandwidth of the signal generated by optical rectification up to several THz46. The concept of distributed pulse phase matching may be further explored in combination with periodic poling47,48,49,50 and group delay engineering to synthesize arbitrary patterns of THz radiation by decomposition into temporal modes51. Here, pump pulses at other frequencies than the telecom may also be considered toward improved confinement of the probe and terahertz beam, e.g., at wavelengths of titanium sapphire lasers. Finally, we note that LN circuits are ideal candidates also for THz metrology12,52 where femtosecond pulses in the near-infrared could enable a sub-cycle resolution of the electric field of THz signals and have already proven resourceful for quantum applications by characterization of quantum states of light through their sub-cycle electric field signatures53,54. As a result, fully integrated detectors may be added to our platform. With the compatibility of chip-scale high-power lasers with TFLN platform55, hand-held, compact time-domain spectroscopy systems may be envisioned for the future56.

## Methods

### Fabrication

Devices are fabricated on 600-nm x-cut Lithium Niobate (LN) bonded on 2 μm of thermally grown oxide on a double-side polished silicon carrier. The waveguides are defined using negative-tone Hydrogen silsesquioxane (HSQ) (FOx-16) by means of Electron-beam lithography under multipass exposure (Elionix F-125). The pattern is then transferred to LN through a physical etching process using Reactive Ion Etching with Ar+ ions. The etch depth target is 300 nm to form a ridge waveguide. We further confirm the thickness of the remaining film by means of an optical profiler (Filmetrics). We used a wet chemical process to clean the resist and redeposited material after the physical etching. The chip is annealed, then cladded with 800 nm of Inductively Coupled Vapor Deposition (ICPCVD) SiO2 followed by a final annealing step57. We then defined the electrodes using a positive-tone polymethyl methacrylate (PMMA) A9 series (ELS-HS50). To avoid any misalignment, the same resist was used to etch the ICPCVD SiO2, and the metallic antennas. A bilayer of Ti/Au (15/285-nm) was deposited on our devices using Electron-beam evaporation (Denton).

### Optical setup

A novel dual-wavelength terahertz time-domain setup was developed to characterize the emission properties of our chip-scale emitters. A detailed sketch of the characterization setup is provided in Supplementary Note 5A. In short, femtosecond pulses from an erbium-doped fiber laser in the near-infrared are coupled from free space to the chip by grating couplers. The femtosecond pulses act as a pump signal for the THz emitters, and the emitted terahertz signal is collected from the back side (silicon side) of the TFLN chip. Two parabolic mirrors collimate and focus the emitted THz radiation onto a zinc telluride where electro-optic sampling enables the measurement of the entire temporal evolution of the emitted THz field. The probe signal at 780 nm originates from the same laser oscillator as the pump signal at 1560 nm, allowing for coherent detection of the emitted radiation. The 780 nm probing pulse overlaps spatially with the focus of the THz beam inside a nonlinear zinc telluride crystal. The interaction between THz and probe field results in a polarization change of the probe beam, which is measured in a balanced detection scheme.

### Disclaimer

The views, opinions and/or findings expressed are those of the author and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government.