## Introduction

Strong light–matter interactions are of extreme importance in optical applications ranging from quantum electrodynamics1 to photonic memory2 and optical information processing3. Single or multimode resonant cavities are critical components in rendering large quality factors (Q) that provide an elegant way to tailor the strength of light–matter interactions4,5. Recent interests have focused on an extra dimension as an alternative to three-dimensional cavities: temporal boundary6, which shifts the emission frequency of a microcavity and leads to nontrivial physics such as Lorentz nonreciprocity7,8,9,10 and dynamic wavefront11 for potential on-chip and free-space applications. Deeper physical insights with additional degree of freedom emerge when the photon-populated cavity has a long-lasting lifetime as well as long cycle period so that the injection of temporal boundary can be controlled in a subcycle scheme1,12. Several works have demonstrated the adiabatic frequency shift for canonical all-optical modulation2,3,13,14,15, but nonadiabatic process is challenging and requires the pump timescale shorter than the cycle of stored photons, i.e., subcycle control of light–matter interactions, where quantum squeezed states would be generated1,16. While most recent studies concentrate on the frequency shift induced by the temporal boundary of the real part of permittivity6,17, the associated imaginary part always couples to the temporal dynamics subject to the Kramers–Kronig relation18. The physics becomes nontrivial when the dynamics of imaginary part (absorption) is also considered where Q factor deteriorates due to perturbations16. However such effects are usually ignored in most previous studies3,6,17. Although absorption loss is generally adverse in most optical processes, it can be utilized as a “knob” to tune the cavity photon dynamics that is analogous to an essential “brake” of a running car. The long photon lifetimes of ultrahigh-Q cavities are clearly attractive, but it is crucial to change cavity Q dynamically with a freely controllable tradeoff between bandwidth and photon storage time, which is especially important in optical communications.

Here, we focus on transient losses and introduce the temporal loss boundary as a “photon brake” to control the lifetime of photons in a metamaterial cavity. The temporal dimension extends our capability to distinguish coupled photons by stripping one mode from the spatiospectrally inseparable modes via selective photon damping in the time domain. The loss boundary induces transition of an intrinsically coupled cavity to an uncoupled one with much less annihilation of populated photons than conventional approaches. In the process of temporal boundary injection, we observe the emergence of coherent oscillations and tone-tuned polarization that contributes to the linear frequency tuning of cavity photons. A temporal two-dipole model nicely reproduces the experimental observations by involving both transient real and imaginary parts of the cavity.

## Results

### Temporal and spectral interpretation

In time domain, a single cycle (or multicycle) probe pulse couples to the cavity modes that typically radiate with oscillations at their eigenmode frequencies and damp gradually depending on their individual Qs (Fig. 1a). Far-field signal sampling maps the output profile with most spectral energy scattered in the main pulse, and the cavity modes manifest themselves as the long-lasting oscillations (Fig. 1b). A temporal loss boundary is introduced at a certain instant that acts as the “brake” to selectively hasten the damping of photon oscillations so that the intrinsic Q of a specific cavity mode is tuned. The boundary is characterized by two freely controlled parameters: height and delay (Fig. 1c). Height determines the damping rate associated with density of injected photocarriers, and delay refers to the time difference between the onset time of signal (t0) and pump-on instant (tp) defined as tr = tp − t0 (see “Methods” for experimental implementation). Three temporal regimes are classified according to the delay: (I) tr ≤ 0; (II) 0 < tr < tm; and (III) tr ≥ tm, where tm refers to the intrinsic oscillation lifetime of cavity photons. Effects induced by tuning the barrier height will be mainly discussed in regime I which has been studied as a conventional approach with uniform cavity modulation in a plethora of works13,19,20. The temporal boundary effects in regime II show many promising features to be explored in this work. Note that only variable of delay is adjusted with height fixed in regime II. In regime III, there is no dynamic perturbation of cavity photons captured by the probe pulse, it is therefore not discussed in this work.

In frequency domain, on the other hand, cavity is assumed to support two modes with different Qs in the probed frequency range at the steady state. Cavity modes are modulated by the temporal boundary in both regime I and regime II as shown in Fig. 1d (finite difference time-domain (FDTD) simulations, see “Methods”), but with distinct consequences: both modes are modulated in regime I while only one mode is modulated in regime II. Note that the only variable in regime I is pump intensity (height of temporal boundary, characterized by conductivity of cavity material) and the only variable in regime II is pump delay (tr). The underlying mechanism is revealed by tuning the variables in the two regimes, respectively. Transmission amplitude difference (ΔT = T0 − Tp, where Tp and T0 are transmission amplitudes with perturbation and at steady state, respectively) and Q factors are shown in Fig. 1e, f by gradually tuning the variables. Synchronized modulation occurs for both modes in regime I, while asynchronized modulation is observed in regime II with a plateau of Q (unaffected) for transverse magnetic (TM) mode. Therefore, the temporal boundary in regime II is capable to selectively control properties of a certain mode of a multimode cavity that is inaccessible in regime I.

### Experimental demonstration in terahertz spectroscopy

Terahertz time-domain spectroscopy provides an excellent platform to directly investigate the dynamics of temporal boundary, and the mechanism has potential to develop devices benefiting the next-generation wireless communications for ultrafast signal processing in this key electromagnetic band21,22,23. The THz system maps the electric field amplitude in time domain via electro-optic (EO) sampling so that we can directly observe the temporal profiles of the cavity modes. In addition, our system covers a frequency range of 0.1–1.4 THz whose oscillation period lies in the picosecond range (0.7–10 ps) that is appropriate for temporal boundary injection as well as complete characterization of the cavity dynamics (Fig. 2a).

As a proof of concept, we designed the cavity using a metamaterial with constituents of silicon cylindrical pillars (Fig. 2b, also see ref. 20 for fabrication detail). The two modes are calibrated to be degenerate so that they couple and remain spatiospectrally inseparable. Experiments were carried out with the probe terahertz pulse as shown in Fig. 2a and all the frequency components lie within ~5 ps as indicated by Gabor transform (a two-dimensional Fourier transform with time and frequency dimensions, see “Methods”). After transmitting through the metamaterial, most frequency components are scattered within the first 10 ps through the main pulse of the output profile, and energy stored in the cavity re-emits upon scattering that prolongs the ringing for ~100 ps with a gradually damped amplitude (Fig. 2c). The frequency distribution of the temporal elongation is also visualized by the Gabor transform. From frequency domain, the spectrum indicates coupling of the two modes leading to a Fano lineshape as shown in Fig. 2d. The background shows corresponding eigenmode profiles with Lorentzian lineshapes, and the field distributions of a unit cell in the colored patterns indicate the transverse electric (TE) and TM mode features with z-component magnetic and electric field distributions in the z-cut plane, respectively.

An optical pump THz probe setup (OPTP, see “Methods”) was used to characterize the dynamics of photon-populated metamaterial which can be fully resolved by injecting free carriers on timescale much shorter (14 ps, Fig. 3b) than the cavity photon lifetimes. The pump consists of a 100 fs pulse centered at 800 nm above the bandgap of silicon to inject photocarriers whose permittivity is well described by the Drude model

$$\tilde{\varepsilon }(\omega ,t)=\varepsilon ^{\prime} (\omega ,t)+i\varepsilon ^{\prime\prime} (\omega ,t)={\varepsilon }_{\infty }-\frac{{\omega }_{p,t}^{2}}{{\omega }^{2}+i\omega \gamma },$$
(1)

where $$\varepsilon ^{\prime} (\omega ,t)$$ and $$\varepsilon ^{\prime\prime} (\omega ,t)$$ are frequency and time dependent real and imaginary parts of permittivity, $${\varepsilon }_{\infty }$$ is the high-frequency permittivity of silicon, and $$\gamma$$ is the electron scattering rate. The time dependent plasma frequency of photodoped silicon $${\omega }_{p,t}$$ is related to the carrier density N(t) and effective electron mass $${m}^{\ast }$$

$${\omega }_{p,t}=\sqrt{\frac{N(t){e}^{2}}{{\varepsilon }_{0}{m}^{\ast }}},$$
(2)

where $${\varepsilon }_{0}$$ is vacuum permittivity, and e is the electron charge. The pump pulse generates free carriers in the conduction band and induces a sudden change in the carrier density. The relative time (tr) of the pump and EO sampling pulse has a subpicosecond resolution controlled by an optical delay line, and density of free carriers (i.e., boundary height) was adjusted by pump fluences. Photocarriers of the intrinsic silicon reveal a nanosecond relaxation which is two orders longer than rising dynamics (Fig. 3b and see “Methods”) so that the temporal boundary could be simply modeled as a Heaviside function.

The photocarrier induced transient imaginary part of permittivity will dominate the cavity photon dynamics. As observed in regime II, after the probe pulse has injected terahertz photons into the cavity, cavity photons are suddenly perturbed with pump energy injected. As a result, we observe the modulation of the transmission spectra associated with the pump instant (Fig. 3a). The timing of brake determines the portion of cavity photons that radiate naturally and damp artificially. In addition, the sudden merging of pump causes the emitted radiation no longer a simple superposition of Lorentzian (dashed line in Fig. 3a, and also see Supplementary Materials), but a perturbed mode (TE mode) involving a series of coherent oscillations along with a linewidth broadening. The high Q TE mode is finally eliminated from the cavity (uncoupled cavity, discussed later) at tr = 4.0 ps with the low Q TM mode almost unaffected. The long-lasting Q plateau of TM mode is observed from Fig. 3d, and the modulation does not start until ~5 ps consistent with its Q of ~3 while the TE mode modulation starts from ~100 ps (with Q ~65). As a comparison, when the temporal boundary is set in regime I with various pump fluences, both modes reveal synchronized modulation and the resonant radiation is always a superposition of Lorentzian as shown in Fig. 3c, e (dashed line and see Supplementary Materials). Note that the pump is set with tr « 0 in regime I in order to exclude the effects of photocarrier rising dynamics from interfering the cavity photons.

It is then reasonable to look for the threshold where the TE mode is decoupled from TM mode in regime II. Since the two modes are degenerate, they couple and manifest a 360° phase variation contributed by the two modes as shown in Fig. 4a. When the TE mode is completely damped, the remaining single dipole can only provide a 180° phase variation, which indicates a threshold between coupled and uncoupled states of the cavities24,25. The coupling transition is visualized from the polar plot exhibiting the two coupling regimes by observing whether the spectrum circles the center point. The decoupling threshold of the specific cavity is estimated to be ~4 ps in regime II. Note that the coupling can also be switched in regime I at a specific pump fluence (5.0 μJ · cm−2) when the more sensitive TE mode is completely damped out but TM mode survives (see Supplementary Materials). The decoupling threshold of pump fluence in regime II would be a variable correlated with tr, which will finally be a constant (5.0 μJ · cm−2) at tr ≤ 0 (regime I).

By comparing spectra in Fig. 3a, c, it seems that both scenarios reveal similar spectral evolution, however, they involve distinct physics and thus lead to different consequences. Firstly, only the selected mode is damped so that most cavity photons are unaffected in regime II. For example, Q of TE mode is reduced by 25% at tr = 68.7 ps by annihilating less than 5% of the cavity photons in this regime, while the similar modulation of TE mode annihilates more than 15% of the photons (by modulating all the modes of the cavity uniformly) in regime I. Approximate 66% less cavity photon cost is achieved in regime II than conventional approach in regime I for the same level of modulation. Secondly, by setting tr « 0 in regime I and with the nanosecond relaxation of photocarriers, the THz probe experiences a quasi-steady process with a fixed carrier density in the entire lifetime of the cavity photons; while in regime II, the 14 ps rising dynamics of temporal boundary suddenly merges into the cavity, and thus results in the perturbation of frequency spectrum as well as the breakdown of Lorentzian lineshape.

### Temporal two-dipole model

We numerically interpret the dynamic polarization features of the silicon metamaterial. The Drude model in Eq. 1 introduces not only imaginary part of time-varying permittivity of the silicon cavities but also the real part26, which involve Q factor decline of natural cavity modes as well as generation of new frequency components as a result of the sudden perturbation. The cavity is modeled as a temporal two-dipole emitter: one with the natural resonant polarization of the cavity as a harmonic oscillator subject to a temporal loss boundary (associated to imaginary permittivity) and the other generates harmonics with a frequency-shift polarization after the injection of boundary (associated to real permittivity)6,16,26

$${P}_{1}(t)={e}^{-i({\omega }_{1}-i{\tau }_{1})t}\cdot (H(t)-H(t-{t}_{p})),$$
(3)
$${P}_{2}(t)={e}^{-i({\omega }_{1}-i{\tau }_{1}){t}_{p}}\cdot {e}^{-i({\omega }_{2}-i{\tau }_{2})(t-{t}_{p})}\cdot H(t-{t}_{p}),$$
(4)

where H(t) is the Heaviside function in an ideal scenario with a negligible accumulation time relative to the cycle of oscillations, but an exponential function is applied to account for the 14 ps accumulation time of photocarriers in the real model (see Supplementary Materials). Here, t0 is set as the origin of time coordinate, and thus tp = tr. The total polarization ($${P}_{tot}(t)$$) is the superposition of the two polarizations ($${P}_{tot}(t)={P}_{1}(t)+{P}_{2}(t)$$) where the first one describes the cavity mode (at angular frequency $${\omega }_{1}$$ with damping rate $${\tau }_{1}$$) radiating at t = 0 subject to temporal boundary injected at t = tp, and the second one represents the perturbation induced polarization with a shifted frequency radiating at t = tp ($${\omega }_{2}$$ with damping rate $${\tau }_{2}$$). The first part of $${P}_{2}(t)$$ is a scaling factor to match the amplitude between the two polarizations at tp. Experimental spectra are well reproduced by this model in a series of delay times as shown in Fig. 4b. In the time window when TM mode is unperturbed, transmission amplitude difference (ΔT = T0 − Tp) is merely contributed by the change of TE mode so that it can be well described by the harmonic perturbation model with fixed constants $${\omega }_{1}=2\pi \cdot 0.581$$ THz, and $${\tau }_{1}=2\pi \cdot 0.0085$$ THz. The frequency-shifted component is fixed at $${\omega }_{2}=2\pi \cdot 0.590$$ THz by fitting the data that would be variable and determined by the carrier density; and $${\tau }_{2}$$ is the only free parameter in the fitting process26 (see Supplementary Materials). According to fitting results of the model, the major contribution of the spectral modulation is from the time-varying imaginary part that causes the linewidth broadening due to the truncation of cavity ringing and the frequency ripples due to the sudden termination of temporal oscillation. It is noted that the frequency ripples are the manifestation of a time-domain filter acting as an apodization function whose frequency period is inversely proportional to tp. The sudden injection of free carriers also induces the change of cavity refractive index as estimated of $$\varDelta n\approx\,$$−0.058 (with carrier density $$\varDelta N\approx$$1 × 1014 cm−3) so that a blue-shifted dipole $${P}_{2}(t)$$ emerges after tp as a result of the temporal boundary in analogy to changing the tone of guitar by adjusting string length after plucking (see Supplementary Materials).

The model is directly applied to the experimental steady temporal profile (Fig. 2c and see Supplementary Materials for temporal profile with pump) in order to numerically reproduce the spectral dynamics. Satisfactory match between model and experimental spectra is obtained using the same preset constants as above in the model with major spectral features well reproduced (Fig. 4c). Noted that the experimental excitation pulse involves a broadband frequency range (0.1–1.4 THz, Fig. 2c), and would excite high-order cavity modes at other frequencies that are not considered in the model. We finally reproduce the full evolution of amplitude transmission difference by tuning the delay tp using the model (Fig. 4d). In addition to the clear tp dependent ripples in the side bands of the cavity mode, they reveal slightly asymmetric ripple pattern relative to the central frequency of TE mode because of the frequency-shifted polarization $${P}_{2}(t)$$ (see Supplementary Materials).

## Discussion

Although the temporal loss boundary was demonstrated in the terahertz regime, the concept is highly scalable, and would be promising for LIDAR applications20. The asynchronized modulation of Q-contrasting two-mode cavity can be extended to multimode scenarios with distinct Q values, and a larger contrast would increase the temporal resolution to distinguish the modes. Compared with conventional physical boundary in real space to separate degenerate modes, the temporal boundary approach has no symmetry constraint, which is a transient and reconfigurable process and would especially benefit ultrafast applications. The temporal boundary is not only useful to reduce Q, but can also improve Q factor with a smart design of the cavity via storing and regenerating the oscillations. Selective damping of low Q mode and photon memory would be possible with a controllable storage and release time that could break the time-bandwidth limitations via sudden change of cavity properties14,27,28. Squeezed quantum state could be realized via nonadiabatic changes provided that the dynamics is faster than the oscillation cycles16. Removal of temporal boundary before the cavity photons are completely damped would be feasible to reach a more flexible engineering of photon dynamics. Such a subcycle control could probably be realized in terahertz regime by applying Kerr nonlinear effect6,17,29 or dynamics of hot carrier thermalization30 that have been shown to possess subpicosecond timescale. The free carrier injection or extraction is also feasible by electric pump via EO modulation by integrating PIN diodes3. Although we mainly focus on the imaginary part of permittivity, the correlated temporal real part is also involved in the process that contributes to tuning the tone of cavity photons. The temporal boundary induced frequency shift is a linear process and not subject to the phase matching condition. It would therefore be a convenient approach to generate new frequencies whose efficiency can be enhanced by improving cavity Q or working at epsilon near zero wavelength2,6.

In summary, we have shown the concept of temporal loss boundary as an extra dimension to manipulate the dynamics of cavity photons. The temporal boundary is demonstrated with extended mode control capability than conventional approach. We interpreted the process with a temporal two-dipole mode by merging the sudden perturbation into cavity dynamics that reproduces the experimental spectral features. The temporal dimension introduces an additional degree of freedom to tune the cavity at an ultrafast timescale and would benefit optical communications for adjustable time-bandwidth ratio. The concept may find applications in design of photonic memory and quantum hyperentanglement. The linear tunability of cavity frequency induced by the temporal boundary is not limited by the requirement of the phase matching condition, and would be of special interest in the terahertz regime, where nonlinear frequency mixing is challenging due to scarcity of high power sources.

## Methods

### FDTD simulations

Data in Fig. 1 were simulated using the FDTD module with periodic boundary conditions for a unit cell. Dimensions of the unit cell are p = 250 μm, d = 240 μm, and h = 80 μm with silicon cylinder sitting on quartz substrate. Lossless materials were set at steady state for silicon and quartz with refractive indices of 3.42 and 2.00, respectively. For simulations subject to temporal boundaries, variation of conductivity in silicon thin film is modeled to account for the dynamic photocarrier density whose thickness is determined by skin depth of pump light. For simplicity, spatially uniform conductivity of the top 10 μm-thick silicon sheet was set to compute the terahertz cavity dynamics in both regime I and regime II. In regime I, a time-invariant conductivity (σ = 100 S/m for data in Fig. 1d) was defined. In regime II, a time-varying conductivity following a step function $$\sigma (t)=\left\{\begin{array}{c}0\\ \frac{1000}{14}t\\ 1000\end{array}\right.$$ S/m for $$\left\{\begin{array}{c}t < {t}_{p}\\ {t}_{p}\le t\le {t}_{p}+14\\ t > {t}_{p}+14\end{array}\right.$$ was imported to material property library of the 10 μm-thick silicon sheet. tp was set at 120 ps for data in Fig. 1d. Electric and magnetic field distributions were extracted from the passive modes at center frequencies with lossless materials.

### Gabor transform

Gabor transform was used to expand the temporal profile with an extra dimension of frequency so that we can visualize the temporal distribution of frequency components. The transform of the temporal profile x(t) is defined by the formula

$${G}_{x}(\tau ,\omega )=\int_{-\infty }^{\infty }x(t)\cdot {e}^{-\pi {(t-\tau )}^{2}}\cdot {e}^{-j\omega t}dt.$$
(5)

In the process of Gabor transform, we perform Fourier transform for partial temporal profile (x(t)) that is chosen by the time window defined by Gaussian function. The window should be carefully chosen according the oscillation period of temporal profile for the tradeoff between spectral information and temporal resolution.

### OPTP experiments and dynamics measurements

Home-built OPTP spectroscopy setup was used for time-resolved transmission measurements of samples. A near-infrared laser beam (Ti: sapphire laser, 100 fs, 6 mJ per pulse at 800 nm with 1 kHz repetition rate) was coherently split into three parts: external pump source, pump–beam for terahertz generation, and detection beam for EO sampling. All the three beams were synchronized for time-resolved measurements. Transmission spectra without pump were scanned for 200 ps in order to capture all the cavity oscillations (averaged over ten scans, but still limited by signal to noise ratio). All the frequency domain spectra were normalized to the reference (a bare substrate) after Fourier transform.

In temporal boundary experiments, height and delay mainly refer to properties of pump pulses. Height of boundary is determined by pump fluence, which was adjusted by tuning the variable neutral density filter inserted in the pump–beam path as shown in Fig. 5. The relative delay refers to the time difference between terahertz pulses and pump pulses arriving at sample. Time difference was tuned by accurately adjusting the position of retroreflector on the delay stage with a subpicosecond resolution.

In pump–probe experiments, pump–beam diameter (~10 mm) is larger than that of the probe terahertz beam so that the probe area is uniformly pumped. By controlling the relative time of terahertz pulse and pump pulse via a delay stage, terahertz time-domain transmission dynamics can be captured by EO sampling. The photocarrier dynamics was measured by monitoring the terahertz peak electric field evolution of time-domain signals (at 2.5 ps, see Fig. 2a) by scanning the arrival time of pump pulses relative to the terahertz pulses. Once the pump pulses arrive at the sample, terahertz peak electric field will reveal perturbations due to injection of photocarriers. The peak electric field evolution was mapped by scanning the pump delay which is proportional to photocarrier density. The longest scanning time is ~3 ns in the measurement of relaxation dynamics of photocarriers due to the limited traveling range of delay stage.