The rapid advancement of electron microscopy epitomizes our growing ability to characterize the structure and function of nanoscale materials, devices and biological systems. Beyond stationary imaging, the advent of in situ and time-resolved electron microscopy allows for the observation of transient phenomena and non-equilibrium dynamics32,33,34,35. In the form of photon-induced near-field electron microscopy (PINEM)6, ultrafast transmission electron microscopy (UTEM) permits quantitative, high-resolution imaging of nano-optical fields7,36,37,38. The underlying mechanism involves energy transfer between localized optical excitations and free electrons, modifying the state of the electron by generating discrete photon sidebands in a process termed stimulated inelastic electron-light scattering (IELS). The corresponding longitudinal phase modulation of the electronic wavefunction at optical frequencies is quantum-coherent in nature8,12, and thus can be used for the coherent control of electron quantum states in space9,11,39,40 and time10,16,17. Recent theoretical works suggest that such modulated electron beams enable an electron-mediated transfer of optical coherence, predicting the generation of coherent cathodoluminescence, the resonant excitation of two-level systems and superradiance from sequential electrons24,25,41,42,43. These developments create opportunities for a closer integration of electron microscopy with coherent optical spectroscopy, based on local quantum control and enhanced sensing. Harnessing coherent electron–light interactions for scientific and technological applications is, however, hampered by its usual limitation to the ultrafast regime. Recent works implemented IELS44,45, a ponderomotive laser phase plate22 and an attosecond modulator23 at high continuous-wave powers. Low coupling efficiencies and structural damage have thus far limited inelastic scattering to weak interactions. Despite the use of phase matching and resonant amplification in dielectric laser accelerators19, prism geometries46,47 or free-space coupled whispering-gallery-mode microresonators48, achieving strong phase modulation of an electron beam has remained out of reach of regular electron microscopes.

Here, we overcome this challenge and demonstrate highly efficient electron–photon interactions in the continuous-wave regime using an electron microscope and photonic integrated circuits based on Si3N4. Our set-up (Fig. 1) allows an electron beam to interact with the copropagating evanescent field of a microresonator waveguide in the object plane of a transmission electron microscope (TEM).

Fig. 1: Principle of continuous-wave photonic-chip-based optical phase modulation of free-electron beams.
figure 1

a, Rendering of the experimental set-up, including the electron microscope and a fibre-coupled Si3N4 photonic-chip-based microresonator. Inset: magnified interaction region with the electron beam passing the microresonator. CW, continuous wave; PD, photodiode. b, Left: during interaction with the laser-driven cavity mode, the initially narrow electron spectrum (black) develops discrete sidebands at integer multiples of the photon energy (red). Right: in a cQED depiction, the cavity photons induce transitions between the free-electron energy ladder states. c, Photograph of the fibre-coupled Si3N4 photonic chip mounted on a customized TEM holder. The triangular-shaped chip edge minimizes undesired electron–substrate interactions (the inset image shows the optical fibre glued to the input waveguide). d, Optical microscope image of the photonic chip showing the bus waveguide and the microresonator. The electron beam (green path, not to scale) traverses the microresonator parallel to the chip surface. e, Frequency-dependent effective index (neff) of the fundamental quasi-TM microresonator mode (orange). The integrated on-chip platform allows for phase matching to be achieved at different electron kinetic energies (blue, 90–145 keV) either by changing the dimensions of the Si3N4 waveguide or operating at different optical frequencies. For the waveguide shown in f, phase matching is achieved between the optical mode at ~193.5 THz (dashed orange line, corresponding to a wavelength of ~1,550 nm) and the free electrons at ~115 keV (dashed blue line). W, width; H, height. f, FEM simulation of the Eφ distribution of the fundamental quasi-TM mode of the microresonator (the green dot is an exemplary electron trajectory pointing into the page).

Free-electron–cavity photon interaction

The electron–photon interaction at the photonic chip (schematic in Fig. 1) is described by the Hamiltonian28,29 (see derivation in the Supplementary Information)

$${H}_{{\rm{int}}}=\frac{e}{2m}(\hat{{\bf{p}}}\cdot \hat{{\bf{A}}}+\hat{{\bf{A}}}\cdot \hat{{\bf{p}}})=\hbar {g}_{0}\hat{{\bf{a}}}{\hat{{\bf{b}}}}^{\dagger }+\hbar {g}_{0}^{\ast }{\hat{{\bf{a}}}}^{\dagger }\hat{{\bf{b}}}.$$

While the length gauge is usually chosen for localized quantum systems in cavity quantum electrodynamics (cQED)49, the above velocity gauge is a natural choice for free electrons at finite momentum \(\hat{{\bf{p}}}\) in an electromagnetic field with vector potential \(\hat{{\bf{A}}}\). The interaction between the optical mode (\(\hat{{\bf{a}}},{\hat{{\bf{a}}}}^{\dagger }\): annihilation/creation operator) and an electron (\(\hat{{\bf{b}}},{\hat{{\bf{b}}}}^{\dagger }\): electron-energy ladder operators, see Supplementary Information) is characterized by the vacuum coupling rate g0 (refs. 28,29), determined by the mode distribution and the matching of electron group and optical phase velocities:

$${g}_{0}=\eta \sqrt{\frac{{e}^{2}{v}_{{\rm{e}}}^{2}}{2\varepsilon \hbar \omega V}}.$$

Here, e is the electron charge, ve the electron group velocity, ε the optical permittivity, ω the angular frequency and V  the effective optical mode volume. The phase matching condition is manifested in the coefficient \(\eta =\int {\rm{d}}z{{\rm{e}}}^{-i\Delta k\cdot z}u(z)/L\)   defined by the optical mode profile function u(z) describing the electric field component along the electron trajectory, linked to the vector potential by \(\hat{{\bf{A}}}=\hat{{\bf{A}}}(z)=\sqrt{\frac{\hbar }{2\varepsilon \omega V}}(u(z)a+{u}^{\ast }(z){a}^{\dagger }),\) and the electron wavenumber change Δk = ω/ve upon photon absorption and emission8,50. The scattering matrix, summarizing the effect of the interaction on both the electron and the cavity, is given by \(S={\rm{\exp }}(-i{g}_{0}\tau \hat{a}{\hat{b}}^{\dagger }-i{g}_{0}^{\ast }\tau {\hat{a}}^{\dagger }\hat{b}\,)\)28. An empty cavity, therefore, facilitates electron-driven photon generation28,51,52 in a spontaneous Cherenkov or Smith–Purcell-like process53, with coherence properties characteristic of transition radiation and so-called coherent cathodoluminescence54. Populated by a coherent state \(|\alpha \rangle \) from a laser, the free-electron–photon interaction reduces to a dimensionless coupling parameter g = iταg0, where |α|2 = nc is the mean intracavity photon number, τ = L/ve is the electron’s transit time over the interaction region L, and the scattering operator becomes a displacement operator acting on the electron state12. The interaction produces electron energy sidebands separated from the initial energy E0 by integer multiples of the photon energy \(N\hbar \omega \) (N , where N is the photon order), with populations PN following the Bessel functions of the first kind, PN = JN(2|g|)2 (refs. 12,50). In a position representation, the interaction imprints a sinusoidal phase modulation onto the electron wavefunction50, which upon dispersive propagation will result in a density modulation of the electron beam10,16,17.

Chip-based integrated photonics platform

To facilitate high interaction strengths, we use photonic chip-based Si3N4 microresonators, a platform with many important features, including radiation hardness, high power handling55, extremely low propagation losses (below 1 dB m−1 at 1,550 nm)56 and flexibility, to engineer dispersion for phase matching. The chip was fabricated using the photonic Damascene process56,57 (Methods) without top oxide cladding to allow for efficient free-electron–light interactions with the evanescent field. The ring microresonator of 20 μm radius is coupled to a bus waveguide and placed close to a triangular edge of the chip to minimize undesired electron–substrate interactions (Fig. 1d and Methods). For operation in the TEM, the photonic structure was packaged via ultrahigh numerical aperture (UHNA) fibres (Fig. 1c and Methods). The Si3N4 microresonators employed here enable phase matching at different electron energies by modifying the waveguide geometry (Fig. 1e); various established integrated platforms could further extend the phase matching range in terms of the electron energy and optical frequency (see Supplementary Information).

In the current study, we designed a ring microresonator (cross-section: 2 μm × 650 nm) to provide phase matching at an optical frequency of ~193 THz (wavelength λ ≈ 1,549 nm) for a target electron energy of 115 keV. Figure 1f shows a finite-element method (FEM, Methods) simulation of the quasi-transverse magnetic (quasi-TM) mode profile in terms of its major contributing field component Eφ along the electron propagation direction. Owing to the small mode area and considerable evanescent field component, we predict a vacuum coupling rate of g0/2π ≈ 1011 Hz over an interaction time of τ ≈ 10−13 s (L ≈ 19 μm). The microresonator’s high Q factor facilitates a unity coupling constant g ≈ 1 (the coupling constant g is a complex number; for simplicity, we use g in place of \(|g|\) hereafter) at a coupled optical power of P = ncħωκ ≈ 1 μW, where κ/2π = 390 MHz is the measured cavity decay rate inside the electron microscope (the intrinsic Q factor of Q0 ≈ 0.74 × 106 was slightly degraded in the microscope, see Methods).

Combined optical and electron spectroscopy

In the experiments, the fibre-coupled microresonator is driven by a 1,550 nm continuous-wave laser via the bus waveguide. It is mounted on a customized sample holder and placed in the object plane of the field-emission TEM (Fig. 1a and Methods). Parallel to the surface, the electron beam passes the waveguide and interacts with the confined optical mode (inset in Fig. 1a). After traversing the structure, the electron kinetic energy distribution is characterized with an imaging electron spectrometer in two different ways. Specifically, high-dispersion electron energy spectra are recorded by positioning a sharply focused electron beam in front of the microresonator. Alternatively, energy-filtered TEM using a collimated beam is used to image the interaction across the entire cavity mode in the near field. Whereas the former yields electron spectra for varying experimental parameters (Fig. 2), the latter enables imaging of individual sideband populations with high spatial resolution (Figs. 3 and 4).

Fig. 2: Simultaneous optical and electron spectroscopy of a high-Q microresonator mode.
figure 2

a, A continuous-wave laser was used to excite the quasi-TM mode of the Si3N4 microresonator by using a polarization controller (PC). The relative optical frequency was calibrated by imparting sidebands (±2 GHz) via an electro-optic phase modulator (EOM). The total transmitted and back-reflected light was detected to calibrate the power coupled into the clockwise propagating mode. CIR, circulator; OSC, oscilloscope; RF, radio-frequency synthesizer. b, Normalized transmission scan of the microresonator quasi-TM mode measured outside the TEM with a Q factor of ~0.77 × 106 (κ0/2π = 112 MHz, external coupling loss rate κex/2π = 139 MHz) and a free spectral range of ~1.090 THz (see Methods for in situ optical characterization). c, Simultaneously measured optical transmission at the output waveguide (top) and |g|2 retrieved from the electron energy spectra (bottom) while the electron beam interacted with the evanescent cavity field. The measured |g|2 trace follows the power coupled to the clockwise mode; a slight splitting is present due to modal coupling. FWHM, full-width at half-maximum. d, Example electron energy spectra for low (top; g = 0 (black), g ≈ 3.5 (red) and g ≈ 6.7 (blue)) and high (bottom, g ≈ 125) optical powers. e, |g|2 varies linearly with the optical power coupled to the clockwise mode of the cavity (slope: |g|2 = P/3.70 μW). a.u., arbitrary units.

Fig. 3: High-resolution hyperspectral imaging of the quasi-TM microresonator mode.
figure 3

a, Spatial map of g at phase matching (115 keV electron energy) with a 1 nm image resolution. b, Exemplary electron spectrum retrieved from the energy-filtered spatial map (position indicated by a cross in d). c, N-dependent sideband population as a function of the distance \(\tilde{z}\) to the chip surface. d, Energy-filtered images of selected N (indicated). The energy window has a width of 800 meV and the position of the microresonator is indicated in grey.

Fig. 4: Phase matching and Ramsey-type interference.
figure 4

a, Geometry (side view) of the electron beam passing the photonic chip and interacting with the quasi-TM microresonator mode. The double interaction and phase shifts between the light and electron wave led to a characteristic spatial distribution of g due to Ramsey-type interference. b, Comparison of experimental (red crosses, see c) and numerically simulated (blue line, see d) maximum g as a function of the electron kinetic energy. c, Quantitative g maps for variable electron energies, showing the spatial distribution and amplitude of the electron–light interaction. The radial position of the Si3N4 waveguide is indicated. d, Numerical simulation of g as a function of electron energy and lateral position just above the surface. The white dots overlay the experimentally observed minima retrieved from c (80–200 kV electron beam energies, the waveguide positions are marked by white lines).

We first investigate the strength of g using a focused electron probe, recording electron spectra while scanning the laser over a resonance employing the set-up depicted in Fig. 2a. The transmission spectrum, displayed in Fig. 2b, shows the quasi-TM microresonator modes spaced by a free spectral range of 1.090 THz. Figure 2c shows simultaneous optical and in situ electron spectroscopy of the laser-excited mode. An electro-optical modulator (driven at 2.0 GHz) is used to generate sidebands that can be observed in the transmission spectrum to calibrate the optical frequency. The laser is tuned to a single optical mode at ~1,549.4 nm (κ/2π = 390 MHz, Methods) and the focused electron beam (120 keV beam energy, 25 nm focal spot size, 1 mrad convergence semi-angle) is centred just above the surface of the microresonator (Fig. 3) to record electron spectra for a stationary beam. Harnessing the high-Q intracavity enhancement, we observe strong populations PN in multiple N, reaching the regime of strong phase modulation for a continuous laser light source and electron beam (Fig. 2d). These results relate to sideband generation in a recent experiment using semi-transparent membranes23 and a study employing dielectric gratings posted at the same time as our work 14. The coupling parameter g is retrieved from the spectra (Methods), whereas the optical power coupled to the clockwise-propagating mode is determined from the recorded optical transmission and reflection data (Fig. 2e). We observe the expected linear dependence |g|2 = P/3.70 μW of the coupling on the in-coupled clockwise optical power. From this, we find that an optical power of 5.35 μW is required to suppress the electron zero-energy-loss peak at g ≈ 1.2, and a value of g ≈ 40 for an optical power of about 6 mW. For a power of ~38 mW in the bus waveguide, we generate >500 photon sidebands (g ≈ 125, Fig. 2d). While state-of-the-art dielectric laser accelerators achieve the highest peak acceleration gradients for sub-relativistic electron beams using femtosecond lasers19,58, our approach enables continuous acceleration of microbunched electron beams10,26 with a gradient of 330 keV m–1 per milliwatt of optical power. In terms of the input peak power required, this is an improvement in efficiency of four orders of magnitude over free-space coupled dielectric structures47,48.

Representing a particular strength of the approach introduced here, integrated photonics permits the controlled interaction with a single optical mode, as described in the following. The spectral line shape of the resonance is analysed by simultaneously recording the transmitted optical power and extracting g for varying frequency detuning (Fig. 2c). The optical transmission trace, formed by the interference of the input light with the light coupled out from the clockwise-propagating resonator mode, exhibits a full-width at half-maximum of 560 MHz (total line width κ/2π = 390 MHz, Supplementary Information). Interestingly, the electron spectra, which are sensitive only to the intracavity power stored in the clockwise-rotating, copropagating optical mode, display a double-peaked structure originating from coupling the power to the frequency-degenerate counterclockwise mode59. The differences in width and shape between the optical and electron spectroscopic measurements are explained by the interference in the optical transmission channel with the input field, and both curves can be fitted consistently in one model as presented in the Supplementary Information (Supplementary Figs. 1 and 2). These data demonstrate continuous-wave electron energy gain spectroscopy21,60 at an extraordinarily narrow spectral feature of only 3.2 μeV in width (full-width at half-maximum; 1 μeV peak separation).

Mode imaging and phase matching

The implementation of chip-based high-Q optical microresonators as efficient electron phase modulators requires insights into the real-space scattering distribution. Employing a collimated electron beam and an imaging energy filter (800 meV energy pass band), we record spatial maps of PN (Fig. 3d, Methods). A photon-order resolved spectrum is extracted for each image pixel (Fig. 3b), and g is retrieved with a 1 nm spatial resolution (Fig. 3a). Using a continuous electron beam circumvents previously encountered signal-to-noise ratio limitations in PINEM at about 3–4 orders of magnitude lower flux. The distance-dependent sideband occupations (Fig. 3c) reveal a strong and high-contrast modulation, indicating the absence of spatial and temporal averaging. We note that IELS is typically accompanied by a three-dimensional momentum transfer9,11; however, in the current experiment, these transverse deflections did not limit the resolution for in-focus imaging (Supplementary Information).

The microresonator waveguide was designed to match the phase velocity of the excited optical mode with the group velocity of electrons at an energy of around 115 keV. Figure 4 shows the spatial pattern of the electron–light coupling near the ring-shaped microresonator (Fig. 4a). The electron-energy-dependent near-field maps reveal an oscillatory modulation of g along the chip surface (Fig. 4c) and an amplitude change with electron energy (Fig. 4b). At phase matching, the spatial distribution of g closely resembles the electric field configuration of the excited quasi-TM mode (Fig. 3a), and the most efficient coupling is achieved for a beam passing the periphery of the ring (tangent line). Trajectories closer to the centre of the microresonator (secant line) are governed by two sequential interactions with the microresonator mode. This results in Ramsey-type constructive or destructive interference that depends on the relative phase of both individual interactions13.

Numerical FEM simulations of the optical mode profile (Fig. 4d, Methods), considering the electron trajectory through the near field and the microresonator power enhancement, closely reproduce the experimental observations, including the position of the minima in g (white dots). Excellent agreement is achieved for the electron energy dependence of the maximum g (Fig. 4b). In contrast to nanoscale-confined optical fields, a steep cutoff in electron–light coupling is found for beam energies below ~100 keV because the optical mode is devoid of higher-momentum electric field components. At high electron energies, the coupling strength reaches a plateau, which enables broadband temporal phase plates for TEM. Besides enhancing the total coupling via a larger interaction time, an increase in microresonator radius will further sharpen the phase matching condition in energy.


In summary, we demonstrate highly efficient, phase-matched and single-optical-mode interaction of free electrons with photonic-chip-based high-Q microresonators, driving transitions at microwatt continuous optical pump powers. Simultaneous in situ optical and electron measurements show that this cQED-type setting yields a quantitative understanding of the interaction and facilitates electron energy gain spectroscopy at the microelectronvolt level. Our approach may enable a seamless integration of temporal phase plates in electron microscopy over a broad range of energies, with various applications in advanced longitudinal and transverse electron beam shaping for high-fidelity attosecond metrology and sub-cycle probing, beam blanking and high-frequency beam modulation. Coherent beam separation in the optical field may enable new variants of inelastic electron holography, and sequential interactions will provide sensitivity enhancements in coherent electron spectroscopy. We envisage various possible architectures featuring anomalous dispersion to directly probe the multimode intracavity field in nonlinear effects such as the formation and dynamics of dissipative Kerr solitons, or coupled microresonators for advanced electron state preparation and readout. The present study provides a missing link in the realization of various theoretical concepts in free-electron cQED by establishing full control over the optical input and output channels of a single confined integrated microresonator mode coupled to an electron beam. Future investigations will address cavity-mediated electron–photon and electron–electron entanglement using coincidence detection, promising enhanced electron imaging and electron-heralded single-photon sources.


Numerical simulations

The effective refractive index (neff) and the mode profile of the Si3N4 microresonator are calculated via FEM simulations (COMSOL Multiphysics) (Fig. 1f). Mode analysis is performed for the two-dimensional axially symmetric model with the cross-section of the microresonator. The Si3N4 core has a rectangular cross-section with width W and height H. The microresonator has a SiO2 bottom cladding and an air (vacuum) top cladding. The refractive index of Si3N4 used in the simulation was obtained from in-house ellipsometry measurements and found to be nK = 1.9923 (J. A. Woollam, unpublished data), whereas the refractive index of SiO2 was obtained from ref. 61 as nM = 1.4440. From the electric field distribution in the cross-section (\(r,\tilde{z}\)), the complex electric field along the electron trajectory \({E}_{{\rm{traj}}}(r,\tilde{z},z)\,,\) related to the physical field by Ephysical = real[Etraj], is determined via  \({E}_{{\rm{traj}}}(r,\tilde{z},z)={E}_{\phi }(r,\tilde{z})\cos (z/r)+{E}_{r}(r,\tilde{z})\sin (z/r)\). The coupling strength \(g(r,\tilde{z},E)\) is then found by evaluating \(g=\frac{e}{2\hbar \omega }{\int }_{-\infty }^{\infty }{E}_{{\rm{traj}}}(r,\tilde{z},z)\exp \left(-i\frac{\omega }{{v}_{{\rm{e}}}}z\right){\rm{d}}z\) (refs. 12,50) for different electron energies E, where \({v}_{{\rm{e}}}=c\sqrt{1-1/{(1+E/{m}_{0}{c}^{2})}^{2}}\) is the relativistic electron velocity.

Fibre-integrated silicon nitride microresonators

The microresonators used in this study are made from Si3N4, a platform that is CMOS compatible with radiation hardness capability62 and ultra-low propagation losses56,57. They also allow for dispersion engineering and efficient fibre-to-chip coupling. Si3N4-based integrated photonic circuits have been driving major progress in nonlinear optical devices, in particular soliton microcombs63 that are already used in numerous system-level applications ranging from coherent telecommunication64 to astrophysical spectrometer calibration65,66. Here, the designed microresonators were fabricated using the photonic Damascene process56,57. A 4-inch silicon substrate with 4-μm-thick thermal wet SiO2 cladding was used. The substrate was coated with deep-ultraviolet (DUV) photoresist, and microresonators and bus waveguides were patterned on the substrate via DUV stepper photolithography (248 nm KrF excimer laser). The pattern was then dry-etched into the SiO2 cladding using C4H8/O2/He etchants to create waveguide preforms. Stoichiometric Si3N4 film was deposited on the patterned substrate via low-pressure chemical vapour deposition (LPCVD), to fill the waveguide preforms and to form the waveguide cores. Afterwards, etchback and chemical-mechanical polishing56 were used to planarize the substrate and remove excess Si3N4. The entire substrate was further annealed at 1,200 °C to remove the residual hydrogen content in Si3N4, to reduce hydrogen-induced absorption loss in the Si3N4 waveguides. This high-temperature annealing is critical to fabricate low-propagation-loss waveguides at telecommunication bands around 1,550 nm. No top SiO2 cladding was added on top of the Si3N4 waveguides, such that the electron beam could interact with the optical mode. Finally, photolithography with alignment was used to precisely position the Si3N4 microresonator close to the chip edge (within a distance <10 μm, key for aligning the electron beam with the Si3N4 microresonator). Deep reactive-ion etching was used to separate the entire substrate into hundreds of individual dies/chips for the following die-level integration with fibres.

The light is coupled into and out of the Si3N4 photonic chip on one edge, while the microresonator is placed on the other edge. To avoid cutting the electron beam by the substrate (Fig. 1c), the near edge was clipped, forming a tight supporting triangle around the resonator ring to avoid damage during the chip release. A bus waveguide (dimensions 800 nm × 650 nm) is used to evanescently couple the light into the multimode microresonator (dimensions 2 μm × 650 nm) to achieve a better coupling ideality67. Inverse-taper waveguides68 are used to facilitate efficient light coupling via UHNA-7 fibres (mode field diameter ≈ 3.2 μm at 1,550 nm). A 2–3-cm-long UHNA-7 fibre with a thermally expandable core was spliced to standard single-mode fibre (SMF-28) with a splicing loss of <0.2 dB. A chip through-coupling efficiency (fibre–chip–fibre) of >25% is achieved using the UHNA-7 fibre. The photonic packaging was done by first aligning the UHNA-7 fibre via a custom-built holder to optimize the coupling. Then, a small drop of epoxy (~150 μm, Fig. 1b) was dispensed using a precise pneumatic valve and cured using a UV lamp in four small time steps (~2–5 min). A long-term (~1–2 days) coupling stability test was performed at low optical power by monitoring the transmitted light. The broadband characterization of the microresonators was performed by employing a widely tunable diode laser. The transmission spectrum was calibrated using a self-referenced optical frequency comb and Mach–Zehnder interferometer (MZI)69. The resonance is fitted using models explained in the Supplementary Information (fitting model) to extract κ0/2π (intrinsic loss rate), κex/2π (external coupling loss rate), and γ/2π (mode coupling rate) for both quasi-TE and quasi-TM mode families. The mean intrinsic linewidth is ~110–120 MHz (Q0 ≈ 1.75 × 106) for the quasi-TM mode family. The cavity resonance centre at ~1,549 nm is critically coupled with κ0/2π = 112 MHz and κex/2π = 139 MHz (Q ≈ 0.77 × 106).

Optical characterization of microresonators inside the TEM

The packaged sample is transferred into the TEM using a customized holder with vacuum fibre feedthroughs. The fibres connected to the microresonator chip are fed through the hollowed pipe part of the holder, and the T-shaped base holding the photonic chip is mounted on an adaptor that allows the placement of the entire structure in the sample region of the TEM. The optical set-up used to perform the spectroscopy in the TEM is shown in Fig. 2a. The set-up is driven by a CW-laser (Toptica CTL 1550), with a maximal power of 40 mW, a tunable wavelength from 1,510 nm to 1,630 nm, and a linewidth below 10 kHz. The laser is coupled to an electro-optic modulator (EOM) that allows for frequency calibration of the transmission scan and the dependence of g on the detuning from the resonance frequency. A polarization controller is used to align the input light to either the quasi- TE or TM mode of the microresonator. An optical circulator is used to probe the light reflected from the microresonator due to the bulk and Rayleigh surface scattering responsible for the splitting of clockwise and counterclockwise cavity modes. The optical transmission and reflection are measured simultaneously to calibrate the intracavity power coupled to the clockwise mode (see Supplementary Information). We note that a degradation of the Q factor from 0.77 × 106 to 0.49 × 106, resulting in an additional increase in total linewidth (~150 MHz), was observed when the sample was transferred into the TEM, which could be related to some charging, strain or contamination of the resonator chip. Theory predicts that |g|2 is proportional to the photon number ncw of the clockwise mode optical cavity mode. The intracavity photon numbers are varied by sweeping the laser frequency through the optical resonance to find the |g|2 dependence on optical power. The g(t) value is extracted for each time step of the sweep, t, by fitting the measured electron spectrum, and the intracavity photon number ncw(t) is retrieved from the optical transmission signal using the steady-state Langevin equation. By binning the |g(t)|2 trace in 20 ms steps and plotting it against the coupled optical power in the clockwise mode \(P\,=\,\kappa \hbar \omega {n}_{{\rm{cw}}}(t)\), we obtain the power sweep curve shown in Fig. 2e. More detailed data analysis procedures and the analytical expression of various field quantities can be found in the Supplementary Information.

Electron microscope and experimental set-up

The in situ experiments were performed in the Göttingen UTEM70, which is based on a thermal field-emission TEM (JEM 2100F, JEOL Ltd). Achieving temporal resolutions in the femtosecond regime70,71,72, UTEM has enabled stroboscopic real-space movies of numerous processes, including strain wave dynamics34,73,74, ultrafast demagnetization75,76,77 and the evolution of structural phase transformations33,35. In the current experiments, the electron gun is operated in the extended Schottky regime, yielding a continuous electron beam with an initial energy spread of 0.5 eV at variable electron energies from 80 to 200 keV and typical beam currents of 10–50 pA in the sample region. Preventing clipping of the electron beam at the extended microresonator chip (~50 μm sample height at the probing position), a low beam convergence is set by turning off the magnetic objective lens in low magnification (LM) TEM and STEM mode, for high-resolution imaging and spectroscopy, respectively. For analysing the electron beam passing the microresonator structure, a post-column imaging energy filter (CEFID, CEOS) is employed, equipped with a scintillator-coupled CMOS camera (TemCam-XF416ES, TVIPS GmbH; used for all measurements, if not mentioned otherwise) and a hybrid-pixel electron detector (EM CheeTah T3, Amsterdam Scientific Instruments). The sample tilt is adjusted carefully to align the electron beam parallel to the surface of the microresonator chip, probing the local electron–light interaction at the microresonator.

Local spectroscopy of the microresonator mode

Electron spectroscopy (Fig. 2) is implemented in LowMAG STEM mode (indicated magnification: ×1,000) at 120 keV electron energy, achieving an electron focal spot size of about 25 nm (FWHM) with beam semi-convergence angles of 1.1 mrad (100 μm condenser aperture, Fig. 2d) and 0.45 mrad (40 μm condenser aperture, Fig. 2c (lower panel) and e), respectively. The electron beam is either positioned about 30 nm over the microresonator surface, such that no clipping or beam distortion was observed (Fig. 2d), or at a distance of 380 nm from the microresonator surface (Fig. 2c, e), as estimated from the optical power in the bus waveguide and the exponential decay of the optical mode. We observe some charging of the dielectric microresonator chip when using a tightly focused electron beam. Therefore, larger distances to the surface or fast beam sweeps are employed, and future structures will address this point by adding a thin conductive coating on parts of the microresonator chip. The STEM focal plane is set to the middle of the ring microresonator and the lateral beam position relative to the chip is software controlled (Filter Control, CEOS) via an external scan generator (USG, TVIPS). Single spectra are recorded with an integration time of 100 ms (Fig. 2d). Electron spectroscopy with fast sweeps of the laser frequency is captured by an event-based hybrid pixel detector (EM CheeTah T3, Timepix3 ASIC, 1.56 ns timing precision) and discrete binning in time (100 μs windows, Fig. 2c, e). For each spectrum, the electron–light coupling constant g is extracted by fitting the shape and amplitudes of the individual spectral sidebands N with a comb of Voigt-peaks and normalized occupations PN = JN(2|g|)2. For details on the fitting procedure, see refs. 12,48. By considering the change of the coupling constant g as a function of frequency detuning, the optical linewidth can be extracted, and the achievable energy resolution in electron energy-gain spectroscopy is ultimately limited by the laser linewidth. The concept can be transferred to arbitrary high-Q optical modes, with previously demonstrated spectral linewidths below κ/2π ≈ 10 MHz (ref. 56). In comparison, state-of-the-art monochromated EELS probes material excitations with a zero-loss peak (ZLP) of sub-10-meV energy width78,79,80.

Energy-filtered imaging and quantitative g maps

Quantitative maps of the electron–light coupling constant g are retrieved by energy-filtered transmission electron microscopy (EFTEM) imaging (Figs. 3 and 4), resolving individual photon sidebands with a double-sided energy window of only 800 meV width and typical bi-sided r.m.s. non-isochromaticity (energy window edge sharpness) of about 30 meV (8 mm field of view of the spectrometer entrance aperture plane, for technical details, see ref. 81). Changing the microscope’s high tension (step size of 0.8 V) relative to the centre beam energy (80–200 keV) allows for the recording of images IN(x, y) that contain inelastically scattered electrons, losing or gaining an integer number N of photon energies ħω = 0.8 eV (Fig. 3c). For each spectral sideband, an image is recorded with 1-s integration time, resulting in energy-filtered TEM datasets containing up to 121 image slices, enabling a quantitative retrieval of the coupling constant g at each image pixel (see Fig. 3d). Accounting for a large number of image positions (up to 4,096 × 4,096 pixels in Fig. 3), the data are collocated into 1,024 subsets using the k-means++ clusters algorithm (implemented in MATLAB 2020b, MathWorks Inc.), with the sideband occupations as the input vector. The resulting centroid locations (metric: squared Euclidean distances) give a set of averaged spectra. For each of these, the coupling constant g, relative uncertainty dg/g (with standard deviation dg of Gaussian distribution in g) and spectral amplitudes A are fitted to the recorded image stacks IN(x, y). The averaged intensity spread of the ZLP to neighbouring energy windows, B, is accounted for by applying a convolution IN(x, y) = A(x, y) PN(x, y) * B (at 115 keV beam energy, the 800 meV energy window contained about 82% of the ZLP intensity). Furthermore, remaining ZLP intensity at stronger coupling (g > 3), resulting from limited rejection contrast of the spectrometer slits and scattering at the entrance aperture, is disregarded (about 2(0.8)% diffuse background for N = 0( ± 1)). Finally, the retrieved fitting parameters are assigned to the individual pixels before clustering, resulting in a quantitative map of the electron–light coupling constant with 1 nm spatial resolution (Figs. 3 and 4).