Optical gating and streaking of free electrons with sub-optical cycle precision

The temporal resolution of ultrafast electron diffraction and microscopy experiments is currently limited by the available experimental techniques for the generation and characterization of electron bunches with single femtosecond or attosecond durations. Here, we present proof of principle experiments of an optical gating concept for free electrons via direct time-domain visualization of the sub-optical cycle energy and transverse momentum structure imprinted on the electron beam. We demonstrate a temporal resolution of 1.2±0.3 fs. The scheme is based on the synchronous interaction between electrons and the near-field mode of a dielectric nano-grating excited by a femtosecond laser pulse with an optical period duration of 6.5 fs. The sub-optical cycle resolution demonstrated here is promising for use in laser-driven streak cameras for attosecond temporal characterization of bunched particle beams as well as time-resolved experiments with free-electron beams.

C ontemporary physics and chemistry aim to record phenomena occurring on the time and length scales of electronic dynamics in atomic systems [1][2][3][4] . Recent progress in the generation of attosecond extreme ultraviolet (XUV) pulses [5][6][7] allows for direct insight into ultrafast processes in the sub-femtosecond regime. Advanced experimental techniques such as attosecond optical spectroscopy 5,8,9 , highharmonic orbital tomography 1,10 or laser-induced electron self-diffraction 11 have enabled the direct observation of electron dynamics in atoms. Ultrafast electron diffraction and microscopy 2,12,13 further enable atomic spatial resolution by employing free electron bunches at energies of 30-200 keV with de-Broglie wavelengths on the order of several picometers, but with temporal resolution so far limited to tens-hundreds of femtoseconds [13][14][15] . The temporal resolution of these techniques can be pushed toward the atomic unit of time (24 as) by the experimental technique presented here.
A natural way to manipulate free electrons on the attosecond timescale would be by using the electromagnetic field of a laser pulse oscillating with a period of several femtoseconds. Similar to optical streaking and bunching schemes [15][16][17][18][19][20][21] , attosecond temporal resolution may be obtained by mapping time to electron energy. When nonlinear forces can be neglected, however, no net energy gain can be imparted to a charged particle by a light wave in vacuum because of energy and momentum conservation. For efficient energy exchange, the symmetry of the field must be broken via the introduction of a boundary surface as shown in refs 15, 17, 20, 21. Metallic thin films 15 , nanowires 21 , carbon nanotubes 17 , metallic nanotips 20 and microstructures 22 have all been used as spatial boundaries for the laser field (for comparison of advantages/disadvantages of different schemes see Supplementary discussion, Experimental techniques for electron streaking by optical fields).
The laser-driven gating and streaking of electrons presented in this paper is based on the energy and momentum exchange between a laser field and an electron in the proximity of a periodic nanostructure utilizing the inverse Smith-Purcell effect [23][24][25][26][27][28][29][30] . A silicon nano-grating serves as a phase mask for incoming laser pulses, leading to the excitation of a travelling evanescent mode propagating parallel to the electron beam with a phase velocity equal to the electron velocity v e ¼ bc (refs 26-30), where c is speed of light. The amplitude of the synchronous mode decays exponentially with the distance from the grating surface (for details see 'Methods' section). The direction and strength of the resulting electromagnetic force depends on the optical phase of the excited mode with respect to the arrival time of electrons 30 (see Fig. 1a). Spectral filtering of the electrons after interaction with the laser fields yields temporal gating of the electron bunches with sub-optical cycle temporal resolution.

Results
Temporal gating of electron beam by optical fields. The experimental set-up for demonstration of laser-driven gating in the time domain is shown in Fig. 1b,c (for details see section 'Methods' section). A sub-relativistic continuous electron beam with an initial energy of E k0 ¼ 28.1 keV (b ¼ 0.32) is focused close to the surface of the grating, parallel to the grating vector. Two infrared femtosecond laser pulses (central wavelength of l ¼ 1.93 mm, pulse length of t ¼ 600 ± 50 fs and maximum incident field of E 0 ¼ 1.3±0.1 GV m À 1 ) with an adjustable relative time delay are focused onto the grating surface at different locations along the electron beam path. After interaction with the grating near fields, the electrons reach an energy high-pass filter transmitting only those with energies E k 4eU s , where e is the electron charge and U s is the applied retarding voltage.  Depending on their arrival time at the grating with respect to the phase of the accelerating field, electrons are either accelerated, decelerated or deflected (see the electric field and the final momentum change of the travelling electron in Fig. 1a) 30 . In our experiment, we first imprint a periodic energy modulation to the electron beam via interaction with the first laser pulse. By adjusting the time delay Dt of the second laser pulse, this electron energy modulation can be enhanced for Dt ¼ nT or suppressed for Dt ¼ (n þ 1/2)T, where T ¼ l/c is the period of the driving laser field and n 2 N. When only accelerated electrons are detected, this leads to a current that oscillates as a function of Dt. This experiment is similar in nature to a Ramsey-type control of coherent energy exchange between electrons and two spatially separated optical near-fields demonstrated recently in ref. 22. The sub-cycle energy modulation of the electron beam is maintained due to the short propagation distance l ¼ 18 ± 1 mm between the laser spots (corresponding to a travel time of 190±10 fs) and the small relative velocity change of the electrons Dv e /v e0 p1.2%.
The resulting phase-dependent oscillations of the accelerated electron current are shown in Fig. 2a for electrons with minimum energy gain of 1 keV compared with the theoretical model (see 'Methods' section). The temporal duration of the electron bunch accelerated within one optical cycle of the accelerating mode is apparent from the width of the individual peaks in the phase oscillations. The peak width decreases with increasing spectrometer voltage U s from 3.2 ± 0.1 fs (FWHM) at a minimum energy gain of (eU s -E k0 ) ¼ 30 eV to 2.0±0.3 fs for (eU s -E k0 ) ¼ 1 keV (Fig. 2b, detail in Supplementary Fig. 1). This is a consequence of the smaller phase-space volume occupied by electrons that gain the highest energy (see also ref. 15).
As the temporal profile of the electron energy modulation reflects the field of the driving laser pulse, it changes on two different time scales. It reflects both the carrier frequency o (phase oscillations) and the envelope function of the laser pulse field Bexp( À 2ln2t 2 /t 2 ). To observe the effect of laser pulse envelope on the accelerated population of electrons, we monitor the amplitude of the sub-cycle current oscillations (c.f. Fig. 2a) as a function of the time delay between the laser pulses (see Fig. 2c,d). Here the width of the resulting cross-correlation changes from 490 ± 30 fs at (eU s À E k0 ) ¼ 30 eV to 180 ± 40 fs at (eU s À E k0 ) ¼ 1.3 keV. This demonstrates that apart from sub-cycle temporal resolution, the gating scheme can provide an envelope temporal resolution more than three times finer than the duration of the driving laser pulse.
As can be seen in Fig. 2a, this technique generates a pulse train of sub-cycle femtosecond electron bunches. To generate a single bunch, that is, to demonstrate the feasibility of single-cycle gating operation, we simulate gating of a DC electron beam driven by ultrashort infrared (l ¼ 2 mm, t ¼ 10 fs corresponding to 1.6 optical cycles) laser pulses with a stable carrier-envelope phase (for details see 'Methods' section).
The calculated accelerated electron current as a function of electron arrival time and minimum energy gain is shown in Fig. 3. Single-cycle gating can be achieved by the detection of electrons with energy gains above 100 eV. The physical principle used is analogous to the isolation of single attosecond XUV pulses via spectral filtering of the high-energy part of the high harmonics generated from ultrashort laser pulses 6,31 . We note that our scheme does not rely on the ballistic velocity bunching taking place during free propagation of the electrons after their interaction with the laser pulse, as discussed in refs 18,20 (for a detailed discussion see Supplementary discussion, High-pass energy gating versus attosecond microbunching and Supplementary Fig. 2).
Electron transverse streaking at optical frequencies. Not only sub-cycle temporal gating but also transverse streaking of free electrons is possible by a simple variation of the presented set-up (Fig. 4a), providing for deflection-based applications and an improvement in temporal resolution. This laser-driven transverse streaking is achieved by using the time-dependent near fields of a nano-grating tilted with an angle of a ¼ 37°relative to the axis of electron beam propagation 32 . Electrons thus gain transverse momentum, the magnitude and direction of which depends on the electron arrival time with respect to the optical phase of the laser field and distance from the grating surface 32 . (a) Measured phase-dependent oscillations of the accelerated electron current for a minimum energy gain (eU s À E k0 ) of 1 keV (squares) compared with the theoretical curve (red), demonstrating phase controlled energy modulation. The theory curve was calculated for the transverse distance of electron beam centre from the grating surface y ¼ 100 nm. The electron current oscillation amplitude was used as a fitting parameter. (b) FWHM of the individual peaks shown in (a) as a function of (eU s À E k0 ) compared to theory (solid curve). (c) Phase-dependent oscillation amplitude over a longer time window at (eU s À E k0 ) ¼ 30 eV (squares), 1 keV (circles) and 1.3 keV (triangles) fitted by Gaussian functions (curves). The data is vertically shifted for clarity. (d) FWHM of Gaussian peaks shown in (c) (squares) as a function of (eU s À E k0 ) compared to theory (solid curve). Error bars were obtained from the statistical error of individual measurements of accelerated electron current, pointing stability of electron beam and the timing stability of the experiment (for details see 'Methods' section).
Bunches shorter than 1/4 of the laser optical cycle can be streaked by this scheme with a close-to-linear dependence of the deflection angle on the electron arrival time.
For a demonstration of the dependence of the electron deflection angle on the optical phase of the deflecting fields, we again use two spatially separated laser pulses with an adjustable time delay. The polarizations of both laser pulses are rotated to be parallel to the grating vector. Spatial filtering of the deflected electrons is performed with a metallic knife edge (see 'Methods' section for details).
In Fig. 4c, we show the measured electron current as a function of the minimum deflection angle and of the phase difference between the two laser pulses (the deflection angle of the beam centre is shown in Supplementary Fig. 3). The maximum observed deflection angle of y ¼ 6.5 mrad is six-times higher than the undeflected electron beam divergence angle Because of the geometry of the tilted grating, the deflecting and accelerating/decelerating forces are coupled. This is advantageous in terms of temporal resolution due to the possibility of simultaneous spatial and spectral filtering of the detected electrons. In Fig. 4b, we show the phase-dependent electron current for electrons with a deflection angle y46 mrad and an energy gain DE k 4400 eV. Double filtering (energy and spatial) further decreases the phase-space region occupied by detected electrons and improves the temporal resolution of sub-cycle gating to 1.3±0.3 fs.

Discussion
We have thus shown that by utilizing the interaction of electrons with the laser-induced near fields of a nano-grating, we can control the energy and deflected spatial profile of the electron beam with sub-optical cycle precision. These results will lead to interesting developments in ultrafast electron diffraction and microscopy 2,4,8,13,33 experiments, an example set-up of which we show in Fig. 5a. Here an electron bunch first interacts with the accelerating field excited by a few-cycle laser pulse leading to modulation of its kinetic energy E k . The gated electrons are then transmitted and/or diffracted by a sample. Here the dynamics excited by, for example, a foregoing attosecond XUV pulse (generated via high-harmonic generation from a split off fraction of the accelerating laser pulse) can be probed as a function of time delay. Using the detection of electrons with the highest energy gain filtered by an imaging spectrometer, single femtosecond temporal resolution will be achieved. Detection of high-energy electrons will also maintain the spatial mode of the electron beam after the gating interaction as they undergo minimal deflection 27,30 (for details see Supplementary discussion, Electron beam emittance after interaction with optical near-fields). When combined with attosecond XUV pulses generated by the same laser, the optical gating of an electron beam allows for all-optical timing control of the experiment, avoiding the electronic timing jitter usually present in state-ofthe-art experiments employing microwave electron bunch compression 34 . Additionally, the angular phase-dependent streaking of electrons demonstrated here can have direct application as a laser-driven analogy of a classical streak camera (Fig. 5b) in which the temporal profile of an electron bunch is translated into a transverse spatial distribution. Here, a temporal resolution of B10 as could be directly accessible with available laser and electron beam technology (for details see 'Methods' section).
In summary, we have experimentally demonstrated laserdriven temporal gating as well as transverse streaking of free electrons at dielectric nanostructures with single femtosecond temporal resolution. This technique can be directly applied to ultrafast electron diffraction and microscopy. Moreover, the presented physics is not limited to sub-relativistic electrons 26 . It also enables precise bunch length measurements of relativistic charged particle beams (not only electrons) such as those generated in modern free-electron-laser-based light sources.

Methods
Laser and electron beams. An overview of the optical set-up is shown in Supplementary Fig. 4. A thulium-doped infrared femtosecond fibre laser is used in the experiments. The laser parameters are: full-width at half-maximum (FWHM) pulse length t ¼ 600±50 fs, central wavelength l ¼ 1930 nm, repetition rate of 1 MHz and a maximum pulse energy of 500 nJ. The beam is divided by a polarizing beamsplitter into two arms. The polarization angle of the beam in each arm is adjusted by half-wave plates to be parallel to the grating vector K in all experiments. The temporal delay between pulses is controlled by an optical delay stage and two wedge prisms with an opening angle of 0.5°for fine tuning, allowing for a precision of B200 as. Both laser beams are focused on the silicon grating by a single f ¼ 32 mm aspherical lens leading to two spots spatially separated about l ¼ 18 ± 1 mm with the 1/e 2 radii of w ¼ 7 ± 1 mm. For the phase-dependent measurements, the temporal delay between laser pulses is first set to 190±10 fs corresponding to the travel time of electrons between the two laser spots and then phase controlled by the wedge prisms. The electron beam is generated by a scanning electron microscope column (Hitachi S-series) and focused to a final 1/e 2 radius of w e ¼ 70 ± 20 nm with a divergence angle y 0 ¼ 1.1 ± 0.1 mrad and a probe current I p ¼ 3±1 pA. The electron beam energy was adjusted in the range of E k ¼ 25-30 keV to match the synchronicity condition in each experiment 29 . The width of the electron beam energy distribution is specified to be dE k B3 eV.
The distance d e ¼ 100±30 nm between the centre of the electron beam and the grating surface was chosen as a compromise between the transverse decay length of B100 nm (see below) of the accelerating mode and the clipping of the electron beam on the grating edge.
Accelerating and streaking element. Silicon gratings are fabricated from phosphorus-doped silicon substrates with a conductivity of 5-10 ohm cm. Semiconductor material is used to suppress charging of the grating. However, in the spectral region of our laser operation (l ¼ 1930 nm), silicon optical properties can be treated as dielectric. Nanopatterning is performed by electron beam lithography (JEOL JBX-6300) and reactive ion etching. The grating is prepared on a mesa structure 50 mm above the substrate surface to minimize electron beam clipping on the substrate edges. In the gating experiment, the grating period is l p ¼ 620 nm, the trench depth t d ¼ 400 nm and the trench width t w ¼ 45% of l p leading to synchronicity of the fundamental spatial harmonic with b ¼ 0.32 (28 keV) electrons. In the streaking experiment, a grating with a smaller period (l p ¼ 465 nm, t d ¼ 400 nm, t w ¼ 45% of l p ) is used and tilted with respect to the electron propagation direction at an angle of a ¼ 37°in the x-z plane (see Supplementary Fig. 4). In this geometry, the fundamental harmonic has a phase velocity synchronous with an electron velocity of b ¼ l p = l cos a ð Þ¼0:3 corresponding to an electron energy of 25 keV. The field amplitudes of the accelerating mode and the streaking mode decay exponentially with the distance from the grating surface as EðdÞ / expð À d=GÞ, where d is the distance from the sample surface and G ¼ bgl/(2p)E100 nm is the decay constant, with b ¼ v e /c and g ¼ ð1 À b 2 Þ À 1=2 (refs 27,30).
Detection set-up. Accelerated electrons are transmitted through a retarding field spectrometer that serves as an energy high-pass filter with applied DC retardation voltage U s . They are then detected by a Chevron-type micro-channel plate detector (MCP) and individual electron counts are temporally correlated with a fast photodiode signal detecting the laser pulses in a time-to-digital converter 35 . The accelerated electron signal forms a peak in the resulting histogram plot of MCP counts versus temporal delay between each count and the following laser pulse (Supplementary Fig. 5). The accelerated electron current is limited by the continuous thermo-emission electron beam used in the experiments. For laser-triggered field-emission electron microscopes, fA-pA current can be expected in optical gated operation 36 . For spatial filtering of the deflected electrons, a metallic knife edge with precise transverse in-situ motorized position control (motion in x-direction with precision of 1 mm) is placed in the electron beam 14 ± 0.5 mm downstream of the silicon grating.
Data processing. The count rate of accelerated electrons is obtained from each measurement by integrating the counts in the signal peak and subtracting the background count level by the relationship: where S(t) is the measured time-dependent signal, t 1 and t 2 represent boundaries of the integration time window which contains the acceleration signal, and t int is the time over which data is collected (see Supplementary Fig. 5). Experimental error of accelerated electron current (error bars shown in Figs 2 and 4 and Supplementary Fig. 1b) is due primarily to two causes. The statistical error is given by the ratio between the signal count rate S and the statistical noise , where N bg is the average background count level per bin detected out of the signal time window. The second contribution arises from the pointing instability of the electron beam. The focus position instability of approximately 10 nm causes a signal instability of 10% due to the transverse decay of acceleration and streaking fields.
Simulations. Electromagnetic fields of the accelerating mode (z-component shown in Fig. 1a) are calculated by a finite-difference time-domain technique. In the simulation, the grating has an infinite periodicity in the z direction so that Floquet periodic boundary conditions can be applied. The incident laser pulse is treated as a Gaussian pulse with electric field EðtÞ ¼ A expð À 2 ln 2t 2 =t 2 int Þ expðiotÞ, where A is the field amplitude, o is the laser circular frequency and the interaction duration t int ¼ t½1 þ bct=w ð Þ 2 À 1=2 describes the temporal and spatial overlap of the electromagnetic field with electrons moving perpendicularly to the laser propagation with velocity bc (ref. 30). The electron beam is described by a classical particle model with Gaussian profile of electron density n e ¼ expð À 2 ln 2y 2 w 2 e Þ with w e ¼ 70 nm and Coulomb repulsion neglected. We note that Coulomb repulsion effects are insignificant in our results due to the low electron current (pA) leading to less than 1 interacting electron per laser pulse. Single electron trajectories are calculated by numerical integration of the relativistic equation of motion with the Lorentz force d dt gm e v e ð Þ¼ q E þ v e ÂB ð Þusing fields obtained by finitedifference time-domain calculations, with g the Lorentz factor, m e the electron rest mass, v the electron velocity, E the electric field and B the magnetic field. To obtain the accelerated electron count rates shown in Figs 2a,b and 3 we numerically integrate the number of electrons with an energy gain DE k exceeding the difference between the initial electron energy and the spectrometer potential barrier (eU s -E k0 ). For the calculation of the phase-dependent electron count rate in the gating experiment (Fig. 2a), two consecutive Gaussian laser pulses with temporal separation Dt are used as the incident field. Extensive simulation results are shown in Supplementary Fig. 1 compared with measured data.
The theoretical curve shown in Fig. 2d, depicting the FWHM of the curves in Fig. 2c, is obtained by the following analysis. The accelerating field of both laser pulses is analytically approximated in the electrońs rest frame as: where E a0 is the field amplitude of the synchronous mode, t 0 is electron arrival time at the first spot, Dt is time delay between laser pulses and Dz is spatial separation distance of the two laser spots. The energy gain of individual electrons is obtained by integration of the accelerating field over time in linear approximation. Here the small velocity change of electrons (p1.2%) during the interaction with the first spot was neglected. Electrons with energy gain above a given threshold are numerically integrated leading to the oscillatory current as function of Dt.
The results of single-cycle gating of electrons shown in Fig. 3 are calculated for a structure containing only one grating tooth (profile shown in Supplementary  Fig. 6). Assuming the incident laser field is a plane wave and the grating is infinitely periodic in the z direction implies that the accelerating field is infinitely periodic. The energy gain of electrons is then periodic in their arrival time t 0 and it is not possible to resolve electrons accelerated by only a single optical cycle of the driving pulse. Hence a grating with at most a few grating teeth is required. The gated electron current depends on the initial electron bunch properties. Assuming an initial bunch length of t e ¼ 300 fs and a waist radius of the electron beam of w e ¼ 70 nm, the single-cycle gated electron current represents 0.3% of the initial electron current, which is highly attractive for time-resolved experiments requiring very high temporal resolution. Note that because of the small transverse beam dimensions we consider 1 electron per pulse or less as an ideal bunch charge 37 . We note that the small degradation of transverse electron beam properties does not cause the loss of spatial resolution for short electron propagation lengths after interaction with the laser field (for the behaviour of the transverse electron beam properties see the discussion of the beam emittance change in Supplementary discussion, Electron beam emittance after interaction with optical near-fields).
The intrinsic limit for the achievable temporal resolution of our proposed attosecond streak camera based on phase-dependent electron deflection is calculated as follows (laser power and phase fluctuations are not included in the calculations). The transverse angular streaking velocity is defined as v s ¼ djðt0 Þ dt0 , where j(t 0 ) is the deflection angle and t 0 the electron arrival time. Angular resolution can be written as dj ¼ arctanðdr=DÞ, where dr ¼ 10 mm is spatial resolution of electron detector and D ¼ 20 cm is the distance between detector and streaking element. The final temporal resolution is then given by , where y is transverse distance from the grating.
For the laser parameters used in the experimental data presented here (l ¼ 1,930 nm, t ¼ 600 fs and a peak field of 1.3 GV m À 1 ) and a transmission electron microscope with typical electron beam parameters (E k ¼ 100 keV, w e ¼ 1 nm), the temporal resolution equals dt ¼ 10 as, well below the atomic unit of time (24 as). We note that using double-sided structures, the spatial profile of acceleration mode can be changed to cosh(y/G) leading to constant acceleration field in the centre of the structure 38 . Such a mode will then even offer 10 as temporal resolution for larger electron beam diameters (10-20 nm). Operation with this temporal resolution will require intensity-and phase-stabilized laser source 39 .
Data availability. The data that support the findings of this study are available from the corresponding author upon request.