Optical-cavity mode squeezing by free electrons

Abstract The generation of nonclassical light states bears a paramount importance in quantum optics and is largely relying on the interaction between intense laser pulses and nonlinear media. Recently, electron beams, such as those used in ultrafast electron microscopy to retrieve information from a specimen, have been proposed as a tool to manipulate both bright and dark confined optical excitations, inducing semiclassical states of light that range from coherent to thermal mixtures. Here, we show that the ponderomotive contribution to the electron–cavity interaction, which we argue to be significant for low-energy electrons subject to strongly confined near-fields, can actually create a more general set of optical states, including coherent and squeezed states. The postinteraction electron spectrum further reveals signatures of the nontrivial role played by A 2 terms in the light–matter coupling Hamiltonian, particularly when the cavity is previously excited by either chaotic or coherent illumination. Our work introduces a disruptive approach to the creation of nontrivial quantum cavity states for quantum information and optics applications, while it suggests unexplored possibilities for electron beam shaping.


Introduction
The generation of different states of light is of fundamental interest in quantum optics and enables powerful applications such as the increase in sensitivity achieved in the interferometric detection of gravitational waves through the use of squeezed states with reduced uncertainty [1]. Likewise, the generation of approximate Gottesman-Kitaev-Preskill (GKB) states [2] is needed to implement fault-tolerant quantum computing on photonic setups [3]. In this context, quantum two-photon states are commonly produced by exploiting the nonlinear response of some materials to coherent laser illumination through processes such as four-wave mixing [4] and parametric down-conversion [5] assisted by bright modes in optical cavities. In a radically different approach, free electrons have been identified as a promising tool to generate quantum light states [6,7]. In addition to the nanometer precision with which electron beams (e-beams) can be focused on an optical cavity, they are advantageous with respect to external light excitation in that they can interact with strongly confined dark modes because they act as broad sources of evanescent fields [8].
The interest in generating low-uncertainty states through e-beams dates back to the early stages in the development of free-electron lasers, when several theoretical works predicted this kind of statistics in the free-space radiation emission from a linear wiggler [9][10][11]. More recently, with the advent of ultrafast electron microscopy [12][13][14], the experimental ability of integrating intense laser sources and e-beams in a single setup allowed for their synchronized interaction at the specimen, giving rise to the so-called photon-induced near-field electron microscopy (PINEM) [15]. In this technique, the strong inelastic electron coupling to optical fields scattered by the specimen results in the absorption and emission of multiple light quanta, causing a substantial reshaping of the electron wave function as well as the state of the cavity modes targeted by the laser at the specimen.
From the point of view of the electron, such reshaping consists in the emergence of intense sidebands in the electron spectrum spaced by the laser photon energy [16]. Interestingly, upon further propagation over macroscopic distances, coherent electron components possessing different energies (and velocities) evolve into a train of attosecond pulses [17][18][19]. In addition, our ability to manipulate the electron density matrix can be extended by using squeezed light instead of coherent laser sources [20].
From the perspective of an optical mode in the specimen, the electron is known to simply act as a displacement operator on the coherent state produced by the external illumination [21]. In particular, the electron-cavity interaction leads to a density matrix with Poissonian diagonal elements when the cavity is initially prepared in the ground state [20]. Although more complicated states can be obtained from consecutive interactions with multiple electrons combined with projective measurements onto specific electron states [6,22,23], single electrons have so far been regarded as a semiclassical current acting on the specimen. This is indeed a robust assumption for energetic electrons whose velocity v is negligibly perturbed by the interaction (nonrecoil approximation), provided linear terms in the electron-light coupling Hamiltonian (i.e., ∝ v · A, where A is the vector potential) are dominant over ponderomotive ∝ A 2 contributions. This condition is, however, challenged for an electric field associated with a mode polarized normally to the electron propagation direction, or when sign cancellations render a vanishing linear coupling coefficient, as well as when low-energy electrons such as those used in low-energy electron microscopy (LEEM) [24,25] (≲ 100 eV) are made to interact with cavities supporting resonances in the infrared range. In fact, when linear and quadratic A terms have similar strengths in the coupling Hamiltonian, we expect the effect of a single electron on a cavity mode to deviate from the classical-current description, leading, for instance, to the direct production of squeezed cavity states.
In this work, we study the interaction of a free electron with a single-mode cavity under conditions in which linear and ponderomotive interactions have commensurate strengths or when the latter dominates ( Figure 1). We start by developing the theory describing the interaction of a fast electron with a single-mode cavity in the nonrecoil approximation including the effect of the quantized ponderomotive coupling, thus allowing us to study the interaction with poorly populated cavities and compute observables connected with the mode. This is in contrast to previous works that incorporated a classical description of the vector potential and, therefore, implicitly assumed that the cavity was prepared in a high-fluence coherent state [26][27][28]. Remarkably, the entire dynamics admits an analytical solution in terms of the consecutive action of a displacement operator and a squeezing operator. Then, we theoretically demonstrate that a cavity starting from its ground state is left in a general two-photon coherent state [29] after interaction with a single electron, including Figure 1: Free-electron interaction with an optical cavity. We present a sketch of the interaction for a single-mode cavity. Both linear (∝ v · A) and quadratic (ponderomotive ∝ A 2 ) terms in the quantum vector potential operator A are present in the minimal-coupling light-matter interaction Hamiltonian. Switching on and off these two terms selects the creation of either coherent or squeezed cavity mode states, respectively.
vacuum-, phase-, and amplitude-squeezed states. Finally, we study how the presence of the ponderomotive interaction can lead to asymmetric distributions in the electron spectrum both when the cavity is initially heated (i.e., prepared in a thermal state) or when it is irradiated by laser light (i.e., in an initial coherent state). Besides their relevance from a fundamental viewpoint, our results suggest a way to produce nonclassical states of light in a given dark mode that is accessible to electrons by coupling to the evanescent components of their accompanying electric fields.

The evolution operator
Following the methods introduced in Ref. [21], we start by considering a structure characterized by a single photonic mode of energy ℏ 0 satisfying a bosonic statistics and interacting with an incoming electron initially prepared with a wave function 0 (r, t) = e i(E 0 t∕ℏ−k 0 ⋅r) 0 (r − vt). This expression assumes that 0 (r, t) is made of momentum components that are closely peaked around a value ℏk 0 corresponding to a central energy such that the function 0 (r − vt) varies slowly in space and time. By further assuming the lifetime of the photonic mode to be much longer than the electron-specimen interaction time, and adopting the nonrecoil approximation, the dynamics of the combined electron-cavity system can be well described by the Schrödinger equation iℏ t | (r, t)⟩ = ( 0 + int )| (r, t)⟩ with free and interaction Hamiltonians given by (see Methods, Section 4.1.1) is the quantized vector potential operator incorporating the normalized electric field mode profile ⃗  0 (r), the sum over i runs over Cartesian components, and the vector g = (e 2 ∕ 2m e c 2 )(1, 1, −2 ) with approximate relativistic corrections in the ponderomotive interaction. We remark that the nonrecoil approximation that we adopt to describe the electron-cavity interaction is reasonable provided the condition ℏ 0 ∕E 0 ≪ 1 is satisfied (e.g., for keV electrons and cavities resonating at visible or lower frequencies). More precisely, as shown in Ref. [30], the solution including recoil already converges to the nonrecoil limit for ℏ 0 ∕E 0 ∼ 0.3. For example, it is safe to ignore recoil for interaction strengths leading to ∼ 25, using E 0 ∼ 5 eV electrons that couple to a ℏ 0 ∼ 60 meV cavity.
As explained in detail in Methods, Section 4.1.2, given the initial condition ∑ n 0 n e −in 0 t |n⟩ (i.e., uncorrelated electron and cavity states), the problem admits an analytical solution that represents a generalization to the one found in Ref. [21], including the effect of the single-mode ponderomotive force [the A 2 terms in Eq. (15b)]. More precisely, taking the electron velocity as v =ẑ, we find | (r, t)⟩ = 0 (r, t) ∑ ,n e i 0 [ (z∕ −t)−nt] e i n (r) f n (r)|n⟩, (2) where the phases n = − porate a dependence on the mode field and electron velocity through For the sake of simplicity, we hereinafter do not explicitly indicate the dependence on the electron position vector r.
The expansion coefficients f n in Eq. (2) can be written as f n (r) = 0 n+ e ĩFn (4) in terms of the matrix elements whereŜ( 0 ) = e 0 aa∕2− * 0 a † a † ∕2 andD(̃0) = ẽ * 0 a † −̃0a are squeezing and displacement operators, respectively. The central operator e −i (a † a+aa † )∕2 is an exponential of the number operator, and therefore, it does not create or destroy excitations, so it just introduces a phase −(n + 1∕2) when applied on a Fock state |n⟩. This phase is often negligible when 0 ∼ 0 (e.g., for a phase-matched interaction; see Section 2.1.2). Incidentally, an overall phasẽemerges in Eq. (4) as a result of the retarded elastic image interaction between the electron and the cavity [31], but such phase is irrelevant for this study. In Eq. (5), we introduce the squeezing and displacement coefficients as well as = arg{ }. These quantities are directly obtained from the solution of the Ricatti differential equation [32] and Interestingly, by differentiating Eq. (7), we readily verify that and satisfy the unitary condition of a generalized Bogoliubov transformation, [33]. Also, when the ponderomotive force is neglected, the displacement factor̃0 becomes identical with the coupling factor found in Ref. [21]: 0 = We remark again that, given any distribution of the vector field ⃗  0 (r), the function k can be computed and used to integrate the Ricatti differential equation and obtain the profile R. Then, Eq. (7) together with Eq. (6) provide a complete characterization of the electron-cavity interaction.

Phase-matched interaction
Although the solution in Eq. (4) can be applied to any field profile, here we focus on a simple configuration that allows us to easily understand the problem, even though less symmetric scenarios could yield more efficient ponderomotive couplings. Specifically, we consider the electron to move along a path of length L while interacting with an electric field of the form ⃗  0 (r) = ⃗  0 (R)e iq z z , such that the phase velocity matches the electron velocity (i.e., q z = 0 ∕ ). In this scenario, which requires a specimen that possesses translational invariance along the e-beam direction, the ponderomotive coupling factor becomes independent of the longitudinal position z, so we have (3) for i ] by disregarding the small phase 0 . Then, the Ricatti equation admits an analytical solution that directly leads to the following compact forms of the coupling coefficients (see Methods, Section 4.2): where 0 = (eL∕ℏ 0 ) 0,z (R) and = 0. Equation (8a) represents a generalization of the intrinsic PINEM coupling coefficient, now also incorporating the effect of the ponderomotive interaction. Interestingly, the presence of 0 can play a significant role in the determination of the linear coupling and, in turn, in the computation of the related EELS probability given by |̃0| 2 , especially for long interaction lengths L. A quantitative estimate of such correction can be easily obtained for the special case in which all coefficients i are real, such that Figure 2(a), we show that the deviation Besides the modification of the linear coupling, 0 in Eq. (8a) reflects the magnitude of the effect produced by the squeezing operator [see Eq. (5)] on the electron-cavity dynamics.
A key point in this discussion refers to the normalization of the mode field ⃗  0 , which is determined by the inte- of materials with real permittivity (r) [34]. For instance, for an electric field of real amplitude E 0 uniformly distributed in vacuum over an area A and oriented perpendicularly with respect to the e-beam velocity, the normalization condition leads to E 0 = √ 2 ℏ 0 ∕LA, which in turn yields a squeezing factor | 0 | = e 2 ∕ 0 m e vA. Unfortunately, we immediately notice that the ponderomotive coupling coefficient is not proportional to the path length L, in contrast to the linear PINEM term̃0 arising when the field has a component along the z direction -a mechanism that has been argued to enable strong electron-cavity coupling and, from here, electron-mediated entanglement between different cavities [35]. Such different scaling suggests the use of modes lacking translational invariance along the electron trajectory and having a strong confinement in the tranverse directions (e.g., nanoscale gaps between two metallic nanoparticles [36] or a nanoparticle and a planar metallic surface [37]) as an approach to reach high squeezing values.
Nonetheless, the dependence of 0 on the inverse of the electron velocity, the inverse mode frequency, and the field confinement (i.e., ∝ 1∕A) should allow us to reach sizeable ponderomotive couplings by going to slow electrons interacting with infrared fields. Indeed, for a mode of energy ℏ 0 = 15 meV distributed over an area A = 100 nm 2 , a 50 eV electron produces a squeezing parameter | 0 | ∼ 0.1.
As a potentially practical scenario, we consider the electron to be focused at the center of a circular hole (R = 0) of radius a drilled in a polaritonic material (see inset in Figure 2(b)) under the aforementioned phase-matching condition. In particular, for a mode consisting of a linear combination of two degenerate modes with azimuthal numbers m = ±1 and a relative phase , the linear coupling vanishes (i.e.,  0z = 0), while the ponderomotive coupling coefficient becomes 0 = i e i e 2 ∕2m e v 2 a I( ) with = 0 a∕ and I( ) standing for a normalization integral (see Methods, Section 4.2.1, for details). This dependence clearly favors small radii (i.e., strong field confinement), small electron velocities, and small resonance energies (see Figure 2(b)), in agreement with the scaling properties presented above.

Postinteraction quantum cavity state 2.2.1 Cavity prepared in the ground state
We now discuss the photonic state after interaction with the electron for the cavity mode starting in the ground state (i.e., 0 n = n,0 ) and the e-beam being well focused around a transverse position R 0 , so that we can approximate In addition, because we are interested in the state of the system after the electron has abandoned the interaction region, we let the longitudinal coordinate z go to infinity in the calculation of all coupling parameters. By starting from Eq. (2), we first obtain the full density matrix̂(r, r ′ , t) = | (r, t)⟩⟨ (r ′ , t)|, and then, by integrating over the electron coordinates, we find that the density matrix of the cavity mode reduces to The latter, which only depends on the e-beam probability density and not on the phase of the wave function, determines the ability of the system to interfere with light synchronized with the electron pulse [38,39]. We remark that this procedure renders the correct statistical properties of the cavity when no measurement is performed on the electron [40].
Interestingly, the coefficients F n −n turn out to be the projections of the well-known two-photon coherent state defined in a seminal paper by Yuen [29], from which we find where H n are Hermite polynomials and we have defined as well as the normalization constant as in the case analyzed in the previous section, where an electron traverses a circular hole, the coupling coefficient 0 vanishes and the state assumes the form of a squeezed vacuum containing only an even number of photons in the diagonal of the density matrix. This conclusion can be easily verified by evaluating the Hermite polynomials at zero argument or, alternatively, directly from Eq. (4). In contrast, the off-diagonal elements bear a more intricate dependence on the incoming electron wave function given by the coherence factor M 0 m∕ , which determines the possibility of creating squeezed states with the correct coherences. For example, an electron that has undergone a PINEM interaction with an optical field of photon energy ℏ 0 and coupling strength | PINEM |, followed by free propagation along a macroscopic distance d (see Figure 3(a)), has an associated probability density consisting of a train of pulses described by the coherence factor where the phase of the PINEM interaction has been set to zero, z T = 4 m e 3 3 ∕ℏ 0 is the so-called Talbot distance [38,41], and J is the Bessel function of order . We show the resulting coherence factor in Figure 3 and free-space propagation [42]. From the expression of 0 related to such interaction, and by using the state in Eq. (9a) with full electron coherence (M 0 m∕ = 1) as well as by setting̃0 = 0, = 0 and n = 0, we compute the variance ⟨ΔX 2 ⟩ = ⟨X 2 ⟩ − ⟨X⟩ 2 withX = (a + a † )∕2 -a quantity of utmost importance, which represents the fluctuations in the position of the harmonic oscillator (HO) for the cavity mode. By choosing = − ∕2 to make 0 real, we obtain ⟨ΔX 2 ⟩ = e −2| 0 | ∕4. In Figure 2(b), we present the degree of squeezing in decibel (vertical right axis) through the relation −10 log Interestingly, the squeezing approaches values as high as ∼10 dB for a 5 eV electron, a ∼ 3 nm, and a resonance energy ℏ 0 ∼ 60 meV; this squeezing value represents a threshold of particular importance to grant us access into fault-tolerant quantum algorithms by means of GKB codes [43]. High values of | 0 | can also be obtained for larger electron energies (e.g., ≳ 70 eV for a ≳ 1 nm) by targeting mid-infrared excitations (e.g., phonon polaritons in hexagonal boron nitride, which exhibit high quality factors even when structured with a lateral size of a few nanometers [44]).
We also consider the effect of having a partially coherent electron. In particular, by compressing the electron through free-space propagation following a single PINEM interaction (setting agaiñ0 = 0, = 0, and n = 0), we directly compute ⟨ΔX 2 ⟩ by using the matrix elements in Eq. (9a) and find the results presented in Figure 3(c), which clearly show an increase in the position uncertainty with respect to the values obtained for perfectly coherent electrons (e.g., when treated as point particles). In addition, it is interesting to note that ⟨ΔX 2 ⟩ increases with | 0 | as a consequence of the vanishing coherence factor M 0 m∕ at the harmonics connected to the populated Fock states |n⟩.
In the opposite extreme (k → 0), from Eqs. (6a) and (7), we obtain | 0 | → 0, which leads to a Poissonian distribution in P n = ph nn by applying the asymptotic form of H n ( ) or, again, by simply taking the same limit in Eq. (4). This behavior is particularly evident in the bottom row of Figure 3(c), where we plot the mode population obtained upon direct evaluation of Eq. (9a) for different propagation distances from the first PINEM interaction.
For parameters̃0 and 0 lying in between the two extremes under consideration, the cavity state varies in a continuous fashion, spanning values of the zero-delay second-order correlation function g (2) (0) = [ ∑ n n(n−1)P n ] ( ∑ n nP n ) 2 ranging from a super-Poissonian statistics with g (2) (0) ∼ 3 + sinh −2 (| 0 |) to a Poissonian statistics with g (2) (0) ∼ 1 when the phase shift is = ∕2 [see Eq. (9d)], as well as to a sub-Poissonian statistics for = 0. This is a consequence of the decreasing variance of the distribution of photon numbers, Δn 2 = 2 sinh 2 (| 0 |) cosh 2 (| 0 |) + |̃0| 2 [cosh (4| 0 |) − cos(2 ) sinh (4| 0 |)]. We remark that the exponential dependence of the variance on the squeezing parameter renders the postinteraction cavity state extremely sensitive to any change in the phase , even for small | 0 |, provided the interaction is assisted by a high coupling with the electric field component along the e-beam direction.

Cavity under laser illumination
Although the optical cavity mode may in principle be chosen such that it constrains the phase [Eq. (9d)], in practical configurations this parameter would be hard to change in a single experimental setup. A more feasible route to gain control over the phase consists in aligning the e-beam such that  0,z = 0 while the cavity is irradiated by a laser. Intuitively, the postinteraction cavity state should take a form that resemblances the one in Eq. (9a), but with̃0 changed to a factor L proportional to the incident laser amplitude and carrying its phase. More precisely, the probability to leave n photons in the cavity is

Electron spectrum after interaction with an excited cavity
We now study the electron spectrum resulting from the interaction with a cavity that is exposed to a synchronized light source. We model this scenario by assuming different initial cavity states (i.e., Fock-state amplitudes 0 n ) and an electron whose temporal envelope varies negligibly during one optical period (e.g., for a ∼ 100 fs electron pulse and a mode energy ℏ 0 ∼ 1 eV, or equivalently, a mode period 2 ∕ 0 ≈ 4.1 fs). Under these conditions, once the electron has abandoned the interaction region, its state is approximately given by a discrete superposition of plane waves of energies E 0 + ℏ 0 ∕ labeled by the net number of exchanged photons , with associated intensities The resulting electron energy-loss distribution is Γ( ) = by setting 0 (r − vt) = (2 ) −3∕2 and recalling that, in the nonrecoil approximation, the energy is only dependent on the momentum component parallel to the electron trajectory.
We first consider a quasi-monochromatic laser pulse with central frequency 0 irradiating the cavity and inducing an initial coherent state with coefficients 0 n! in the targeted cavity mode. Neglecting any nonlinear response of the cavity materials, we have that L is proportional to the electric field of the incident laser pulse. In practice [16,45], the light electric field can be as high as ∼10 8 V/m and produce an average population reachingn = ∑ n n| 0 n | 2 ∼ 300 excitations for a mode of energy ℏ 0 = 1 eV and uniform spatial distribution over a volume of 10 −3 μm 3 . In this limit, the Poissonian distribution | 0 n | 2 approaches a Gaussian distribution with equal average and standard deviation corresponding to | L | 2 , which we further approximate as a Kronecker delta peaked at the integer nearest ton. Interestingly, also in then ≫ 1 limit, and assuming small linear and quadratic coupling coefficients |̃0| and | 0 | such that they do not produce large interaction probabilities for ∼n, we can write the F n coefficients in Eq. (4) as (see Methods, Section 4.3) ] .
Reassuringly, Eq. (12) reproduces the result obtained for an electron interacting with two mutually coherent fields of frequencies 0 and 2 0 [17,46]. Then, plugging this expression into Eq. (11), we obtain the electron probabilities where , and we introduce the parameters |̃| = √n |̃0| and | | =n| 0 | connecting the one-mode classical coupling parameters to their quantum counterparts |̃0| and | 0 |. In Figure 4(a-c), we show electron spectra calculated from Eq. (13) as a function of and the normalized energy loss ∕ 0 for selected values of̃. For vanishing linear coupling (̃= 0), we observe the emergence of several energy sidebands separated by multiples of 2ℏ 0 , as expected from the quadratic interaction with the field. Like in PINEM, the sidebands are symmetrically distributed around the zero-loss peak. In addition, as | | increases, we observe oscillations in the intensities, also similar to those in PINEM [16], and equally resulting from the interaction between the electron and the coherently excited mode. Once the linear interaction is turned on (̃> 0), the interference with quadratic-coupling channels manifests in an asymmetric peak distribution, which is already discernible for small | | values and can be controlled by tuning the relative phase . This effect was observed in previous theoretical works by numerically integrating the Schrödinger equation for a Hamiltonian incorporating the interaction of a free electron with a classical light field [26].
Similarly, a highly populated mode can be also obtained via cavity heating at temperatures such that k B T∕ℏ 0 ≫ 1. In this regime, the cavity is prepared in a pure mixture with a classical Boltzmann probability distribution, which is well approximated by the expression p n 0 ≈ e −n 0 ∕n ∕n withn ≈ k B T∕ℏ 0 . We calculate the probability of exchanging an energy ℏ 0 by setting 0 n+ = n+ ,n 0 in Eq. (12) and then summing over all the possible values of the initial number of photons n 0 , weighted by their respective populations p n 0 . Sincen ≫ 1, we approximate this sum to an integral taken over the large extension of the distribution (see Ref. [21]). Thus, for a thermally excited cavity mode interacting with the electron, we obtain To compare this expression with the results obtained under coherent laser illumination, we evaluate Eq. (14) and plot Figure 4(d-f). As one could infer directly from the form of Eq. (14), the effect of the thermal population is to smear the electron spectra obtained under coherent illumination. As a consequence, the intensity oscillations observed in Figure 4(a-c) with increasing | | are absent in Figure 4(d-f) and just replaced by a monotonic decrease with | |.

Concluding remarks
In brief, the inclusion of A 2 terms in the interaction between e-beams and optical cavity modes causes a departure from the role of electrons as semiclassical excitation sources. In the absence of such terms, free electrons can only create coherent states by interaction with bosonic optical modes [20], unless a postselection of the electron state is performed [6]. In contrast, the presence of a ponderomotive coupling component embodied in the A 2 terms gives rise to a new set of cavity states that include vacuum-, phase-, and amplitude-squeezed states, directly created by interaction with the electron without the need of any postselection. We also demonstrate that a squeezing of ∼ 10 dB, which represents the current fundamental limit for the implementation of quantum algorithms by means of nonclassical states of light, can be produced in realistic designs of nanostructured polaritonic materials.
In addition, our work shows that the ponderomotive terms allow us to estimate the linear coupling strength 0 , especially when this parameter reaches large values as a consequence of strong electron-cavity coupling, a Figure 4: Electron energy-loss spectrum. Electron distribution as a function of the normalized energy loss ∕ 0 and the ponderomotive coupling | | for |̃| = 0 (a, d), |̃| = 0.5 (b, e), and |̃| = 1 (c, f). We take the cavity to be initially prepared in either a coherent state (a-c) or a thermal state (d-f), as described by Eqs. (13) or (14), respectively. The conditionsn ≫ 1 and = ∕2 are assumed in all panels, and a Lorentzian broadening in (FWHM = 0.12 0 ) is introduced for clarity. condition that has been achieved in recent experiments by phase-matching the electron-cavity mode interaction [47][48][49] and is being theoretically investigated to be implemented in integrated photonic designs [50].
We understand that the present work paves the way toward the generation of nonclassical states of light with nanometric precision, even in dark modes that do not couple to light, thus revealing a new tuning knob at the intersection of quantum information and e-beam technologies.

The effective Hamiltonian:
We start by considering a fast electron interacting with a classical electromagnetic field described in the temporal gauge (i.e., with zero scalar potential) in the presence of a material structure. In our analysis, the initial electron wave function is assumed to be in a superposition of momenta concentrated around a value ℏk 0 , which corresponds to a relativistic energy E 0 and velocity v = ℏk 0 c 2 /E 0 . Under these conditions, and for optical excitations in the infrared-visible range, the system dynamics can be modeled by means of the effective Schrödinger equation iℏ t (r, t) = (t) (r, t) with the minimal-coupling Hamiltonian [51] where A(r, t) is the time-dependent vector potential associated with the external illumination in the presence of the cavity. The coefficient vector g = (e 2 /2m e c 2 )(1, 1, −2 ) in the ponderomotive term approximately incorporates relativistic corrections through the Lorentz factor = 1∕ √ 1 − 2 ∕c 2 . The electron motion is then described by the scalar wave function (r, t).
In this work, we are interested in a quantum description of the cavity and, thus, adopt a quantum-optics approach [34] with the vector potential treated as an operator: , where j runs over cavity modes, ⃗ are the corresponding normalized electric field distributions, and we introduce bosonic annihilation and creation operators a j and a † j . By further assuming the sample to undergo negligible inelastic losses, and focusing on the interaction with a spectrally dominant and well-defined mode (labeled by j = 0, and for simplicity we dismiss the j label in the ladder operators), the electron-cavity system can be described by the modified Schrödinger equation iℏ t | (r, t)⟩ = ( 0 + int )| (r, t)⟩ witĥ where we have added the noninteracting Hamiltonian of the cavity mode ℏ 0 a † a and included the photonic degrees of freedom in the combined state | (r, t)⟩ = ∑ ∞ n=0 n (r, t)e −i 0 nt |n⟩.

Exact analytical solution: The interaction Hamiltonian in
Eq. (15b) presents a quadratic term in the mode ladder operators; therefore, generating a dynamics that substantially differs from the one addressed in previous works [16,35] where only the linear coupling with the electromagnetic field was taken into account. Despite this difference, by following similar steps as those used in Ref. [21], we find an analytical solution for the combined wave function. We start by inserting the ansatz n (r, t) = 0 (r, t) i , and i = (e∕ℏ 0 ) 0,i e −i 0 z∕ . This leads to the set of one-dimensional differential equations with p = z e 2i 0 and k = i  To find the scattering operator, we first notice that an analytical solution to the equation iℏ t (t, t 0 ) = HO (t, t 0 ) was found by Yuen [29] and is given by [33] where we have defined the operatorsŜ(z) = e z aa∕2−z * a † a † ∕2 and D(z) = e z * a † −za , the linear coupling̃0 = (i∕ℏ)∫ , satisfy the relation | | 2 − | | 2 = 1 at every time, while the function R = ∕ obeys the Ricatti equation [32] t R∕2 = k * − k R 2 solved with the initial condition R(t 0 ) = 0. We have also defined the phase = arg{ } and introduced the phasẽ= (i∕2)∫ , which is a generalization of the Berry phase found in a forced quantum harmonic oscillator [31,53].
, respectively [54]. By employing these expressions, we find Finally, once the aforementioned transformation is applied to Eq. (18) and the t 0 → −∞ limit is taken, the coefficients f n in Eq.

Phase-matched interaction
For an electron interacting with a structure that is translationally invariant along the e-beam propagation direction z, the electric field of the mode assumes the general functional form  0,i (r) =  0,i (R)e iq z z , with R = (x, y). We consider a guided polariton or a traveling wave of subluminal phase velocity in a high-refractive-index dielectric, such that the condition 0 ∕ = q z is met by tuning the electron velocity. This condition has been previously explored as a way to enhance the electron-mode coupling amplitude [6], which in the absence of ponderomotive interactions renders̃∝ √ L, where L is the interaction length [35]. In this scenario, we find the function

Hole in a metallic slab:
In order to estimate the squeezing coupling parameter 0 in a scenario of practical interest, we consider a circular hole of radius a and length L extending along the z direction and drilled in a homogeneous metallic slab of permittivity ( ), with the electron traveling in vacuum parallel to the hole axis. For 0 a/c ≪ 1, we can neglect retardation in the description of the mode, which for an azimuthal number m, has an associated electric potential inside the hole (R < a) of the form 0 (r) = AI m (q z R)e iq z z+im , and 0 (r) = BK m (q z R)e iq z z+im in the material region (R > a). These expressions are given in cylindrical coordinates r = (R, , z) and involve the modified Bessel functions K m and I m . Also, the constants A and B must satisfy the condition B∕A = I m (q z a)∕K m (q z a) = ( )I ′ m (q z a)∕K ′ m (q z a) to guarantee the continuity of the potential and the normal electric displacement at the surface of the hole. We then calculate the corresponding electric field ⃗  0 (r) = −∇ 0 (r) and normalize the field as indicated in Section 2.1.2.
As an example, we take the electron to be focused at the hole center (R = 0, approaching with an azimuthal angle ). Since excitations of symmetries ±m are degenerate, we can choose the mode as any linear combination of these two. In particular, we take m = ±1 waves combined with a relative phase , such that the mode field becomes ⃗  m=±1 ] e iq z z+i , with E 0 = q z A acting as a normalization constant. We estimate E 0 from the normalization condition ∫ d 2 R | ⃗  0 (R)| 2 = 2 ℏ 0 ∕L, neglecting the field inside the metal, which should be small because of the condition | ( 0 )| ≫ 1 required to have strong confinement. We obtain E 2 0 = ℏ 0 ∕La 2 I( ), where = 0 a∕ and I( ) = ∫ 1 0 x dx { [I 0 (x ) + I 2 (x )] 2 ∕4 + I 2 1 (x )(1∕x 2 2 + 1) } . Plugging the field into the expressions given above for k and 0 , we obtain the result shown at the end of Section 2.1.2.
We use the ordering theorems mentioned in Methods, Section 4.1, together with the approximation (ii) to write F n ≈ e −i ∕2 ⟨n|e −a † a † * 0 ∕2 e aa 0 ∕2 e −i a † a ẽ * 0 a † e −̃0a |n + ⟩. Then, we expand the exponential operators in Taylor series to compute the corresponding matrix element, which leads to the result where the prime in the summation symbol indicates that the indices are restricted by the inequalities n + − i ′ + i − 2j ≥ 0, n + − i ′ ≥ 0, and j + (i ′ − i − )∕2 ≥ 0, as well as by the condition that i ′ − − i is an even number. In virtue of assumption (ii), the first two inequalities are automatically satisfied. Also, this assumption allows us to follow a procedure similar to the one described in the Methods section of Ref. [20], consisting in using the Striling formula to approximate the factorials and neglecting all the indices in front of n when they are not exponentiated. Then, the entire factor in the fourth line of Eq. (19) reduces to (n + ) i ′ +2 j− ∕2 , and by making the substitutions m = (i ′ − i − )/2 and s = j + m, we obtain where now the prime indicates that the leftmost sum is restricted to even values of i + . Finally, by pushing the lower limits of the m and s sums to m = −∞ and s = 0, and further using the series expansion of the Bessel functions [55] J (x) = ∑ ∞ m=0 (−1) m (x∕2) 2m+ ∕(m + )!m!, we find that Eq. (20) directly reduces to Eq. (12).