Introduction

The emergence of photon-induced near-field electron microscopy (PINEM) in 20091 and its theoretical quantum description2,3,4 have revolutionized the field of light-matter interaction. Producing femtosecond electron pulses by the combination of ultrafast laser pulses and electron microscopes to probe the ultrafast charge oscillations and the dynamics of excited near-fields have provided a powerful tool for electron holography and phase retrieval5, as well as controlling the shape of free-electron wavepackets6 and constructing attosecond electron pulse trains6,7,8,9. This breakthrough not only extends new prospects for quantum information processing10 but also facilitates shaping of the electron beam11,12,13,14.

The fundamental principle behind any light-matter interaction is overcoming energy–momentum conservation criterion. For the electron propagating near the nanostructure, the nanomaterial can act as a mediator for energy–momentum transfer. Satisfying this condition in a system without pump light leads to an energy loss and spontaneous radiation like Cherenkov radiation15,16,17, transition radiation18,19, and Smith Purcell radiation16. However, by introducing the pump light and exciting sample with laser1 or coherent radiation sources (Electron-driven photon source)20, the stimulated process also affects the energy transfer mechanism. In such a system, the electron energy gain and inverse Smith Purcell radiation21 can occur in addition to the electron energy loss. The gained energy is the core concept behind dielectric laser acceleration (DLA)22 and PINEM2. The particle acceleration in the DLA23 occurred by the evanescent electromagnetic field close to the grating, which is the outcome of classical accelerator particle physics models, whereas in the PINEM2, the wave nature of the electron wavepacket results in the energy transfer. Therefore, overcoming energy–momentum conservation in laser-induced near-fields leads to quantized energy exchange between light and the electron, which results in the momentum modulations predominantly along the longitudinal direction13.

The unavoidable transversal momentum recoil24,25,26 leads to transversal momentum modulations as well. Consequently, in addition to the coherent bunching of the electron wave function in energy space and Rabi oscillations4 among quantum states separated by multiples of the photon energy4, the periodic Lorentz force24 acting on the electron by localized plasmons24 serves as a phase and amplitude grating for elastic diffraction27. Therefore, the optical near-field, is responsible for transferring energy and momentum to free electrons, and can control longitudinal13,24,25,28 and transverse recoil13,24 of traveling electron beams.

The free-electron and light interactions in PINEM experiments could be tailored to cover the full range of weak and strong interactions. The confined near-field modal volumes in microcavities29 and highly localized plasmonic mode30, can overcome the weak phase-matching problem. Another approach to achieve higher energy–momentum matching is precisely matching the phase velocity of the light wave and the group velocity of the electron wave function31. Recent experiments, which use the inverse Cherenkov effect21 or whispering gallery modes29 have shown resonant phase-matching and an exchange of hundreds of photon quanta with a single electron over long interaction distances. Another efficient way to satisfy phase-matching conditions is to take advantage of slow electrons24,32. The prolonged interaction time between low-energy electrons and light waves increases the possibility of mapping the dynamics of several near-field oscillations24 between probe electrons and spatially localized light-field of small nanostructures.

Careful control of the phase modulation of slow electrons via the direction of the laser ilumination13 and the spatial profile of the optical near-field beyond the adiabatic approximation32,33 has opened the way to manipulate free electrons and control its longitudinal inelastic energy transfer, as well as its transverse elastic recoil34. This results in selective control of the electron energy and diffraction angles, enabling the implementation of acceleration/deceleration mechanism within an arbitrary angular deflection range. Pumping samples with two-color laser pulses6 and having two spatially separated near-field zones6,35 are other ways to control the final longitudinal energy transfer and quantum-phase modulation of the electron wavefunction. Electrons flying through two spatially separated near-field lights can carry information about the amplitude and phase of each optical field separately. The first interaction alters the amplitude and phase of the electron wavepacket. There, the already shaped electron wavepacket interacts differently with the near-field light at the second interaction zone, compared to an unmodulated electron pulse5.

Here, we aim to map the impact of the phase oscillation of the dipolar plasmons in a double interaction phase-locked system to control the longitudinal and transversal distribution of the slow electron wavepackets. We numerically show that the initial phase of the optical cycle and the phase offset between the localized dipolar plasmon can control the shape and diffraction angle of the electron. Particularly the initial phase of the light at the first interaction point strongly affects the final shape of the electron wavepacket, mainly due to the direction of the wiggling motion exerted on the electron in the first interaction zone. We define the direction of the excited modes as a quantity for selectable enhancement or cancellation of specific momentum orders. We further demonstrate that depending on the spatial profile of the dipolar modes and relative phase between two near-fields, the exerted transverse electromagnetic force can lead to the deflection22 of electrons within the second interaction zone.

Results and discussion

The discussion above has showcased that the interaction between electron wavepackets and laser-induced plasmon excitation yields amplitude and phase modulations in the electron wavepacket. To provide a movie-like access to such dynamics, we used our self-consistent Maxwell-Schrödinger numerical toolbox25,33. In this process the electron wavepacket (\(\psi \left(\overrightarrow{r},t\right)\)) evolution versus time is calculated by solving the Schrödinger equations using the minimal-coupling Hamiltonian24 in the vicinity of a laser-induced gold nanorod. We have assumed a plasmonic nanorod with an infinite height to conduct the simulation in two-dimensional space. This approach allowed us to focus specifically on the laser-induced near-field at long rods with a high aspect ratio, hence rendering the substrate and edge effects negligible. Such configurations have been realized within the realm of dielectric laser accelerations36,37 and could be generalized for a more robust manipulation of the electron wavepackets by considering the phase-locked sequential interactions considered here as well. The properties of the plasmonic near-field in each time step is calculated based on the finite-difference time-domain (FDTD) method, where the permittivity of the gold was modeled using a Drude model complemented by two critical point functions25, and then interpolated into the Schrödinger frame. After the interaction is completed in the Schrödinger frame, the final electron wavepacket is used to calculate the energy modulation and electron recoil. Then the expectation value of the electron kinetic-energy operator is calculated as follows:

$$\langle \psi (x,y;t\to \infty )\left|\widehat{H}\right|\psi (x,y;t\to \infty )\rangle = \frac{{\hslash }^{2}}{2{m}_{0}}\iint {dk}_{x}{dk}_{y}\left({k}_{x}^{2}+{k}_{y}^{2}\right){\left|\widetilde{\psi }\left({k}_{x},{k}_{y};t\to \infty \right)\right|}^{2},$$
(1)

where \((x,y)\) and \({(k}_{x},{k}_{y})\) in Eq. (1) denote the real and reciprocal space coordinates, and \(\widetilde{\psi }({k}_{x},{k}_{y};t\to \infty )\) is the Fourier transform of the wave function after the interaction. By assigning the kinetic energy of the electron as \(E={\hslash }^{2}{(k}_{x}^{2}+{k}_{y}^{2})/2{m}_{0}\), and the scattering angle as \(\varphi ={\mathrm{tan}}^{-1}({k}_{x}/{k}_{y})\), the inelastic scattering cross section \(\sigma \left(E,\varphi \right)=\left({m}_{0}/{\hslash }^{2}\right){\left|\widetilde{\psi }\left(E,\varphi ;t\to \infty \right)\right|}^{2}\) for different inclination angles is obtained, where \({m}_{0}\) is the electron mass, and \(\hslash\) is the reduced Planck’s constant13. We define the inelastic scattering cross section value as a quantity for distinguishing unique features that can be measured due to strong interaction.

The fact that the electron is energetically bunched in discrete photon order is delicately explained via a one-dimensional electron model that neglects the recoil experienced by the electron2. The discrete probabilities of each spectral peak associated with the exchange of \(n\) quanta of energy between the electron and scattered field are given by expanding the wave function by the Bessel series using Jacobi-Anger relation24:

$$\psi \left(x,t\right)=\mathrm{exp}\left[\left(i{k}_{x}^{el}x-\Omega t\right)\right]\sum_{n}{i}^{n}{J}_{n}\left(\left|g\right|\right) \mathrm{exp}\left[in\left(\omega_{ph}/ {v}_{el}\right)x-in{\omega }_{ph}t+n\measuredangle g\right] ,$$
(2)

where \(\measuredangle\) is the angle, \({J}_{n}\) is the nth Bessel function of the first kind, and \(g\) is the strength of the electron–light interaction \(g=\left(e/\hslash {\omega }_{ph}\right){\int }_{-\infty }^{\infty }d{x}{^\prime} {\widetilde{E}}_{x}\left({x}{^\prime}, y\right){e}^{-i{x}{^\prime}{\omega }_{ph}/{v}_{e}}\). \({\widetilde{E}}_{x}\) is the Fourier transform of the optical electric field component along the \(x\) direction, and \({v}_{e}\) is electron velocity, respectively. \({k}_{x}^{el}\) and \(\Omega\) are the initial longitudinal spatial frequency and angular frequency of the electron wavepacket, and \({\omega }_{ph}\) is the incident photon angular frequency.

In this work, the coherent control of the electron wave function is mediated by two spatially separated localized plasmonic fields. Here, we study the importance of the initial phase of the optical mode in a system involving a slow electron wavepacket passing through the near-fields of phase-locked plasmonic gold nanorods. The low velocity of the electron inherently increases the interaction time and, thus, for a given local field amplitude, enhances the experienced electron recoil. We considered the interaction of a Gaussian electron wavepacket at the kinetic energy of \(600\,\mathrm{eV}\), with \(56\,\mathrm{nm}\) longitudinal \(\left({W}_{L}\right)\), and \(36\,\mathrm{nm}\) transverse \(\left({W}_{T}\right)\) broadenings excited by a linearly x-polarized laser pulse with the center wavelength of \(\lambda =700\,\mathrm{nm}\) and temporal broadening of \(18\,\mathrm{fs}\).

The temporal resolution of the electron within tens of fs durations can be achieved by compressing isolated high energy electron pulses with radio frequency38,39, terahertz radiation40,41, and optical-gating42,43 methods. Furthermore, as Morimoto and Baum44 have shown, applying a time-varying electric field can produce a single-cycle ultrashort (attosecond) electron pulse. Indeed, the field induces time-dependent deceleration and acceleration44, leads to the compression of the pulse in time, which, by employing electromagnetic fields of higher frequencies, an electron pulse of femtoseconds or even hundreds of attoseconds durations can achieved. However, thanks to the advancement of ultrafast electron microscopy, generating a train of ultrashort bunches of electrons in femtosecond and attosecond6,8,9,45 duration resolution is feasible as well. Consequently, post-selecting a short temporal slice of a longer electron pulse by energetic or spatial filtering46,47 can be another way to reach this temporal broadening.

The gold nanorods responsible for transferring momentum to electrons are placed at \(100\,\mathrm{nm}\) distance from each other. We considered nanorods with a radius (\(r=15\,\mathrm{nm}\)) capable of hosting only dipolar modes. Simulations for the scattering of the electron from one isolated nanorod repeat the same results as the shape of the electron after the first interaction zone in the sequential scheme with \(100\,\mathrm{nm}\) spacing (see supplementary Figure 1). Due to the large spacing between the nanorods, the hybridization of plasmonic modes do not occur and only a weak radiative interaction between rods slightly alters the plasmonic resonances of the double-rod system compared to a single isolated rod (Fig. 1). Figure 1, shows electron modulation in the real and the momentum representation after experiencing each step of the dual near-field interaction. The top schematic in each section visualizes the dipolar mode when the electron starts interacting with each nanorod, and, finally, electron modulation in the spatial domain. After the interaction is finished, a train of energy combs at exactly the incident light-field energy is observed in the electron energy spectra (Fig. 1a,b; lower rows). The parameters are configured here to match the synchronicity condition \({\lambda }_{ph}{v}_{el}=2rc\) 24, in order to have a synchronous dipolar field oscillation with its period being matched to the propagation time of the electron beam within the effective interaction length. \({\lambda }_{ph}\) here is the wavelength of the plasmonic resonances.

Figure 1
figure 1

Sequential free-electron and photon interactions. Electron modulation spectra after interacting with near-field of (I) first gold nanorod (1), and (II) second nanorod (2). Final modulation of the amplitude of the electron wavepacket in real space (top schematics) after the interaction with the dipolar near-field modes of each nanorod and its inelastic scattering cross-section (bottom schematics). The phase of the optical near field of each nanorod at the start of the interaction with the electron is the same in the dual interaction scenario (as depicted by \(\mathrm{Re}\{\phi \left(V\right)\}\) at a depicted time in the Figure, where \(\phi \left(V\right)\) is the scalar potential). The initial phase of the near-field light is reversed in (b) compared to (a). The initial center kinetic energy of the electron beam is \(600\,\mathrm{eV}\), and its longitudinal and transverse broadenings are \(56\,\mathrm{nm}\) and \(36\,\mathrm{nm}\), respectively (FWHM). The center wavelength of the laser pulse is \(700\,\mathrm{nm}\), its FWHM temporal broadening is \(18\,\mathrm{fs}\), and its peak field amplitude is \(1\,{\mathrm{GVm}}^{-1}\). Dashed arrows show the trajectory of the electron where the electron propagates along the x direction.

Generally, a spread of the electron momentum distribution along both longitudinal and transverse extend is observed. The longitudinal electric field components of the near-fields provide momenta to bridge the phase mismatch for energy transfer to the electron, in fact the localized near-field couples to the electron at the initial momentum state \({p}_{e}=\hslash {k}_{e}\). As the electron absorbs and emits quanta of photon \(n\), its wavefunction evolves into a superposition of momentum distribution \({p}_{e}=\hslash \left({k}_{e}+n\left(\omega_{ph}/{v}_{e}\right)\right)\). Consequently, an energy comb with the spacing between the peaks ascertained by the exciting photon energy (\(\hslash {\omega }_{ph}\)) is formed2. On the other hand, the transverse field component induces sideways diffraction of the electrons. The arrangement of diffraction orders at different energies depends on the electron velocity, the optical near-field momentum distributions, and the topology of nanoparticles24. Selection rules for the diffraction peaks along E = 0 axis in the vicinity of the plasmon of gold nanorod are displaced by orders specified by \(\delta {k}_{y}^{el}=2\left|{k}_{y}^{ph}\right|=2\sqrt{{k}_{x,c}^{2}-{k}_{0}^{2}}\) , where \({k}_{y}^{ph}\) represents the damping ratio of the evanescent tail of plasmons along the y-axis, and \({k}_{0}\) is the photon wave number in free space. Hence the occurred diffraction process is a sequential two-photon process.

Here we have employed two scenarios to investigate the impact of the initial phase of the oscillating dipolar mode on the electron modulation. The first configuration (Fig. 1a) involves the electron experiencing recoil influenced by the positive phase of the dipolar mode as its initial interaction condition. In the second scheme (Fig. 1b), the electron recoil is controlled by the initially negative phase of the dipolar mode in both nanorods. Following each interaction process, the inelastic scattering cross-section map illustrates the influence of synchronization between the arrival of the electron wavepacket and the phase of the near-field light in a dual interaction system.

As depicted in Fig. 1a, after the electron passes through the first near-field zone (I), only a slight asymmetry in the intensities of momentum orders is observed in the overall inelastic scattering cross-section. The oscillating x-polarized dipolar near-field induces the rotational restoring force acting on the electron, and as the result of the back-and-forth force on the electron, a unified transverse recoil is observed across energy distribution. Therefore, the electron wavepacket experiences a total transverse recoil toward both the positive and negative y-axis \({-1}^{\circ }\le \varphi \le +1\), together with longitudinal inelastic energy exchange within the range of \(-20\,\mathrm{eV}\le E\le 20\,\mathrm{eV}\). This energy comb reveals distinct sidebands for both positive and negative longitudinal momentums, which indicates energy loss and gain (acceleration/deceleration) processes on the electron pulse during the interaction. Subsequently, as the already modulated electron continues to interact with the in-phase rotational force of the second near-field (II), some of the previously populated momentum ladders in the electron energy gain are depopulated. Therefore, we can see reduction in the level of momentum occupancy along both vertical recoil and horizontal energy exchange order for loss channels. In contrast, an increase in the probability of occupying a higher energy level and an expansion in the diffraction angle distribution for the gained-energy electrons are observed.

This scenario is different for a system involving first interactions with a negative phase of the dipolar mode. As shown in Fig. 1b, after a sequential interaction, we can see numerous fine interference features of discretized energy and recoil states similar to the first case. However, there is a distinction in the visibility of the transverse momentum levels. Here, the distribution of the electron wavepacket along the longitudinal and transverse directions shows discretized momentum levels in the negative spectrum range (energy loss region).

Here, we indicate a robust correlation between the observed electron modulation and the initial phase of the harmonic evanescent field distributions at the start of the interaction. The quantum phase modulation, governed by the phase-controlled double interactions is better visualized in inelastic longitudinal PINEM spectrum (supplementary Figure 2), which shows phase dependent selectable population and depopulations in the final electron energy spectra. Where the transversal differential scattering cross section (supplementary Figure 3) demonstrates the effect of the arrival time of the electron wavepacket to the near-fields in a dual interaction scheme on hampering and enhancing diffraction recoil. We attribute this asymmetry to the direction of the wiggling motion exerted on the electron via the interaction with the in-phase oscillating field. The acting Lorentz Force on the electron wavepacket, initiates this motion and leads to the dynamical deflection of the electron in the near-field zone, therefore different parts of the electron wavepacket are exposed to different coupling strengths between the field and the electron wavepackets. This Lorentz Force acting on the electron wavepacket, initiates this motion and leads to the dynamical deviation of the electron in the near-field zone from its initial shape and trajectory. Consequently, distinct sections of the electron wavepacket experience varying degrees of interaction strength between the electromagnetic field and the electron wavepacket (see supplementary Movie 1).

To further enhance our understanding of the impact of the initial phase of the optical mode on the electron modulation in a Ramsey-type interaction, we will explore the influence of the direction of the laser on the electron energy exchange and the experienced recoil. Upon excitation with the linearly polarized laser a dipole is induced in the parallel direction to the electric field of the laser radiation. For an inclined excitation this will lead to an inclined Lorentz force acting on the electron with respect to the electron trajectory13 that initiates an inclined wiggling motion as well13.

Moreover, due to the asymmetric projected field along the electron propagation direction, the electron distribution in the momentum representation rotates toward specific diffraction angles and energy ranges. In the following, we investigate the interaction of an electron wavepacket with the oblique dipolar oscillation of two phase-locked gold nanorods with zero relative phases between them. The simulation parameters are chosen similarly to those presented in Fig. 1, but the direction of the laser illumination changed from \(\theta ={0}^{\circ }\) to \(\theta =-30^{\circ }\). Angular deflections with complex diffraction patterns in each photon absorption and emission order are observed (Fig. 2).

Figure 2
figure 2

Phase-locked electron-photon interaction influenced by obliquely polarized laser. (I) Single-interaction and (II) double-interaction scenarios. The amplitude of the electron wavepacket after propagating through the near-field zone excited by a linearly polarized light at the incidence angle of \(-30^\circ\) in the (a) real- and (b) momentum-space representations. The electron begins its interaction with nanorods when the plasmonic dipolar field has either a (a,b) positive initial phase (upper box) or (c,d) a negative initial phase (lower box). The laser pulse has a center wavelength of 700 nm, electric field amplitude of \({E}_{0}=1\,{\mathrm{GVm}}^{-1}\), and temporal FWHM broadening of 18 fs.

Already after the first interaction region, the effect of the initial phase of the near-field distribution and its asymmetry with respect to the electron trajectory becomes apparent. In fact, these aspects lead to an asymmetry of the electron wavepacket distribution in the momentum space for both cases, particularly along the transverse direction (compare Fig. 2b to d). Traveling to the next near-field zone, the wiggling motion of the plasmonic field induces rotational oscillations in the momentum space of the already shaped electron wavepackets. Therefore, the modulated electron experiences either a repelling or attracting force toward the nanostructure, and it leads to the population of higher momentum orders or depopulating to a lower momentum order. The critical parameters for controlling the quantum path interferences are the distribution of the momentum states after the first interaction and the direction of the induced near-field dipole with respect to the initial electron trajectory. As a result of interaction with the dipolar resonances of both nanorods, the transversal diffraction order is split into two regions with \(\varphi \le 0\) and \(\varphi \ge 0\), while the energy spans over a range of \(-20\,\mathrm{eV}\le E\le 20\,\mathrm{eV}\). The transversal electromagnetic force in sequential in-phase interactions exerts a significant elastic diffraction obvious from the momentum space distribution of the electron wavepacket and, interestingly, a substantial upwards deflection of the electron in the real space only after a few nanometers away from the interaction zone. The latter happens due to a stronger diffracted intensities towards the + y-axis.

To better elaborate on the sequential phase-locked electron-photon interaction of the electron wavepacket with two rods, the dynamics of the interaction for the case with a positive initial phase are shown in Fig. 3. Within the time frame of 0 to 9.41 fs, as the electron passes (Fig. 3b) by the neighborhood of the first nanorod, the oscillating dipolar localized plasmon (Fig. 3a) leads to a Lorentz force and results in a circular motion of the electron in the momentum representation (Fig. 3c). Then, the electron starts being populated in the momentum space along both the x and y-axis. As the electron moves to free space between nanostructures, its momentum distribution remains constant, revealing that the electron cannot interact with the free-space electromagnetic radiation. Arriving to the second oscillating near-field, the electron wavepacket experiences a reshaping in the momentum distribution along both x and y directions. Thereby, the second near-field distribution evacuate some of the already occupied momentum states and populated new momentum orders. The overall experienced phase by the electron over multiple cycles of the light field (three oscillations for each near-field) and the direction of field oscillation (that controls the direction of the wiggling motion) affect the final span of the wavepacket in the momentum space, along both the transverse and longitudinal directions. The nonzero asymmetric force asserted by the oscillating fields cause significant electron deflection in the transverse direction after interacting with the second field, and more interestingly a strong diffraction into two momentum orders as large as 330 \({k}_{0}\) are observed. Compared to the free-space Kapitza–Dirac effect48,49, where the electron could be occupied to the momentum orders of only 2\({k}_{0}\), near-field mediated sequential control of the electron could open fascinating opportunities for routing the motions of electrons for electron-wave interferometry applications.

Figure 3
figure 3

Transversal and the longitudinal dynamics of the evolution of the free electron wavepackets during its interaction with localized plasmons excited by an obliquely polarized laser (\(\theta =-30^\circ\)). Parameters of the laser pulse are \({E}_{0}=1\,{\mathrm{GVm}}^{-1}\) (field amplitude), \(\lambda =\) 700 nm (center wavelength), and \(\Delta \tau =\) 18 fs (FWHM temporal broadening). The electron wavepacket has an initial kinetic energy of 600 eV, with 56 nm and 36 nm longitudinal and transverse broadenings, respectively (FWHM). (a) Spatial profile of the scaler potential at depicted time steps. (b) The amplitude of the real-space and (c) momentum-space electron wavepacket distributions at the corresponding time steps.

Simulation of dual interaction system for longer electron wavepacket along the longitudinal direction (refer to supplementary Figure 4) yields results consistent with those demonstrated in Fig. 3. Some differences arise from the shorter effective interaction length for a smaller electron wavepacket. On the other hand, for the broader electron (longitudinal broadening of \({W}_{L}=120\,\mathrm{nm}\)), the electron can experience six dipolar oscillations per nanorod and have more effective interaction length. This results in well-separated momentum ladders and more pronounced real-space deflection.

Controlling the outcome of the random walk by a few parameters, such as the laser incident angle and gap distance between the nanorods, in a Ramsey-type experiment makes the proposed approach an efficient technique for shaping the electron wavepackets by encoding the roles of phase-locked oscillations into the energy transfer and transverse momentum modulation. Moreover, our scheme benefits from the co-excitation of both rods with the same laser beam.

It has been previously demonstrated that in the Ramsey-type experiment, the distribution of the final energy spectrum35 is influenced by the relative phase between two interaction zone35. In-phase fields can enhance the final interference features in a constructive manner and, therefore the extend of the PINEM pattern, whereas the two fields with opposite phases can cancel energy exchange. Merging the findings from the Ramsey experiment with the effect of the transverse Lorentz force opens a new dictionary to control electron shape along both longitudinal and transverse directions for slow-electrons. In a system with fixed values of laser parameters, such as the wavelength, the intensity, and the polarization, the gap spacing between two effective nanorods is the only way to control the delay and the initial phase of oscillations at each nanorod. Therefore, the sequential initially out-of-phase near-field action is studied by decreasing the gap distance between two nanorods to 80 nm and keeping the inclined laser pulse and electron parameters constant.

As shown in Fig. 4a, I and b, I, the momentum-space distribution of the electron after passing through the first field resembles that of the in-phase case (Fig. 2I), where the direction of the electric field of the laser radiation is translated into the rotated asymmetric distribution of the electron wavepacket in the momentum space. As the electron travels outside of the first interaction zone, it encounters the near-field of the second nanorod but with reversed direction of Lorentz force with respect to the in-phase system. Hence, a more complicated electron modulation effect is observed. The non-uniform phase of this oscillating optical mode in the second interaction zone induces an inverse rotational wiggling motion compared to the first zone. Consequently, it leads to the depletion of the transversal momentum states for the loss channels and the population of the higher-order momentum states for the energy-gain channels. Simultaneously, this non-uniform transversal electromagnetic field increases the probability of occupying positive diffraction angles.

Figure 4
figure 4

Phase controlled sequential interactions with out-of-phase optical cycles of near-fields. The electron wavepacket at \(600\,\mathrm{eV}\) initial kinetic energy, excited by an inclined linearly- polarized laser pulse at the wavelength of 700 nm, and with the field amplitude of \({E}_{0}=1\,{\mathrm{GVm}}^{-1}\) represented in (a) real space, and (b) momentum space, after the (I) first interaction and (II) second interaction zones.

Figure 4, demonstrated that both accelerated and decelerated electrons after the first interaction experience acceleration in the next cycle, leading to an increased probability of gain and a decreased probability of loss events (the span of energy spectra is altogether between \(-25\,\mathrm{eV}\le E\le 50\,\mathrm{eV}\)).

Keeping the electron parameter and laser excitation as before (Fig. 3), the sequential interaction of the electron wavepacket with initially positive optical fields is studied by increasing the gap spacing between gold nanorods (\(200\,\mathrm{nm}\)), in such a way that the experienced electric-field phase by the electron is the same at both interaction zones (Fig. 5). The results support the overall behavior of the smaller gap case shown in Fig. 2. In both cases two distinguished diffraction peaks are observed. This confirms that the major control parameter is the phase offset experienced by the electron beam interacting with both dipolar resonances.

Figure 5
figure 5

Controlling the transverse recoil of the electron as a function of the relative phase between plasmonic gold nanorods. (a) The amplitude of the electron wavepacket in the real space after the first and second interaction zones. The inset shows the spatial profile of the scalar potentials at given times. The inelastic scattering cross-section of the electron, after its interaction with the excited dipolar near-field of the (b) first, and (c) the second nanorod. Nanorods are excited with pulsed laser beam (laser electric field amplitude, wavelength, and temporal broadening are \({E}_{0}=1\,{\mathrm{GVm}}^{-1}\), 700 nm and 18 fs, respectively). The considered electron wavepacket has an initial kinetic energy of \(600\,\mathrm{eV}\).

Figure 5 shows that by adjusting the initial amplitude and phase distribution of the near-fields from an electron perspective and carefully controlling the phase delay between subsequent fields, along with considering a gap spacing smaller than the dispersive length35 of the electron, we can reach engineered simultaneous quantized energy and transverse momentum exchange between a propagating light wave and a free-electron. Concomitant electron acceleration/deceleration and diffraction caused by sequential in-phase and out-of-phase near-field oscillations allow for designing a highly controllable polarization-dependent electron-beam modulator that enables selective acceleration and deceleration of the electron beams at specific diffraction angles. Hence, we can design a customizable pulse shaper for synthetization arbitrary of electron pulses, similar to spatial light modulators50, and metamaterials51 for photons. Furthermore, engineering nanostructures configuration13, shape24, distance, and size24, together with the laser polarization52 (circularly/linear) is a new paradigm for electron wavepacket shaping with the enhanced field. This innovative approach, with other paradigms for the spatial electron wavefunction modulation such as nanofabricated phase masks53, time-varying electromagnetic fields54, and structured light pulse55,56 along with attosecond temporal resolution, offer vast potential in not only imaging electronic and atomic motion and charge dynamics, but also to coherent control photonic, electronic, and phononic motions with the state-of-the-art ultrafast electron microscopy.

Recent study has revealed that shaping the electron wave function enables precise control over quantum electrodynamic, scattering process, and the spectral characteristics of Bremsstrahlung emission57. In parallel, Khalaf et al.58 demonstrated a drastic change in the spontaneous emission by shaping the free-electron wavepacket. Moreover, the spatial modulation of electron beams is an essential tool for nanolithography and measuring the quantum state59 of the hybrid light-matter systems. Where free electrons can serve as a high-resolution quantum sensor within strongly coupled light-matter systems. Furthermore, adopting familiar principles from quantum optics, the spatiotemporal phase shaping of electrons is a building block for improving image resolution60, enabling selective probing61, advancing quantum computation10, and enhancing data transmission62. Motivated by numerous novel applications in electron imaging1, diffraction42,47, and spectroscopy2, shaped electron beams, such as electron vortex beams, have the potential to enhance electron microscopy for studying magnetic and biological specimens63.

Conclusion

In conclusion, our work presents a new way to spatially shape electron beams, along not only longitudinal but also transverse directions, by tuning the direction of the incident light and the distance between two nanorods in a dual-interaction system. In the Ramsey-type method, the direction of the circular wiggling motion in each interaction zone, together with the phase of the oscillating localized plasmon at the starting point of the interaction with the electron, as well as the relative phase between two near fields, can control the energy transfer and recoil experienced by the electron in arbitrary angular deflections. Revealing quantum features in such interactions, we have investigated the role of the initial orientation of the wiggling motion of the electron beam interacting with sequential near-field distributions, thus controlling the overall shape of the electron wavepacket. Our approach provides an efficient way to actively modulate the electron wavefunctions and coherently control the manipulation of free electron waves by tailoring both elastic and inelastic effects, achieving diffraction orders beyond what is normally achievable by the Kapitz-Dirac effect. This finding motivates further studies that considers the development of novel techniques for ultrafast electron-light interferometry and shaping the electron wavepacket for further investigations of quantum coherent interactions in complex systems.