## Abstract

It is a long-standing goal to create light with unique quantum properties such as squeezing and entanglement. We propose the generation of quantum light using free-electron interactions, going beyond their already ubiquitous use in generating classical light. This concept is motivated by developments in electron microscopy, which recently demonstrated quantum free-electron interactions with light in photonic cavities. Such electron microscopes provide platforms for shaping quantum states of light through a judicious choice of the input light and electron states. Specifically, we show how electron energy combs implement photon displacement operations, creating displaced-Fock and displaced-squeezed states. We develop the theory for consecutive electron-cavity interactions with a common cavity and show how to generate any target Fock state. Looking forward, exploiting the degrees of freedom of electrons, light, and their interaction may achieve complete control over the quantum state of the generated light, leading to novel light statistics and correlations.

## INTRODUCTION

The ability to design and control arbitrary quantum light sources has been a desirable (albeit hard to achieve) goal for many years, especially at the level of a single photon and few photons. Single-photon sources are a key building block for a variety of technologies, such as quantum computing schemes (*1*–*3*), metrology (*4*), teleportation (*5*), and secure quantum communication (*6*). Entangled states of light composed of two photons or more (e.g., NOON states), and states of light with nontrivial photon statistics (e.g., squeezed states), are a crucial component in numerous applications, such as quantum metrology, quantum sensing, quantum imaging, quantum cryptography, and continuous-variable quantum computing (*7*–*11*). Other nonclassical states of light, such as photon-subtracted and photon-added states with non-Gaussian statistics, have also proven valuable for continuous-variable quantum information (*9*), quantum key distribution (*12*), and even quantum metrology (*10*).

The realization of these nontrivial quantum states of light is inherently challenging, increasingly so the more photons involved. Photon entanglement can be realized with the use of nonlinearities, as in spontaneous parametric down conversion. However, this technique is limited to specific wavelengths, and even for those specific wavelengths, the inefficiency of the nonlinearity process leads to a small throughput of entangled pairs. Other approaches for shaping the quantum state of light have been explored over the years, for example, by using atoms launched through a photonic cavity (*13*, *14*). Nevertheless, generated photonic states in existing approaches are limited to a relatively small number of photons. We lack methods to create many-photon states of nontrivial statistics. For example, the cat state with the most photons generated so far had *n* = 10 photons (*15*), Fock states of only up to *n* = 3 photons were created (*16*), and similar low photon numbers limit other novel quantum states of light. High–photon number states are of great importance for applications such as cluster state quantum computations (*17*) and superresolved phase sensitivity in quantum metrology (*18*).

New techniques and methods for overcoming these technological difficulties are much needed. Developing new sources of quantum light states, for various wavelengths, with high throughput and fidelity, could prove to be very useful in the field of quantum optics, allowing new fascinating implementations of quantum technologies. In this work, we propose a scheme for the generation of light with novel quantum states, by using efficient interactions of free electrons with photons in cavities. Modern developments in electron microscopy tie in very neatly with this and provide the necessary platform for manipulating light, through its interaction with free electrons, in an effect called photon-induced near-field electron microscopy (PINEM) (*19*).

The experimental demonstration of PINEM in the ultrafast transmission electron microscope (UTEM) (*20*) motivated the development of the “conventional” PINEM theory (*21*, *22*). This theory showed that the entire electron-light interaction can be successfully described (analytically) in a semiclassical manner (*21*, *22*), in which the electron is treated quantum mechanically, while the light is treated as a classical field (a strong coherent state). In this scenario, a passing relativistic free electron interacts with an optical field (of some central frequency ω) populated with many photons. The electron energy distribution after the interaction has sharp peaks around its initial energy, with shifts of integer multiples of ℏω, thus indicating multiple absorptions and stimulated emissions of the optical field. Such an energy distribution suggests the presence of a quantized ladder of energy levels that the electron moves through as it undergoes the interaction.

This PINEM theory has managed to explain a plethora of new phenomena such as Rabi oscillations of free electrons, Ramsey interferometry (*23*), coherent control (*24*), stimulated light emission by prebunched electrons (*25*–*27*), attosecond electron pulse generation (*28*–*30*), and electron vortex beam generation (*31*, *32*). The PINEM interaction (*19*, *21*, *22*, *33*) has also enabled new capabilities in electron microscopy, such as improved electron energy loss spectroscopy (*34*) and imaging capabilities.

So far, PINEM experiments and theory have all assumed very weak coupling between the electron and the light field, which was assumed to be a strong classical field. However, recent works (*35*–*37*) have lifted both assumptions by introducing a new theory of quantum PINEM (QPINEM) (*36*), in which the light field is quantized as well. This new generalized theory opens the possibility to consider how the electron spectra would behave after interacting with nonclassical light sources, as well as investigating such systems when approaching the strong coupling regime. The most recent experimental papers in the PINEM field have gone beyond the weak coupling regime (*38*–*40*) and are expected to soon reach the regime needed to observe QPINEM.

Here, we propose to use free electrons to create desirable quantum photonic states. We show that by using free electrons, one can generate photon-added states, Fock states, thermal states, displaced coherent states, and displaced Fock states. The overarching goal is to eventually design a general scheme to alter the photonic quantum state in controllable ways. For this purpose, we develop the necessary formalism to use the QPINEM interaction for controlling quantum light states. We extend the QPINEM theory with density matrix formalism and present a robust scheme to handle multiple consecutive interactions of electrons with a common cavity mode. To precisely quantify the electron–photonic cavity interaction in an arbitrary electromagnetic environment, we develop the macroscopic quantum electrodynamic (*41*, *42*) framework for the QPINEM interaction with a single photonic mode. Last, we discuss the experimental feasibility and implementation challenges, which depend, among other things, on the difference between the cavity lifetime and the time between successive electron interactions.

## RESULTS

### The theoretical framework

A general experimental scheme for measuring electron-multiphoton interactions is shown in Fig. 1A. It demonstrates how the interaction of the free electron and the cavity multiphoton mode (denoted by the quantum states ∣ψ^{(i)}⟩_{e} and ∣ψ^{(i)}⟩_{p}, respectively) generally result in an entangled quantum state. In the inset of the figure, we mention several photonic structures that would be suitable for efficient interactions (with low losses), thus allowing us to observe the quantum effects discussed here. We start by introducing the state basis. As shown in Fig. 1B, the electron and photon states are represented by an infinite and half-infinite energy ladders, respectively. More explicitly, the basis of the photonic state is composed of the Fock states ∣*n*⟩_{p} (the *n*th step in the photonic energy ladder). The basis of the electron state is composed of ∣*k*⟩_{e}, the state of an electron with energy *E*_{0} + *kℏ*ω (i.e., the *k*th step in the electron energy ladder), where *E*_{0} is the electron’s baseline energy. We define the combined electron-photon basis states as ∣*k*, *n*⟩ = ∣*k*⟩_{e} ⊗ ∣*n*⟩_{p}. Generally, as commonly done in all prior works on QPINEM (*36*, *37*), we may express any pure input system state as

This description lets us find many properties of the output state, including the exact amplitude coefficients after a QPINEM interaction with a single electron (presented below in Eq. 12). The pure state description is, however, insufficient when dealing with long chains of QPINEM interactions, i.e., when multiple electrons interact with the same cavity mode, as analyzed in this work. To describe such interactions, we use the density matrix representation for the input state

Next, we introduce the Hamiltonian that defines the state basis above by taking the same approximations as in all PINEM theory (*21*, *22*) and experiments: (i) The magnetic vector potential **A** is weak relatively to the electron momentum (∣*e***A**∣ ≪ *E*_{0}), allowing us to neglect the diamagnetic (**A**^{2}) term; (ii) the electron travels through a charge-free region, so we may take the generalized Coulomb gauge and also assume zero scalar potential, and (iii) the electron is paraxial, having the majority of its momentum in the **v**. [Additional corrections to the PINEM theory can occur because of the change in permittivity along the electron trajectory, as **A** and **p** do not commute. However, these corrections can be neglected as long as the electron’s *z*).] These result in the following Hamiltonian, which only depend on one spatial dimension (*z*) along the electron trajectory*a* and *a*^{†} are the photon annihilation and creation operators, which satisfy [*a*, *a*^{†}] = 1. The vector potential of a single photon is denoted by **F**(**r**) of Maxwell’s equations in a medium, which are normalized such that

The field quantization can be directly generalized to an arbitrary optical medium (possibly lossy) using the electromagnetic Green function. For a Green function representation, we replace the interaction Hamiltonian with *e***v** ∙ **A**, with **A** defined as

This associates with each (**r,** ω, *k*) a quantum harmonic oscillator, with matching creation **f*** _{k}*(

**r**, ω) operators, satisfying [

**f**

*(*

_{k}**r**, ω),

**f**

_{k′}(

**r**ʹ, ωʹ)] = [

**f**

*(*

_{k}**r**, ω),

**f**

_{k′}(

**r**ʹ, ωʹ)]

^{†}= 0 and

*42*).

The system’s evolution in time is given by the time evolution operator *U*(*t*). In the limit of *t* → ∞, we get [up to some global phase *e*^{iχ} (*37*) that does not affect observables]*b* and *b*^{†}, respectively. These operators satisfy *b*∣*k*⟩_{e} = ∣*k* − 1⟩_{e} and *b*^{†}∣*k*⟩_{e} = ∣*k* + 1⟩_{e}. In addition, we define *g*_{Qu} with the electric field *E _{z}*, remembering that in the absence of a scalar potential

*E*= −

*∂A*/

*∂t*

The scattering operator *S* in Eq. 6 can be written in the form of the displacement operator as *D*(*bg*_{Qu}), where *D*(α) = exp (α*a*^{†} − α**a*). *S* is a special kind of a displacement operator, however, because its argument *bg*_{Qu} is an operator itself. We can expand *D* and get the matrix elements of *S*

The scattering operator *S* is useful for calculating the density matrix of the combined output state of the electron and the photon after the interaction

Recall that we wish to study how the electron state can be exploited to control the photonic state. For this reason, we want to generally examine systems in which a cavity holds a photonic state that is built gradually, through consecutive interactions with electron pulses. We can formulate this by a recursive procedure. In the case that the output electron is not measured, we trace out the electron’s degrees of freedom and obtain

The index *m* = 1,2,3, … is used to number the consecutive interactions with individual electrons. If we postselect (i.e., determine a desired measurement result and repeat the interaction until it is achieved) a specific set of electron energies, then the sum in Eq. 10 will only be on those electron energies (and their corresponding ∣*j*⟩_{e} states). Now, consider the light field in the cavity interacting with another electron. To introduce our new electron state ∣ψ^{m + 1}⟩_{e}, we write a new photon-electron density matrix

With this new density matrix, we have returned, effectively, to exactly where we were in Eq. 2, having a density matrix of the whole photon-electron system. Thus, we can repeat Eq. 9 to find the resulting density matrix after the next interaction. We can then trace out the new electron using Eq. 10 and so on, as many times as the number of electrons interacting with the cavity. Note that this scheme does not yet consider cavity losses; we address this point in the “Analysis of experimental feasibility” section. In the presence of losses, we generally expect to arrive at a steady state.

The trace in Eq. 10 is a critical step in the process, with great consequences on the physics, as it may change the photonic state from pure to mixed, which can be seen as decoherence. Generally, the way we deal with the electron degrees of freedom in this step has a major influence on the photonic state (e.g., electron measurement, postselection, or trace out). As we demonstrate in the following sections, the effect of this step on the photonic state also greatly depends on the incoming electron state.

Last, for the simple case of a single QPINEM interaction, we can find the exact amplitude coefficients of the output state (given a pure input state, as in Eq. 1) to be*k*, *n*⟩ in the output state and where recall *s*_{n, n′} is defined in Eq. 8B.

### Electron interaction with a coherent state: Generalizing the conventional PINEM interaction

Perhaps the simplest demonstration of the implications of the QPINEM interaction for creating novel photonic states is seen using the conditions that are already prevalent in conventional PINEM experiments. Our input photonic state is a coherent state ∣α⟩_{p}; our input electron state is an electron with baseline energy *E*_{0} (∣0⟩_{e}), which we denote from here on as a “delta” electron, ∣δ⟩_{e} (a single peak, delta, in the *k*-state space).

Usually, we would have a very strong coherent state in the photonic cavity (∣α∣^{2} ≫ 1), with very weak coupling during the interaction (∣*g*_{Qu}∣^{2} ≪ 1). Under these assumptions, the interaction results in separable output states, where the photonic state remains approximately ∣α⟩_{p} and the separable electron state gives the known Bessel probabilities *22*), where *g* is the conventionally defined interaction strength and relates to *g*_{Qu} by *g* = *g*_{Qu} ∣α∣.

An intriguing phenomenon occurs when looking at strong coupling or, equivalently, at very weak photonic coherent states. Both cases result in a substantial change to the photonic distribution. Using Eq. 12 and plugging in the appropriate input amplitude coefficients for our given setup, we get that the output amplitude coefficients are*k*^{(f)}⟩_{p} has to be explicitly normalized). What we get, in fact, is an infinite sum of “photon-added” coherent states (*43*). Experimentally, one could realize this scheme by postselecting the light according to a measurement of the electron energy, at a certain energy bin *k*. This way, the electron is also used for heralding. These electron energy measurements are regularly performed in electron energy loss spectroscopy in electron microscopy; however, they are only rarely synchronized for coincidence measurements (*44*).

Figure 2A shows the interaction scheme for the considered setup. In Fig. 2B, we present the output photon-electron probability map, along with some visualization of the postselection process (effectively taking a “slice” out of the map). In Fig. 2C, we present the photonic states resulting from the highlighted postselections. In Fig. 2 (D and E), we present the same interaction results but for a higher coupling strength.

This test case is rather exciting because it provides a simple and familiar setup (PINEM-like) that results in non-Gaussian photon statistics. In addition, this is an interesting method of generating coherent states shifted up by some number of photons (although, we get a sum of these shifted states and not a single one). In Fig. 2C, for a weak interaction strength, we show two such examples of shifted coherent states. By tweaking *g*_{Qu} and the postselected *k*, we can shift the mean number of photons by different values. In addition, in Fig. 2E, we show that for higher interaction strengths, we get more unusual and rich photonic distributions (e.g., super-Poissonian), arising from the superposition in the sum of Eq. 14.

### Creation of photonic Fock states

We now present a method to create photonic Fock states using consecutive photon-electron interactions and projections, through the electron measurement. This time, we look at a sequence of QPINEM interactions, thus chaining the simple block model previously presented in Fig. 1B. Note that this time, we do not postselect the electron energy but, rather, directly measure it, meaning that we start with an empty cavity, let an electron interact with it, measure the electron’s energy, let another electron interact with the cavity, and so forth. Our setup includes an initial photonic state of an empty cavity, ∣0⟩_{p}, and a delta electron, ∣δ⟩_{e}. This gives us the very simple initial state ∣ψ^{(i)}⟩ = ∣δ⟩_{e} ⨂ ∣0⟩_{p}, which is, in fact, a single basis state ∣*k* = 0, *n* = 0⟩.

Examining the explicit expansion of *S* (as in Eq. 8), one finds that it conserves *k* + *n* before and after the interaction, per basis state. This means that since *k* + *n* = 0 before the interaction and our input state is a single basis state, then *k* + *n* will remain zero after the interaction as well. Once we project on an electron energy bin *k*′, we can uniquely determine that the photonic state can only be ∣*n*′ = − *k*′⟩_{p}, a pure Fock state. One can generalize the above idea to any general photonic Fock state, and this logic will still hold, meaning that if we start with a photonic Fock state (an empty cavity, for example), then the state will remain a Fock state so long as we follow the scheme described.

For an empty cavity, we can only gain photons (or have no change in the photon number), but if we start with some nonzero Fock state and measure the electron, then we may lose photons too. However, because of the inherent asymmetry of the interaction (*36*), on average, the photonic state will always gain energy, which means that given enough interactions, we will reach our desired photon number with probability 1 and stop. While it is guaranteed that we will arrive to our desired state, it is not guaranteed when. The number of required interactions is stochastic since each measurement collapses the quantum state into one of multiple possible results. This fact makes our scheme dependent on the quantum collapse, and we set it dynamically to determine the number of photons in the cavity and thus create the desired Fock state. However, we can calculate the expected number of interactions needed. For the case of delta electrons, the mean photonic energy gain per interaction (*36*) is ∣*g*_{Qu}∣^{2} (in units of ℏω or *n*). Therefore, if we started with an empty cavity and wanted to build a photonic Fock state *N*_{goal}, then we would need, on average, *N*_{goal}/∣*g*_{Qu}∣^{2} interactions to do so. This requires a sufficiently high *Q* factor cavity, which we discuss further in the Analysis of experimental feasibility section.

This stochastic process is shown schematically in Fig. 3A below, where we show an example of the measured electron energies, along with the new photonic Fock state that it creates. In Fig. 3B, we show two simulations of the process. We note that if we were to pick a smaller *g*_{Qu}, then each iteration would yield a smaller energy change, but would allow us to get a finer control over the photonic state, and not get the overshoot that we see in the simulations below.

The motivation to such a shaping scheme is the creation of very large number Fock states. These states enable many applications in quantum information, as they can be used to create displaced Fock states (see below in the “Creation of displaced Fock states” section), enable non-Gaussian photon statistics, have many uses in quantum spectroscopy (*45*), and form a basis for any quantum state.

### Thermalization of coherent photonic states

There are already many classical examples of generating thermal states of light, such as using a rotating diffuser (*46*) and such as how, in free-electron lasers, spontaneous emission from many free electrons can become thermal (*47*). Here, within our framework, we consider a setup identical to the “Electron interaction with a coherent state: Generalizing the conventional PINEM interaction” section (a coherent photonic state and a delta electron state), but instead of postselecting the electron energy, we trace out its degrees of freedom by not measuring it, and we repeat this process many times. This leads to the decoherence of the light field, which we show here to result in the thermalization of the photon statistics after many interactions. Consequently, an effective temperature emerges in the cavity. The interaction scheme is presented in Fig. 4A. We show the state evolution of this process in Fig. 4B in both linear and log scales. Since a real thermal state ∣θ⟩_{p} has an exponential distribution *p _{n}* = (1 −

*e*

^{−θ})

*e*

^{−nθ}, we expect it to be linear in log scale, which we indeed see in Fig. 4B. Figure 4C is a scatterplot that presents the Mandel

*Q*parameter (

*48*) and θ = ℏω/

*k*

_{B}

*T*versus the average number of photons, showing the gradual convergence of these parameters toward those of a true thermal state. Lastly, we generally expect that any initial photonic state will eventually converge into a thermal state, given a large enough number of interactions, and we use coherent states here as a demonstration of this effect.

However, the schemes that we propose in earlier sections (Thermalization of coherent photonic states, Displacement of photonic coherent states, and Creation of displaced Fock states) do not have an analog, as they do not require measuring the electron after the interaction. Instead, we assume that the electron is traced out. While often tracing out part of a quantum system makes it lose its “quantumness,” we show below that by shaping the pre-interaction electron, we can control the resulting quantum state of light despite the trace-out operation.

### Displacement of photonic coherent states

We have seen between two sections (Creation of photonic Fock states and Thermalization of coherent photonic states) the fundamental change that the measurement of the electron can have on the final photonic state. This is because an empty cavity is a valid initial state for both setups, yet the resulting distributions are very different (Fock versus thermal). This time, we again compare to the Thermalization of coherent photonic states section, but instead of changing the nature of the measurement, we will change the input electron state. This interaction scheme is presented in Fig. 5A.

The new electron state that we use is an eigenstate of the electron ladder lowering operator *b*. That is, it is some electron state ∣c⟩_{e} for which *b*∣c⟩_{e} = β∣c⟩_{e}, where β is the appropriate eigenvalue. The notation ∣c⟩_{e} stands for “comb,” as one could imagine such an eigenstate as the limit of an infinite, equally distributed comb of electron energies (in the *k*-state space), with a phase difference of β between each two consecutive *k* states (hence, we require ∣β∣ = 1)

One can prove that under this setup, when applied to our system state, the scattering operator is equivalent to*S* to a coherent photonic state is equivalent to applying an additional displacement, that is

Figure 5B shows the photonic state evolution. We can visibly notice the upshifting (in the *n* ladder) of the photonic state, while not seeing too much degradation of the Poissonian statistics. A wider electron comb (more ∣*k*⟩_{e} states) would have resulted in a state even closer to a true coherent one.

In Fig. 5C, we show two properties of the evolving photonic state, as it goes through more and more interactions. On the top, we have the effective α of the photonic state. We see that, as expected, it goes up linearly by β*g*_{Qu}. Generally, we would need to draw this β*g*_{Qu} shift as a walk on the complex plane, but both α and β*g*_{Qu} have been chosen to be real and positive, for simplicity. At the bottom of Fig. 5C, we show the Mandel *Q* parameter (*48*) of the photonic distribution for various electron comb lengths. It is exactly 0 for a perfect Poissonian distribution and gets higher the wider the variance is, compared to the mean. We see that *Q* remains very low throughout the whole process for sufficiently long electron combs, indicating the closeness to the ideal Poissonian statistics.

This scheme depends on the ability to create an electron comb. Realistically, generating a “true” comb electron is impossible, as it contains infinitely many peaks of energy. However, as shown in Fig. 5, even finite approximations perform very well. Generating such an electron state is possible using a preliminary laser interaction. For example, a comb of hundreds of energy peaks was generated in a PINEM experiment by achieving phase matching for a strong interaction (*38*) and by using a cavity to enhance the interaction (*40*). A quantifiable value for gauging comb electron states is the expectation value 〈*b*〉, as recently suggested in (*49*). When 〈*b*〉 = 0, it represents an electron with a small energy spread (e.g., delta electron). For our analytical comb, 〈*b*〉 approaches a magnitude of unity.

While we have demonstrated the displacement of coherent states in this section, the result is, in fact, much more general and useful. Up to Eq. 16, we have not assumed anything about the photonic state. This means that we can use electron combs as a tool to displace any photonic state, regardless of its distribution. This is precisely what we show in the next section, where we generate the well-known displaced Fock state.

There is additional motivation for displacing coherent states: (i) Amplifying existing coherent states. (ii) Creating coherent states in regimes of the electromagnetic spectrum for which it is challenging to create them [deep ultraviolet (UV), terahertz, etc.]. This challenge often arises from the lack of gain mechanisms at the desired frequencies. The free electron can, in principle, provide a gain mechanism at any frequency. (iii) Controlling the absolute phase of the coherent state and correlate it to the phase of the laser preparing the comb electron. This can be useful for locking the phase of the created coherent state to the phase of another laser.

### Creation of displaced Fock states

Displaced Fock states (*50*) have proven useful for the direct measurement of Wigner functions (*51*, *52*), quantum dense coding (*53*), and fundamental tests of quantum mechanics (*54*). Once the phenomenon in the “Displacement of photonic coherent states” section is understood, the creation of photonic displaced Fock states is very simple. As we show in Fig. 6A, the interaction scheme is very similar to that in the Displacement of photonic coherent states section, except, now, our input photonic state is a Fock state and not a coherent state. Recall, as in Eq. 16, that a QPINEM interaction with an electron comb (an eigenstate of *b*) is equivalent to applying *D*(β*g*_{Qu}) to the input photonic state. These displacements add up between interactions. That means that after, say, *M* interactions, our output photonic state will be*N*, α⟩ for displaced photonic Fock states. The first argument represents the Fock state that we displace, and the second argument tells us by how much. Do note, however, that like in the Displacement of photonic coherent states section, we cannot obtain true displacement because that would require an infinite electron comb, a true eigenstate of *b*. In our simulation, we again use finite combs and get a very good result, nonetheless.

In addition, more explicit expression for the output photonic state may be found from Eq. 18 as_{p} is a coherent photonic state defined by α = *M*β*g*_{Qu}, like in Eq. 18. We again find a sum of photon-added coherent states, like in Eq. 14 in the Electron interaction with a coherent state: Generalizing the conventional PINEM interaction section, albeit a finite one, with different summing coefficients.

In Fig. 6B, we show several generated displaced Fock states and their evolution over multiple interactions with electron combs. For each initial Fock state *N*_{i}, we end up with *N*_{i} + 1 peaks that seem roughly Poissonian. The more interactions we perform, the more we displace the Fock state, thus giving it more energy (for our chosen *g*_{Qu} and β) and giving each peak a more clear distinctive shape.

### Analysis of experimental feasibility

We now move to consider more realistic parameters to test the above concepts experimentally. The first important parameter is the cavity lifetime. The existence of a finite cavity lifetime τ is due to the different leakage channels of the cavity. For the scenarios in which we perform multiple electron interactions, we denote Δ*t* as the time between arrivals of consecutive electrons. In this case, we can directly generalize the process expressed in Eqs. 9 to 11 by using a Lindblad master equation, instead of just the Schrödinger equation. Specifically, we need to update the photonic density matrix between consecutive electrons (between Eqs. 10 and 11) as*t*/τ ≪ 1 (for a single interaction; or *M*Δ*t*/τ ≪ 1 for *M* consecutive interactions), i.e., a long cavity lifetime or a short duration between the arrival of consecutive electrons. For example, Δ*t* is related to the laser repetition rate in laser-driven electron emission (*20*).

Let us consider typical parameters in current PINEM experiments. Recent PINEM works demonstrated free-electron interactions with cavities having a lifetime of up to 260/340 fs (*39*, *40*). Our UTEM setup, and others, currently perform PINEM experiments with electron currents of <0.1 nA, which corresponds to Δ*t* > 1 ns. These values result in Δ*t*/τ much greater than one, i.e., the photonic state in the cavity will decay before the next electron arrives. One way to reduce Δ*t*/τ is to work at higher currents, which can be done by either increasing the number of electrons per pulse (estimated to reach thousands in femtosecond pulses and millions in nanosecond pulses), or to increase the repetition rates (i.e., approaching gigahertz instead of the current megahertz). The resulting current will then reach ~100 nA, which is typical in certain electron microscopes [especially ones used for cathodoluminescence (*55*)]. Such currents correspond to a picosecond lifetime for which Δ*t*/τ ≪ 1 could hold. Another way to reduce Δ*t*/τ is to use higher *Q* cavities, which will require working with laser excitations of narrower bandwidths, as in nanosecond lasers (*56*). Cavities with *Q* of 10^{8} are used with continuous wave lasers (*57*). Of special interest for free electron experiments are cavities of extended geometries that can enable elongated and prolonged interactions (*38*, *58*) to reach a higher *g*_{Qu}. Such cavities can be designed using phenomena such as photonic bound states in the continuum (*59*), recently reaching *Q* of 5 × 10^{5} by exploiting topological phenomena (*60*).

While designated experiments for our purpose of shaping the quantum statistics of light are still beyond reach, there is substantial progress in that direction in very recent experiments. What is likely the most promising avenue is combining PINEM with photonic cavities (*39*, *40*) and PINEM with elongated structures (*38*, *58*).

The same experimental platforms that we consider here were proposed and used before to create novel nanophotonic light sources, driven by free electrons, but so far without controlling the quantum photon statistics. This way, our formalism and predictions can contribute to the growing interest of recent years in novel free-electron light sources based on nanophotonic structures and high *Q* cavities (*61*), for example, Smith-Purcell sources such as the “light well” (*62*), some requiring low electron energies (*63*), reaching the infrared telecom wavelength (*64*), and the deep UV (*65*). Other interaction geometries with nanophotonic structures and materials involve metamaterials (*66*, *67*), metasurfaces (*68*), and 2D materials (*69*–*71*) for generating light in various spectral regimes up to x-rays and gamma rays. Such nanophotonic light sources are attractive because of their tunable wavelength. Our work presents the prospect of controlling additional properties of light in future light sources, particularly, their photon statistics. Our analysis points to an additional advantage of free-electron light sources: The electron interaction provides a way for heralding and postselecting by the electron tells us when the photon state was created. We further note that the formalism that we presented is general: It captures many effects beyond what was discussed in this work, for example, Cherenkov radiation from multiple consecutive electrons (starting with a vacuum photonic state).

## DISCUSSION AND OUTLOOK

At its core, the QPINEM theory describes a fundamental interaction between two quantum systems: the free-electron energy ladder and the harmonic oscillator (which describes the photonic cavity). It is interesting to compare the QPINEM Hamiltonian with related Hamiltonians in which the harmonic oscillator interacts with other quantum systems, specifically, where it interacts with (i) a two-level system or (ii) another harmonic oscillator.

The first case, interaction of a two-level system with a quantum harmonic oscillator (a cavity) under the rotating wave approximation, is also known as the Jaynes-Cummings model

We note that this model has the same interaction Hamiltonian as QPINEM (Eq. 3), only replacing the *ev* · *A _{z}*(

*z*) by

*g*σ

_{+}(or, equivalently, has the same

*S*as QPINEM, only replacing the

*b*

^{†}operator in

*S*by σ

_{+}). The first term in Eq. 21 is the energy of the photonic mode of frequency ω. The second term is the two-level system energy, where Δ

*E*is the energy difference between the excited and ground state and σ

*is the corresponding Pauli matrix. The third term represents the interaction, where*

_{z}*g*is the atom-field coupling constant and σ

_{±}is the raising and lowering operators for the two-level system. The main characteristic of such an interaction is that only one quantum of energy can be exchanged per interaction, at most. Meanwhile, free electrons have the unique property of being able to exchange many quanta of energy every interaction, which is especially attractive when looking to generate a light state with many photon.

Two notable examples of systems that can be described by the Jaynes-Cummings Hamiltonian were studied by the groups of Schleich and Haroche (*13*, *14*). They proposed to launch beams of atoms (instead of electrons) through a photonic cavity in an attempt to shape the photonic quantum state in the cavity. Similarly to electrons, the works in (*13*, *14*) propose iterative preparation of the atoms’ states before interaction with the photonic cavity and measurements of the atomic states after the interaction. Specifically, one main strength of (*13*) is the ability to plan the exact needed two-level system states to achieve any desired photonic state. This scheme assumes postselection after every iteration, so that each atom must come out at the ground state every time, or else the process must be restarted from vacuum. Part of the electron-cavity interaction schemes that we proposed can be seen as direct analogs of the atom-cavity schemes (e.g., the Electron interaction with a coherent state: Generalizing the conventional PINEM interaction and Creation of photonic Fock states sections). However, the schemes that we propose in the Thermalization of coherent photonic states, Displacement of photonic coherent states, and Creation of displaced Fock states sections do not have an analog, as they do not require measuring the electron after the interaction. It is interesting to consider taking these concepts back to the atom-cavity interactions to develop new ways to shape light in cavities with no limits arising from postselection.

The second case, interaction of two quantum harmonic oscillators (cavities), is described by the following Hamiltonian*g* is the coupling strength and, this time, *b* and *b*^{†} represent the annihilation and creation operators in the second cavity. This interaction represents the classical coupling between two cavities in linear optics. Such an interaction can describe leakage of light from one cavity to another and can describe back-and-forth oscillations between the cavities. Overall, such an interaction usually describes the transfer of an existing quantum state of light from one cavity to the other and does not create new quantum states that were not there to start with. In contrast, our manuscript shows that the unique nature of the electron-photon interaction can create novel quantum states.

The comparison of Eqs. 3, 21, and 22 provides an intriguing way of looking at electron-light interactions. For the interaction of a highly populated cavity with an empty cavity, the delta electron is the analog of a Fock state, and the comb electron is the analog of a coherent state, meaning that the quantum states created by an interaction with coherent and Fock states correspond to the quantum states created by an interaction with comb and delta electron states, respectively. This analogy emphasizes the prospects of using electrons for new capabilities in the field of quantum optics. For one, it is much easier to create a delta electron than a Fock state of many photons. Moreover, the comb electron interaction can create a coherent excitation with the advantages that are unique to electrons and are beyond reach for coherent light, such as deep subwavelength spatial resolutions, as in electron microscopy.

Looking at the bigger picture, it is valuable to ask what quantum photonic states could eventually be created from general free electron–cavity interactions. This is connected to a fundamental question in mathematical physics because the underlying interaction is of an energy ladder and a harmonic oscillator. A big question is whether such an interaction could provide a platform to shape any desirable photon statistics or whether it is inherently limited to some subset of states.

Lastly, there is a fundamental question that arises from our work and connects to the act of measurement in quantum mechanics: Is it correct to make a partial trace out of the electron after each interaction? It may be that in rapid interactions, the first electron is not yet “measured” by the time the second electron interacts with the system. Mathematically, this question amounts to asking whether the formulation that we presented in Eqs. 9 to 11 is still accurate if some of the electrons are only measured after another electron interacts with the cavity. Physically, this means that consecutive electrons become entangled (*36*, *37*, *72*), which opens up possibilities to implementing quantum gates (*73*) for manipulation of the electron quantum state.

## SUPPLEMENTARY MATERIALS

Supplementary material for this article is available at http://advances.sciencemag.org/cgi/content/full/7/11/eabe4270/DC1

This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial license, which permits use, distribution, and reproduction in any medium, so long as the resultant use is **not** for commercial advantage and provided the original work is properly cited.

## REFERENCES AND NOTES

**Acknowledgments:**We thank A. Gorlach and O. Kfir for valuable discussions.

**Funding**: This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 851780-ERC-NanoEP, the Israel Science Foundation (grant no. 830/19), and the Binational USA-Israel Science Foundation (BSF) 2018288. A.K. is supported by the Adams Fellowship Program of the Israel Academy of Science and Humanities.

**Author contributions**: A.B.H., O.R., and I.K. initiated and devised this work. A.B.H. and J.N. performed the numerical simulations. A.B.H., A.K., and N.R. developed the theory. A.B.H., O.R., and I.K. wrote the manuscript. All authors reviewed and discussed the manuscript and made significant contributions to it.

**Competing interests**: The authors declare that they have no competing interests.

**Data and materials availability**: All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Additional data related to this paper may be requested from the authors.

- Copyright © 2021 The Authors, some rights reserved; exclusive licensee American Association for the Advancement of Science. No claim to original U.S. Government Works. Distributed under a Creative Commons Attribution NonCommercial License 4.0 (CC BY-NC).