Transverse Electron Beam Shaping with Light

Interfacing electrons and light enables ultrafast electron microscopy, quantum control of electrons, as well as new optical elements for high sensitivity imaging. Here we demonstrate for the first time programmable transverse electron beam shaping in free space based on ponderomotive potentials from short intense laser pulses. We can realize both convex and concave electron lenses with a focal length of a few millimeters, comparable to those in state-of-the-art electron microscopes. We further show that we can realize almost arbitrary deflection patterns by shaping the ponderomotive potentials using a spatial light modulator. Our modulator is lossless, programmable, has unity fill factor, and could pave the way to electron wavefront shaping with hundreds of individually addressable pixels.


I. INTRODUCTION
The precise control of electrons facilitated microscopes that revolutionized materials science [1] and structural biology [2]. One of the key technologies for this was aberration correction [3,4]. While Scherzer realized [5] that spherical aberrations are unavoidable with static, circularly symmetric lenses, modern aberration correctors avoid this symmetry and enable both atomic-resolution imaging [3,4,6,7] and a finite degree of wavefront engineering. In light optics, spatial light modulators and mirror arrays allow for programmable arbitrary wavefront shaping, which has led to great advances [8], e.g. in astronomy, deep-tissue imaging, or optical information processing. This level of control is not yet available in electron optics, even though there are applications that would demand for it, such as random-probe ptychography [9], efficient structure identification [10], or optimized phase contrast microscopy [11][12][13].
Arbitrary, but not programmable, shaping of electron waves has been demonstrated based on the transmission of electron beams through suitably sculpted material thin films [14][15][16][17][18]. Despite inherent challenges regarding inelastic scattering, these novel electron-optical elements found applications in, e.g., aberration correction [19], the manipulation of orbital angular momentum [14,20], the generation of non-diffracting Bessel [21] and self-healing Airy beams [22], diffractive probe engineering [23,24], and contrast enhancement in biological imaging [25,26]. Nanofabrication gave rise to beam shaping devices based on tunable electro-and magneto-static potentials. While some of them are tailored to specific applications, such as symmetry mapping [27] or orbital angular momentum sorting [28], others realize on-axis arrays of individually * Corresponding author: thomas.juffmann@univie.ac.at addressable electron lenses for arbitrary wavefront shaping in reflection [29] or transmission [30,31]. Limiting factors are the achievable transmission, unwanted diffraction from sub-apertures, charging and beam-induced deterioration.
Electron wave-packets can also be shaped by optical fields in the vicinity of matter [32][33][34][35][36][37][38][39][40][41] enabling attosecond coherent control of the electron wave function as well as multidimensional nanoscale imaging and spectroscopy. Although these methods do not rely on nanofabrication techniques, they still suffer from inelastic scattering and material deterioration.
The control of electrons in free space through ponderomotive interaction with light avoids these problems. Kapitza and Dirac predicted that electrons could be diffracted at a standing light wave via a second-order process [42]. Early demonstrations include electron deflection [43] and diffraction [44,45]. Nowadays, ponderomotive electron-light interactions are used to characterize [46][47][48] and create [49] ultrashort electron pulses, to modulate the spectrum [50] and the phase [51,52] of electron beams. The challenges lie in interfacing electron optics with the required high-intensity light optics, which offers unity transmission, tunability, and does not cause inelastic scattering.
Here, we demonstrate controllable transverse shaping of free electrons into an arbitrary density profile using the ponderomotive potential of a spatially modulated light pulse. We realize the scheme in a modified scanning electron microscope (SEM), similar to the recently proposed optical free-space modulator (OFEM) technique [53]. Our OFEM has a pixel size of 4.3 µm (FWHM of focus spot), which in principle facilitates 2π phase modulation on an interaction plane of up to 1607 pixels, given the 17.2 µJ maximum laser pulse energy in our setup. Contrary to static, cylindrically symmetric, and energy preserving electron optics, we achieve both positive and negative lensing, as has recently been pro-posed in a similar setup [54]. We further can create almost arbitrary electron deflection patterns using shaped light fields.

II. SETUP
Experiments are carried out in a modified ultrafast scanning electron microscope (U-SEM, based on a commercial FEI XL30), as sketched in Fig. 1. The Vienna U-SEM features a laser triggered electron source, an optical setup for shaping ponderomotive potentials, and a hole in the bottom of the specimen chamber for experiments in transmission mode. An ultrafast laser (Coherent Monaco, wavelength λ = 1035 nm, pulse length ∆t = 280 fs, repetition rate 1 MHz, pulse energy < 40 µJ) is split using a 93:7 beam splitter.
The less intense beam is used to generate the forth harmonic (UV, 258 nm, < 2 nJ) with help of two Beta Barium Borate (BBO) nonlinear crystals. We then focus this UV beam onto the Schottky electron gun through a 15 cm focal length lens [55], aligning the polarization parallel to the tungsten nanotip with a half-wave plate (HWP). This creates a pulsed electron beam propagating through the column of the U-SEM.
The more intense infrared beam creates the ponderomotive potentials (IR, 1035 nm, < 17.2 µJ), after passing a delay stage that adjusts the timing (τ ) between IR and UV. The IR beam is then expanded to a (1/e 2 ) diameter of 7.5 mm and reflected off a water-cooled spatial light modulator (SLM, Meadowlark 1920x1152). The SLM shapes the wave-front of the laser such that the desired intensity distribution is created in the interaction plane of electrons and light, as well as in a conjugate plane used for beam characterization. We calculate the required patterns either via simple back-propagation, or via a modified Gerchberg-Saxton algorithm, which allows us to generate almost arbitrary light intensity distributions [56,57] (GSA, see Appendix A). After passing the interaction plane, the laser is out-coupled from the U-SEM specimen chamber, which minimizes heating effects in the chamber and enables additional temporal and spatial coarse alignment (see Appendix B).
The in-vacuum parts of the optical system are mounted to a custom U-SEM door (see inset in Fig. 1) that features a non-magnetic 2D piezo stage to align light and electron optics. The beams are overlapped using unprotected gold mirrors on copper substrate, which reflects the incoming light fields, but transmits the electrons through a central 1.5 mm hole. The beam shaping optics are mounted directly to the U-SEM door (see Appendix B). After interaction with the shaped laser pulse, the electron pulse propagates through free-space for d = 550 mm. It is then detected using a micro channel plate (MCP, see Appendix C).

III. PONDEROMOTIVE PHASE MODULATION
Consider the paraxial wave function of an electron travelling at a relativistic velocity v along the axial zdirection, ψ(r, t) = e iγme(vz−c 2 t)/ℏ ψ ⊥ (x, y, t), with m e the electron mass, γ = 1/ 1 − v 2 /c 2 the relativistic factor and ψ ⊥ the transverse electron wave shape. The electron shall be illuminated by a short laser pulse of moderate intensity, described by a vector potential A(r, t) with a temporal profile extending over 10 2 optical periods. Following [53] and neglecting the transverse electron motion, the light-induced velocity modulation, as well as electron-positron mixing, we can approximate the interaction by an effective scattering phase φ(r) = −(1/ℏ) ∞ −∞ dt U (r + vte z , t) imprinted onto the wave function, with the ponderomotive potential In our setup, the light intensity patterns are formed with optics of moderate numerical aperture (NA < 0.2), which implies A 2 z (r, t) ≈ 0. Hence, the potential does not depend on the light polarization. The small NA also entails that the depth of focus is larger than both the distance the electron propagates during the interaction and the dispersed axial width of the electron wave packet [58]. This is in contrast to the derivation in [53], where longer laser pulses were assumed, such that the electron would also interact with out-of-focus light. In our setting, each electron interacts with the total laser pulse in focus, making the scheme more energy efficient. This allows us to separate the temporal laser pulse profile, specified by a function u(t), from the transverse spatial profile, specified by g(x, y) and polarized along, say, the x-axis. For a laser pulse that co-propagates (upper sign) or counter-propagates (lower sign) with the electrons, the real-valued amplitude reads as with ω L = 2πc/λ L the central laser pulse frequency. For typical pulses much longer than the optical period, the field strength E 0 can be expressed in terms of the total pulse energy E L flowing through the xy-plane as Putting everything together, we arrive at a phase modulation of the transverse wavefunction, with α the fine structure constant, β = v/c, and E e = γm e c 2 the relativistic energy of the electron. We see that the phase is proportional to the ratio of pulse and electron energy times the normalized spatial light profile, while it does not depend on the temporal envelope of the laser pulse. See Appendix D for a detailed derivation.

IV. RESULTS
Figure 2(a) shows the experimental configuration with a converging (30 keV) electron beam. Figure 2(b)(top) shows the measured focused light intensity before being demagnified (5x) to the interaction plane. The focus spot of the light pulse in the interaction plane has a FWHM of 4.3 µm, which represents the diffraction limited minimum spot size in our setup. Figure 2(b)(bottom) shows the electron intensity distribution observed at the MCP for a laser pulse energy of 6 µJ, an electron beam radius in the interaction plane of ρ 0 = 17.5 µm, and a distance from interaction plane to cross-over of d c = 5.9 mm. Figure 2(c) compares these experimental results to wave optics (top) and ray tracing (bottom) simulations, yielding good agreement. In the wave optics model, we assume a spherical wavefront of the incoming converging beam in Fresnel approximation and compute the ponderomotive phase Eq. (4) for a circularly symmetric fit to the measured light distribution in (b). In the ray optics simulation, we treat the electrons as ballistic particles and hence the ponderomotive interaction as a position-dependent transverse momentum kick [59] by δp T = ℏ∇φ(x, y). Details of both methods can be found in Appendix E. They yield similar results for the high laser intensities considered here; a 6 µJ laser pulse amounts to a phase shift in the beam center of 950 rad. Small differences due to diffraction could not be observed due to the finite spatial resolution of the detector (see Appendix C). Considering previous electron pulse length measurements performed in a similar system [58], we can therefore assume that, at perfect timing overlap, all electrons see almost the same transverse light intensity distribution. For timing mismatches of ±2τ , the electrons interact with a more defocused light pattern, and the ponderomotive signature is weaker. LG00 LG10 Next, we show that ponderomotive potentials can realize both convex and concave lenses. This is in stark contrast to static, cylindrically symmetric, and electron energy preserving electron optics that can only realize a convex lens, if there are no charges on the optical axis [5]. A convex (concave) lens applies a phase shift to an incoming beam that decreases (increases) quadratically with distance ρ from the optical axis, ϕ(ρ) = ∓πρ 2 /λ e f , with λ e = h/γm e v the deBroglie wavelength of the electron. This can be realized close to the center of focused Laguerre-Gaussian (LG) beams with radial index p = 0. For an azimuthal index l = 0 (LG00), the Taylor expansion of the spatial distribution is given by , which corresponds to a concave lens. For l = 1 (LG10) one obtains g 2 10 ≈ ρ 2 /w 2 10 − O(ρ 4 /w 4 10 ), which corresponds to a convex lens. In both cases, w denotes the beam waist of the respective mode. Figure 3 demonstrates controllable ponderomotive lensing. The central panel in (a) shows the detected electron distribution without laser interaction, the left (right) panel shows the detected intensity upon interaction with an LG00 (LG10) mode at a pulse energy of 2.5 µJ (3.1 µJ). The experimental LG light intensity distributions are shown as insets in Fig. 3(b), as measured in the conjugate plane at a magnification of 5×. The converging electron beam illuminates the central part of these distributions, where the quadratic approximations FIG. 4. Programmable electron beam shaping: detected electron distribution after interaction with shaped light fields. For (a) to (c) the SLM was used to add vertical trefoil, coma, or astigmatism (scalebar 1.1 mm) to the incoming light field. In (d) a Gerchberg-Saxton-algorithm was used to shape the light field into a distribution resembling a Smiley, which also appears in the detected electron distribution (scalebar 1.2 mm).
are valid (R ∼ 0.8 µm, d c ∼ 241 µm). We deduce the focal length of the ponderomotive lens from the radius ρ s of the measured electron distribution using a ray optics model, f = dρ 0 /(ρ 0 − ρ s + dθ ρ,0 ), with ρ 0 and θ ρ,0 the maximum radius and convergence angle of the electron beam in the interaction plane and d the distance from the interaction plane to the screen (see Appendix E and F). The focal length is given by Figure 3(b) shows this deduced focal length as a function of laser pulse energy for the convex (orange) and concave (blue and green for two independent data runs) lens. The solid line is calculated according to Eq. (5), where we get E L and w from fitting the measured light distributions (see Appendix F). The gray-shaded areas denote a 5% uncertainty of the width that we estimate from the fit. We see good agreement between theory and experiment, except for two data points taken at low pulse energies. When the observed electron beam width is close to ρ s (E L ) ≈ ρ 0 + dθ ρ,0 , alignment is difficult, and small errors can lead to a sign change in f (E L ). At higher pulse energies, we see that we can reach focus lengths down to 1.6 mm, comparable to those found in modern TEMs.
In Fig. 4, we demonstrate programmable electron beam shaping at a laser pulse energy of 6 µJ. First, we use the SLM to add trefoil, coma, or astigmatism to the optical beam leading to the characteristic electron deflection patterns in panels (a) to (c), respectively. The electron beam settings are the same as in Fig. 2 Fig. 4(d) shows a smiley imprinted onto the electron beam (d c = 8.4 mm, ρ 0 = 24 µm). While for all other figures, we calculate the phase pattern applied to the SLM using back-propagation from the conjugate plane to the SLM, we here use a GSA with 20 iterations to converge to the desired pattern (see Appendix A).

V. DISCUSSION
Our experiments show that we can deflect electron beams almost arbitrarily by shaping ponderomotive potentials. The spatial shapes are only limited by diffraction as well as by artefacts induced by the hole in the 45 degree mirror; our currently used diameter of 1.5 mm facilitates alignment, but could be reduced in future setups. Smaller features would be possible using light of shorter wavelength or higher numeric aperture. However, such measures also reduce the depth of field of the shaped intensity distributions, which sets constraints on the pulse lengths of electrons and light.
Although we operated our setup in the high-power limit, typical wave-front shaping applications demand lower laser pulse energies. At 30 keV, the energy density required to achieve a ponderomotive phase shift of 2π is 0.58 nJ/µm 2 . Our system, which offers an IR pulse energy in the interaction plane of up to 17.2 µJ, could therefore support the shaping of an area with a radius R ≲ 97 µm, corresponding to N ∼ (2 * R/FWHM) 2 = 1607 individual pixels.
A miniaturized version of our setup could also be implemented in ultrafast electron microscopes [60][61][62], where it could be used for aberration correction [19,30]. It has been shown that 100 addressable pixels could effectively correct spherical aberration [30]. With similar light focusing capabilities as described here, 100 addressable pixels with 2π phase modulation capability can be realized by shaping potentials on a disc with ρ 0 ≃ 25 µm. Modern TEMs provide the required level of coherence across such an area [63]. In a counter-propagating mode, a total pulse energy of 2.2 µJ would suffice for 300 keV electrons, which is readily available at repetition rates of tens of MHz.

VI. CONCLUSION AND OUTLOOK
In this work, we have demonstrated programmable transverse beam shaping of free electron beams. The technique is based on ponderomotive potentials from high intensity laser pulses, which are shaped using a spatial light modulator. We have shown that we can create both a convex and a concave lens, the latter being impossible with traditional electron optics. We achieve focal lengths down to 1.6 mm, which is comparable to the focal length of an objective lens in a TEM. Future experiments might use consecutive laser pulses for realizing complex electron optical systems made from light, similar to schemes used for the creation of attosecond pulse trains [49]. We have further demonstrated our ability to imprint complex patterns and arbitrary images onto an electron beam, with applications in fast and shaped beam blanking. Our work paves the way to lossless electron wavefront shaping with hundreds of individually addressable pixels. This could have applications in aberration correction [19,30] of pulsed electron microscopes [64], if the optical modula-tor is installed in a suitable plane within the microscope. Our shaping technology avoids scattering, sub-aperture diffraction, and loss, the latter being especially important for pulsed electron microscopes, where the small electron current leads to long acquisition times, and consequently to stability issues. Further studies are required to show whether ponderomotive electron beam shaping can reach the noise levels present in current aberration correctors [65,66]. Most importantly, programmable ponderomotive shaping could be used for applications intractable with traditional aberration correctors: These include the creation of exotic beams [21,22], probe engineering [23,24], pulsed ponderomotive phase plates for phase microscopy [51], and other adaptive measurement techniques [10,11,13] that maximize the extracted information in a sample-specific way.  Figure 5 shows the light intensity patterns used to shape the electron beam in Figs. 2, 3, and 4. The images were taken outside of the SEM, in a plane conjugate to the interaction plane (target plane). The optics that image these patterns into the interaction plane also demagnify them by a factor 5x. To calculate the SLM phase masks that create these intensity distributions, two different algorithms are used. Both are based on Fresnel propagation. They take the finite aperture of our system into account, as well as the hole in the 45 degree mirror, which is simulated as a beam block (see Fig. 6(a)). The latter prevents loss within the hole, and therefore avoids heating in the SEM chamber. While it does affect the quality of the resulting intensity distributions, the effect is acceptable for our proof-of principle experiments. The diameter of the hole in the current implementation is 1.5 mm. The first algorithm is used for the Gaussian and the Laguerre-Gaussian focal spots in Fig. 5(a), as well as for the intentionally aberrated focal spots in Fig. 5(b). A Gaussian focal field is back-propagated from the target plane to the SLM. The resulting phase distribution (ϕ G ) applied to the SLM yields the approximately Gaussian intensity distribution in Fig. 5(a). Additional phase patterns are then added in order to create the Laguerre-Gaussian focal spot ϕ LG10 = arg(x + iy), as well as the spots affected by trefoil ϕ Z −3 3 = π(−x 3 + 3xy 2 ), coma ϕ Z −1 3 = π(−2x + 3x 3 + 3xy 2 ) and astigmatism ϕ Z 2 2 = π(−x 2 + y 2 ). Here, x and y are the cartesian coordinates on the SLM in units of R SLM = 5.3 mm, which denotes the radius of the area that is modulated by the SLM. Z m n signifies the Zernike polynomials characterizing the specific aberration.
The second algorithm is used for arbitrary patterns, like the smiley in Fig. 5(c). It is based on the Gerchberg-Saxton algorithm (GSA) [56], as schematically described in Fig. 6(b). The algorithm is initiated with the target amplitude and a constant phase (E 1 ). The field then iteratively propagates between the SLM and target plane, taking into account the transmission function of the beam block (T bb ) and the lens (T L ). In the SLM (target) plane, the amplitude of the calculated field is replaced by the amplitude of the incoming (desired) field. For the smiley, 20 iterations showed the best experimental results. While more iterations improved results in the simulation, the experimental results deteriorated due to the emergence of speckle [57].
In both algorithms the desired pattern is offset from the optical axis. This leads to an additional blazed grating on the SLM, which effectively separates the desired intensity pattern from the unmodulated beam that is reflected off the SLM [67]. On top of that, the positioning of the laser beam with respect to the electron beam can be adaptively optimized. Finally, the aberrations of our optical setup are partially compensated by an additional phase mask that was found by optimizing the experimentally obtained Gaussian focus spot.   Fig. 7(a), left), and holds the SLM optics for shaping the laser pulses. An active beam pointing stabilization system (Aligna, TEM-Messtechnik) is used to counteract pointing instabilities (25 µrad according to the specifications of our laser), as well as vibrations and drifts between the laser system and the SEM. Inside the chamber ( Fig. 7(a), right), the setup for overlapping light and electrons is placed right under the objective lens of the SEM. The whole system is attached to the SEM door, and the optics are mounted on a 2D piezo stage to facilitate alignment with the electron beam. Light enters and exits the setup through a CF 100 window in the SEM door. The green arrows mark the in-coupling and outcoupling lenses, and the blue arrows mark the mirrors that overlap the two beams.
We establish the spatial and temporal overlap between electrons and light in a multi-step process. First, a fast timing scintillator (BC-408) is placed in the interaction plane and imaged onto a CMOS camera outside of the vacuum. This is achieved using an additional manually operated mechanical stage designed to fit into the narrow space between the two lenses. This allows finding spatial overlap between the transmitted IR light and the photons triggered by the incoming electron beam. These photons are further time-stamped with a fast single photon detector (SiPM, KETEK PM1125) [68] to reduce the timing mismatch to within ∼ 200 ps. Second, overlap in the interaction plane is established doing pump-probe measurements with a copper TEM grid placed in the interaction plane [69]. Finally, the copper grid is removed and the overlap between IR laser and electrons in free space is confirmed by measuring electron deflections caused by strong pondemorotive potentials. Fig. 7(b) shows simulated ponderomotive potentials as they were used for the temporal and spatial alignment in Fig. 2(d).

Appendix C: Electron detection
For electron detection, we use a microchannel plate detector (Tectra GmbH, MCP-025-D-L-F-V-P43-6MI) in chevron configuration, followed by a phosphor screen (P43) and optical read-out using a lens (Kowa, LM35HC) and CMOS (FLIR, GS3-U3-23S6M-C) camera. A 2x2 median filter is applied to all electron beam images to avoid dead pixels.
To characterize the point-spread function of our detector, we recorded 31 single electron detection events at the gain settings that were used in the experiments. We first fit the detection events with a Gaussian distribution to find their center. We then plot the radial distribution of counts (see Fig. 8), which is well represented by a Voigt profile (red) with a FWHM of (99.9 ± 0.3)µm .

Appendix D: Ponderomotive Interaction
Here we derive the light-induced phase modulation of an electron beam in free space, using SI units throughout. We define the direction of propagation to be the zaxis and assume the electron waves travel at a relativistic mean velocity v = ve z , which sets the Lorentz factor as γ = 1/ 1 − v 2 /c 2 and the energy as E e = γm e c 2 . In such a setting, the electron wave function ψ can be factorized into the rapidly oscillating plane-wave component at E e and a slowly varying envelope ψ ⊥ that accounts for the transverse wave profile, Assuming that light-induced variations of the electron energy be small compared to the initial energy E e (called non-recoil approximation), it is shown in [53] that the Dirac equation for the electron state reduces to the effective Schrödinger equation with the effective interaction potential Here, A and Φ are the real-valued vector and the scalar potential of the light field, respectively. By integrating Eq. (D2), we find that the evolution of the state ψ ⊥ between two times t 0 and t 1 can be expressed as The free propagation amounts to a position shift while the light field contributes an additional phase modulation. In fact, if we choose a sufficiently large interval (t 0 , t 1 ) → (−∞, ∞) that covers the whole duration of the electron-light interaction, Eq. (D4) can be understood as the instantaneous scattering transformation from the incoming to the outgoing electron wave evaluated at the same time, with the scattering phase φ(r) = − dt ′ U (r + vt ′ , t ′ )/ℏ. The time coordinate t marks the scattering event, i.e. the point in time when the electron wave packet hits the light pulse.
Regarding the interaction potential from Eq. (D3), notice that we may fix the gauge such that Φ = 0 and we can safely neglect the term v · A as we integrate the optical field over a pulse length of 10 2 periods [53]. Hence we may omit the respective terms in U .
Given a paraxial light pulse (as focused by moderate numerical apertures) with central frequency ω L that propagates in the ±z-direction and is linearly polarized along x, the associated complex-valued electric field can be written as with E 0 the characteristic field strength, g(x, y) the transverse mode profile, and u(t) the temporal pulse envelope. For simplicity, these three terms are taken to be realvalued in the following. The real-valued vector potential in Eq. (D3) is related to the physical field amplitude via For the temporal pulse width considered here (∆t = 280 fs), the envelope u(t) varies on much greater time scales than the optical oscillation period (2π/ω L = 3.5 fs), which allows us to write the vector potential to leading order as Plugging this into Eq. (D3), the scattering phase becomes In the last line, we substitute t ′ ∓ (z + vt ′ )/c → t and introduce β = v/c. As a next step, we can write sin 2 (ω L t) = [1 − cos(2ω L t)]/2 and neglect the integral over u 2 (t) cos(2ω L t) due to the slowly varying pulse envelope, which leaves us with the ponderomotive scattering phase averaged over the fast optical oscillation, Notice that the phase no longer depends on the zcoordinate, which is consistent with the paraxial regime for both light and electron waves. Finally, we can express the laser field amplitude in terms of a more directly accessible parameter. To this end, consider the field energy flowing through the xyplane per unit area and time, as described by the Poynting vector S = Re{E} × Re{H} with H = cε 0 e z × E to leading order. The measured laser pulse energy E L is obtained by taking the integral of |S| over the plane and over time, which leads to assuming once again a slow temporal pulse profile. We can now eliminate this profile and the field strength in the ponderomotive phase (Eq. (D9)) and simplify This equals the expression given in the main text, with α the fine structure constant and λ L = 2πc/ω L the pulse wavelength. The transverse light beam profile g 2 (x, y) is divided by its integral and can thus be given in arbitrary units. Moreover, the phase is Lorentz covariant since it reads the same in the electron rest frame where

Appendix E: Free electron propagation
The wavefunction of a freely propagating relativistic electron can be expanded in terms of plane-wave bispinor solutions to the Dirac equation [70]. Given the momentum p and the spin-1/2 state |s⟩, the solution reads as Ψ p,s (r, t) = 1 N p e i(p·r−Ept)/ℏ |s⟩ c Ep+mec 2 p ·σ|s⟩ , (E1) with E p = m 2 e c 4 + p 2 c 2 the energy, N p = (E p + m e c 2 )/2E p a normalization factor, andσ = (σ x ,σ y ,σ z ) the Pauli matrices. The electronic character of the solution (E p > 0) and the spin state are preserved under the free evolution. Hence, a spatial wave packet of fixed spin can be expressed in terms of a scalar field ψ(r, t), Note that the (unnormalized) positronic field component χ can be obtained from the scalar wavefunction ψ via (iℏ∂ t + m e c 2 )χ = ℏcψ. The electronic wave function ψ obeys the Klein-Gordon equation, Here, we consider paraxial electron waves with a relativistic forward velocity v along the z-axis, such that E p = E e = γm e c 2 and p = γm e v. Replacing ℏ 2 ∂ 2 t → −E 2 e in the Klein-Gordon equation, we arrive at the Helmholtz wave equation, (∇ 2 + k 2 )ψ = 0, with the effective wave number k = E 2 e − m 2 e c 4 /ℏc = γm e v/ℏ. Propagation of the electron waves through the apertures of our experiment can thus be described using Fresnel diffraction theory.
We remark that, for the numerical simulation of electron pulses in our experiment, we ignore the spread of forward velocities around the mean value v. Its impact on the results is negligible compared to other uncertainties such as the finite resolution in the detector.

Wave optics simulations
In order to verify the measured light lensing effect, we compute the Fresnel diffraction image of a paraxial electron wave of forward velocity v, after it interacted with a light pulse via the ponderomotive potential. Omitting constant prefactors and assuming a circular aperture of radius R in the interaction plane, the electron density distribution in the detection plane at the effective distance d reads as (E4) For a circularly symmetric ponderomotive phase φ(r) = φ(ρ) and for a centered and converging incident wave ψ (in) ⊥ ∝ exp(−ikρ 2 /2d c ), with ρ = x 2 + y 2 , we can switch to polar coordinates and simplify Here, we have substituted ξ = (ρ/R) 2 and introduced Φ(ξ) = φ(R √ ξ) and the dimensionless parameters κ = kR 2 /d and δ = (d c − d)/2d c . Carrying out the angular integral would yield the Bessel function J 0 (κ √ ξρ S /R), and the remaining ξ-integral could be computed numerically. However, we have κ, |δ| ≫ 1 and a strongly varying phase Φ in our setting, which renders direct numerical integration methods unstable.
A viable alternative is to first perform a stationary phase approximation of the ξ-integral in Eq. (E5) and then compute the remaining θ-integral numerically. To this end, let F (ξ) denote the total complex phase under the integral and ξ n ∈ (0, 1) be all non-degenerate stationary points such that F ′ (ξ n ) = 0 and F ′′ (ξ n ) ̸ = 0. Explicitly, the points depend on θ and are solutions to 2 √ ξ n [κδ + Φ ′ (ξ n )] = κ sin θρ S /R. We may then approximate For the wave optics simulations of the Gauss and the Laguerre-Gauss light pulses in the main text, we had a numerical solver find ξ n ∈ (0, 1) for each relevant value of sin θρ S /R, compute Eq. (E6), and finally evaluate the θ-integral. The resulting radial diffraction pattern I(ρ S ) was then mapped onto a two-dimensional grid of 2001 × 2001 detector pixels and smeared over the finite detector pixel size as described in Sec. C.

Raytracing simulations
For direct comparison, we compute the light-induced electron lensing using the approximation of geometric optics. This omits diffraction effects and treats the electrons as ballistic particles moving on piecewise rectilinear trajectories (rays).
Each ray is initialized in the interaction plane with its transverse position and its angle with respect to the optical axis: η ⊤ 0 = (x 0 y 0 θ x,0 θ y,0 ). For a convergent probe, the angles are given by θ x,0 = x/d c and θ y,0 = y/d c where d c is the distance from the interaction plane to the electron crossover. The interaction with the ponderomotive potential changes the angle in x-direction as θ x,1 = θ x,0 + ℏ∇ x φ(x, y)/p z , and analogously in ydirection. Here, p z is the longitudinal momentum. Interaction induced changes in p z can be neglected. The positions x 0 and y 0 remain unchanged in the thin optics approximation. Free space propagation to the screen (distance d) is calculated as η s = Sη 1 , where S is the free-space propagation matrix: The raytracing simulation in Fig. 2(c)(top) was done using the Monte-Carlo method with 5 × 10 5 randomly sampled starting conditions. For the perfect lens calculations shown in Fig. 3(b), the ponderomotive interaction is described analytically using the ABCD matrix of a thin lens L: where the focus length can be calculated according to Eq. (F3) and Eq. (F5). The electron trajectories at the screen are then described as η s = SLη 0 . We get an analytic expression for the radius of the beam on the screen, where ρ 0 and θ ρ,0 are defined by the outermost incoming beam.
Our simulation results in the main text agree well with both the measured images and the Fresnel wave diffraction results.

Appendix F: Lens calculation
We now consider the ponderomotive phase of circularly symmetric light pulses in order to realize electron lenses. An ideal lens for electrons of wavelength λ e would impart a phase modulation to the electron wave that is quadratic in the distance ρ = x 2 + y 2 to the optical axis, Whereas the focal length f is positive for convex lenses and negative for concave lenses.

Convex lens
The negative quadratic phase modulation of a convex lens can be realized in the center of a focused Laguerre-Gauss mode with radial index p = 0 and azimuthal index l = 1 (LG10). The spatial intensity profile of LG10 is then given by where w 10 is the beamwaist of the Laguerre-Gauss mode. Using a Taylor expansion around ρ/w 10 = 0, we get the desired ρ 2 -dependence with g 2 10 ≈ ρ 2 /w 2 10 − O(ρ 4 /w 4 10 ). We can now calculate the focal length of the ponderomotive electron lens. We insert Eq. (F2) into the denominator in Eq. (D11) and its Taylor expansion into the numerator, and compare the coefficient of the quadratic term with Eq. (F1). Eventually we get The experimentally recorded intensity distribution shown in Fig. 9(a) is not a perfect LG10 mode. Most notably, the intensity does not go to 0 in the center, and higher diffraction orders from the SLM make up for a significant fraction of the measured pulse energy. This is taken into account by fitting the distribution with the LG10 Exp.
LG10  sum of a dominant LG10 and a minor LG00 mode for the intensity observed in the center. The residuals of this fit are shown in Fig. 9(b) and amount to up to 5.3% of the peak intensity, and less than 2.6% at the central part of the beam which is illuminated by the electrons. The fitted distribution makes up for 56% of the total laser power. Figure 9(c) shows a crosscut through the fit and its LG10 and LG00 components, along with a quadratic fit to the center of the distribution. The quadratic coefficient is dominated by the LG10 component, for which we get a waist of w 10 = 4.51 (22) µm. In the experiment, the maximum energy within the fitted distribution is E L = 3.1 µJ, for which we get a focal length of f = 4.5 mm. Figure 9(d) shows the measured diameter of the electron beam on the detector. Due to the asymmetry in the light distribution that is visible in the residuals, slightly cylindrical lensing is observed in the experiment. Both here, and in the calculation of the focal length, we use the geometric mean between the fitted minor and major axis of the electron beam distribution at the MCP, which we deduced using the Otsu segmentation method in the image processing tool Fiji [71]. Figure 9(d) also shows a linear fit to the data (orange), as well as the theoretical expectation from Eq. (F3) (dashed line). Note also that our experimental 5% error in determining the waist of the beam enters the equation to the fourth power, which yields the shaded area in the plot. The two outliers at small pulse energies were not taken into account in the fit. These are most likely due to misalignment which proofed difficult at low pulse energies. Apart from these outliers, we see that the measurement became more unstable at higher pulse energies, most likely due to thermally induced misalignment.

Concave lens
The positive quadratic phase distribution for a concave lens can be achieved with a Gaussian intensity distribution. The spatial intensity profile of the Gaussian beam is given by and its Taylor expansion around ρ/w 00 = 0 gives us g 2 00 (ρ) ≈ 1 − 2ρ 2 /w 2 00 + O(ρ 4 /w 4 00 ). LG00 Exp.
LG00  We calculate the phase modulation according to Eq. (D11) and compare the coefficient of the quadratic term to retrieve the focal length of the electron lens f (E L ) = −(1 ∓ β) π 3 w 4 00 E e 2αλ 2 L λ e The experimentally recorded intensity distribution shown in Fig. 10(a) is not a perfect Gaussian. Most notably, there's an outer diffraction ring, as well as higher diffraction orders from the SLM, that account for a significant amount of the measured laser pulse energy. This can be seen in the residuals of the Gaussian fit ( Fig. 10(b)). The electrons only hit the central part of the distribution, where the error is < 3%. The fitted Gaussian makes up for 45% of the total laser power and has a width of w 00 = 3.65(18) m. Figure 10(c) shows a crosscut of the Gaussian, along with a quadratic fit to it. In the experiment, the maximum energy within the Gaussian is E L = 2.5 J, resulting in a focal length of f = −1.6 mm. Figure 10(d) shows the measured diameter of the electron beam on the detector, a linear fit to the data (orange), as well as the theoretical expectation according to Eq. (F5) (dashed line). Note that our experimental 5% error in determining the waist of the beam enters the equation to the fourth power, which yields the shaded area in the plot.