## Abstract

Controlling the temporal mode shape of quantum light pulses has wide ranging application to quantum information science and technology. Techniques have been developed to control the bandwidth, allow shifting in the time and frequency domains, and perform mode-selective beam-splitter-like transformations. However, there is no present scheme to perform targeted multimode unitary transformations on temporal modes. Here we present a practical approach to realize general transformations for temporal modes. We show theoretically that any unitary transformation on temporal modes can be performed using a series of phase operations in the time and frequency domains. Numerical simulations show that several key transformations on temporal modes can be performed with greater than 95% fidelity using experimentally feasible specifications.

© 2020 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. Introduction

The ability to manipulate the mode structure of light enables numerous technologies, both quantum and classical, ranging from long-distance telecommunications to microscopy. Quantum applications such as quantum key distribution [1], boson sampling [2], linear optics quantum computing [3] and continuous-variable quantum information processing [4] all rely upon unitary transformation of optical modes for the encoding, manipulation and measurement of quantum information. Over the past decade significant progress has been made to implement multimode transformations with high fidelity and low loss by utilizing integrated optical platforms. This work has primarily focused on polarization and spatial degrees of freedom [5]. More recently, time and frequency encoding has come to the fore as a promising platform for encoding quantum information in optical fields [6,7]. There are different approaches to encoding information in the time-frequency degree of freedom. Approaches to utilise wavelength-(time-) division multiplexing, which encodes information in non-overlapping frequency (time) bins of single photons, for quantum applications have been recently introduced [8,9]. Here we consider temporal modes, which overlap in both time and frequency, but are nevertheless orthogonal. Manipulation of temporal modes by means of nonlinear optical interactions have recently been discussed for quantum applications [10]. Analogous to transverse spatial modes such as the Laguerre-Gauss modes that carry orbital angular momentum, these overlapping modes form a useful orthonormal basis in which to encode quantum information and arise naturally in many common quantum light sources such as spontaneous parametric down conversion [10,11].

To address the temporal modes of light for quantum applications most efforts have focused on nonlinear optical means for control [7,12–17]. The quantum pulse gate (QPG) [12,13,15] is a key building block for nonlinear optical methods to control temporal modes which acts, in theory, as a temporal mode beam splitter. To realize multimode transformations using the QPG requires sequential application of multiple QPGs with both high selectivity and high efficiency and appropriate relative phase shifting between the ancilla and fundamental modes of the pulse gate [10], which has yet to be demonstrated with quantum light. Alternatively, linear-optical methods using acousto- and electro-optic temporal phase modulation and dispersive spectral phase manipulation of pulsed modes have shown promise for quantum applications [18–20]. However, a complete prescription for manipulating temporal modes using linear-optical methods has yet to be developed.

Recent experiments with phase-only manipulation of optical pulses have demonstrated spectral shearing [18,19] and bandwidth manipulation [20]. These techniques have been developed using the optical space-time analogy [21], in which the evolution of a pulsed and transverse-spatial modes can be mapped onto equivalent equations of motion. Examples include the time lens [22,23] and the dispersive Fourier transform [21,24,25]. Both of these applications have been implemented using off-the-shelf components.

In this paper we present a general recipe for implementing targeted unitary transformations on temporal modes through the use of temporal phase modulation and spectral dispersion. First we introduce the mathematical framework by which these transformations can be described. Then we introduce an experimental apparatus that can perform these transformations based upon electro-optic phase modulation and chirped fiber Bragg gratings. Numerical simulations are then presented that show the performance of the proposed experimental apparatus. The simulations, performed on select single-mode and multi-mode transformations applicable to quantum applications, take into account realistic specifications for the modulators and gratings.

## 2. Theory

To describe the quantized electromagnetic field one must first decompose the field into an appropriate set of orthonormal field modes that satisfy the Maxwell equations [26]. Here we choose to focus on a paraxial geometry, such as found within integrated optical systems or in beam-like propagation directed along the $z$-axis. In addition, we assume pulsed modes traveling with group velocity $v_g$ in which the slowly-varying envelope approximation holds, that is, where the temporal envelope of the pulse changes on a time scale significantly longer than an optical-carrier cycle period, $T_0=2\pi /\omega _0$. In these limits the electric field vector can be expressed as

Here the summation is taken over a set of discrete, orthonormal modes describing the transverse spatial, $\{u_{m}(\textbf{r})\}$, temporal, $\{\psi _{m}(t-z/v_g)\}$, and polarization, $\{\textbf{e}_{m}\}$, degrees of freedom of the field. These are weighted with a complex amplitude, $\alpha _{m}$, and have associated wave vector, $k_{0}$, and carrier frequency, $\omega _{0}$, which are all labelled by a non-negative integer $m$. Here we focus on the temporal modes $\{\psi _{m}(t-z/v_g)\}$ of the field and consider the case in which only a single polarization $\bf {e}$ and transverse spatial mode $u(\textbf{r})$ are excited. Dropping the polarization and transverse spatial mode dependence, the electric field in the time domain is thus

In the following, we will work in the reference frame of the pulse traveling at the group velocity, $v_g$, along the $z$-axis, and thus drop the $z$-dependence of the temporal modes. The temporal modes form a complete set that can be used to expand an arbitrary pulsed signal and obey the orthonormality relation

Note that a temporal mode $\psi _{m}(t)$ can also be represented by its Fourier transform, ${\tilde {\psi }}_{m}(\omega )$, in the frequency domain, where the orthonormality condition still holds

Standard techniques to control the pulse mode of light involve either filtration or amplification in the frequency or time domain [27,28]. Such an approach to pulse shaping is incompatible with quantum states of light owing to added noise and reduction in the signal arising from amplification and loss. These lead to the destruction of the fragile quantum coherences between different photon-number components of the state. To preserve the quantum state of light occupying different temporal modes when modifying the mode structure thus requires unitary, i.e. phase-only, manipulation.

A simple example of how application of phase can modify the amplitude distribution of a pulse is the time domain analogy of Fraunhofer diffraction, known as the dispersive Fourier transform [21,25]. Consider a transform-limited pulse $\psi (t)$ and its Fourier transform $\tilde {\psi }(\omega )$. After propagating through a medium with second-order dispersion characterized by the group delay dispersion (GDD) $\delta$, which applies a quadratic spectral phase to the pulse, the spectral mode amplitude is

where $\omega _{0}$ is the central frequency of the pulse [27,29]. The amplitude of the pulse in the time domain becomes a convolution of the original temporal mode with the Fourier transform of the quadratic spectral-phase factor and can be expressed asThe frequency argument of the Fourier transform is $\omega = {2t}/{\delta }$. By the analogy to spatial diffraction this is called the temporal far-field condition and is satisfied approximately when

Thus by introducing sufficient group-delay dispersion to satisfy the temporal far-field condition of Eq. (8) the temporal profile of the pulse becomes a scaled replica of the spectrum. The dispersive Fourier transform is a phase-only operation and thus a unitary transformation of the field modes, which makes it compatible for use with quantum states of light. Indeed, this technique has been used to measure the spectrum of single-photon pulses using highly-dispersive optical fibers [24] and chirped-fiber Bragg gratings [30] along with time-resolved single-photon detection.

Inspired by methods to implement programmable unitary transformations on transverse spatial modes, demonstrated through the use of sequential application of spatial phase and diffraction [31], we present here an approach to realize temporal mode unitary transformations by application of temporal phase and dispersion. This approach follows from the fact that unitary transformations can be decomposed into a sequence of applied phases and Fourier transforms [32,33]. In practice, we consider discretized field modes $\psi _i=\psi (t_i)$ that are sampled versions of the mode functions at discrete times $\{t_i\}$, with $i$ a positive integer labeling sample time. In this case the continuous modes become vectors and the unitary transformations become unitary matrices. The unitary matrices can then be decomposed into a sequence of diagonal unitary matrices and discrete Fourier transforms [33]. For a given unitary matrix $U$ its decomposition can be written as

where the $D_{j}$ are diagonal unitary matrices, $\mathfrak {F}$ is the discrete Fourier transform, and $\mathfrak {F}^{\dagger }$ is its inverse. This decomposition is at the heart of our approach to implementing programmable unitary temporal mode transformations. It requires the ability to perform sequential application of phases in the temporal and spectral domains. Here we propose a method to implement such temporal mode unitary transformations using a sequence of dispersive Fourier transforms and application of temporal phase profiles.## 3. Proposed implementation

To implement a targeted temporal mode transformation $U$ a sequence of phases can be achieved by application of temporal phase followed by the dispersive Fourier transform, which maps the spectral amplitude of a pulse onto its temporal envelope as in Eq. (8). As the spectrum has been mapped onto the temporal envelope, application of a time-varying phase implements a spectral phase to the original pulse. This is followed by the inverse dispersive Fourier transform, which can be achieved using a medium with the same magnitude GDD, but opposite sign.

Here we consider temporal phase modulation implemented using an electro-optic phase modulator (EOPM). The phase applied to an optical field traveling through an EOPM, $\phi (t)$, is determined by the electronic voltage, $V(t)$, that drives the modulator and the intrinsic electro-optic response of the EOPM itself. The applied phase is proportional to the driving voltage, $\phi (t)=V(t)/V_{\pi }$, given that the driving signal does not exceed the electronic bandwidth of the modulator, which we denote $B$. Here $V_{\pi }$ is the voltage required to achieve a $\pi$ phase shift at the highest operating frequency of the modulator. Therefore the temporal phase profiles that can be applied are restricted by the capabilities of the EOPM, encapsulated by $V_{\pi }$ and $B$, and the electronics available that generate and deliver the driving voltage $V(t)$.

The phase modulation bandwidth $B$ restricts the frequencies of the phase profiles that can be applied. Traveling-wave EOPMs are capable of modulation bandwidths in the tens of gigahertz region with low $V_{\pi }\approx 2$ V. State-of-the-art modulators have demonstrated electronic bandwidth up to $B \approx 100$ GHz with $V_{\pi }=2.3$ V [34]. Similarly, arbitrary waveform generators for radio-frequency (RF) generation can produce electronic signals with up to $100$ GHz bandwidth and $2$ V amplitude. Thus in the following we consider temporal mode transformations composed from temporal phase modulation with phase modulation bandwidths in the $1-100$ GHz region.

The dispersive Fourier transform in Eq. (8), which maps the spectral amplitude onto the temporal amplitude of the pulse, is performed by applying GDD, $\delta$, a quadratic spectral phase, to the pulse. This can be applied by propagating through a length of optical fiber. The length required is proportional to the square of the temporal duration of the pulse. Performing a Fourier transform on a pulse with a temporal duration of $\tau _p=10$ ps with $800$ nm central wavelength would require $10$ km of optical fiber. Depending on the wavelength regime, a fiber of this length would introduce significant loss, which cannot be tolerated for unitary transformations. Another approach to achieve second-order spectral dispersion is by using a chirped fiber Bragg grating (CFBG), which can apply a large amount of dispersion with relatively low loss compared with an optical fiber. CFBGs can be manufactured with quadratic dispersion equivalent to that achieved in over $10$ km of fiber. In addition, a CFBG can easily implement both positive and negative GDD by simply reversing the direction into which light is launched into the CFBG. In either case, however, there is a finite limit to the GDD, $\delta$, that can be implemented using a fiber or CFBG, which effectively places an upper limit on the temporal duration of the pulses used.

The bandwidth constraint of the EOPM and the upper limit on GDD determines the range of temporal widths of the pulses that should be used. For instance consider an EOPM with $B=50$ GHz bandwidth. According to the sampling theorem we can generate a temporal phase profile by defining samples at approximately $10$ ps intervals. This places a lower limit on the temporal width of optical pulses that can be addressed. In general, a transformation on $N$ temporal modes requires pulses to have sufficient duration so that $N$ samples of the phase modulation can be applied across them so that there are enough independent degrees of freedom to operate on each mode.

The number of samples applied to the spectral phase must also be considered. For a Gaussian pulse with a temporal duration $\tau$ the spectral width is $\nu = 8\ln (2)/\tau$. So after dispersive Fourier transform, by Eq. (7), the pulse will have a temporal duration $\tau _{\omega } = 4\ln (2)\delta /\tau$. Thus the total number of phase samples we have control over is proportional to $\tau _{\omega } + \tau$, which increases as $\tau$ gets smaller. Therefore, in order to maximize the number of degrees of freedom over the phase, the transform-limited pulse durations should be as small as possible while covering at least $N$ temporal phase samples.

#### 3.1 Proposed experiment

A unitary temporal mode transformation decomposed as in Eq. (9) can be implemented using the experimental setup depicted in Fig. 1. The apparatus consists of a series of EOPMs, circulators (C) and CFBGs. A pulse enters through the first phase modulator, which is driven by a shaped electronic signal such that the targeted phase, $\Phi _1(t)$, that realizes the diagonal element of the decomposition, $D_1$, in Eq. (9) is applied. The shaped electronic signal can either be generated by an arbitrary waveform generator or by photonic waveform generation methods, which must be precompensated to account for the response of EOPMs as well as any amplifiers used. The pulse then passes through a circulator and reflects off a CFBG with positive GDD, $\delta$, performing the Fourier transform (FT). The output of the circulator leads to another phase modulator which is driven to apply the second targeted phase, $\Phi _2(t)$, that realizes the diagonal element of the decomposition, $D_2$. The pulse continues through a second circulator and CFBG, the latter of which is oriented to apply negative GDD, $-\delta$, performing the inverse Fourier transform (IFT). This process is repeated, with the pulse passing through as many sets of phase modulators and CFBGs as needed according to the decomposition. Alternatively, one could achieve the same transformation by switching the pulse into a cavity comprised of two CFBGs with opposite signs as the mirrors and an EOPM inside the cavity.

Note that in an experiment with off-the-shelf components sequential use of phase modulators, circulators and fiber Bragg gratings will lead to compounding loss for each phase step of the transformation. The loss will scale exponentially with the number of steps. If there are no time- or frequency-dependent losses, which we anticipate for the pulse spectral and temporal regimes considered here, then loss commutes with the applied phase operations and can be included as a multiplicative factor of the resultant transformation. For the simulations in this paper we consider ideal lossless components.

## 4. Simulation

Although Eq. (9) indicates that any unitary transformation on the temporal modes has a decomposition as a sequence of temporal phase modulations and Fourier transforms, it does not provide a way to determine the form of the phases required or the number of factors in the decomposition of a given transformation. Furthermore, we are not able to implement arbitrary temporal phase profiles since the bandwidth and driving voltage of the EOPMs are constrained. To demonstrate that such a unitary decomposition works in a practical setting, we present numerical simulations that determine an optimal set of phases for a fixed number of phase factors within the sequence to implement select targeted unitary transformations. These simulations takes into account the finite bandwidth of the EOPMs as well as the driving electronics.

A unitary transformation $U$ can be represented in various bases. Here we will work in either the time basis or the basis of Hermite-Gaussian (HG) modes defined by

Each simulation begins with a targeted transformation, $U$, which we express in the HG basis. For example $U_{i,j}$ represents the component of the input temporal mode that overlaps with the $j^\textrm{th}$ HG mode, $HG_j$, that is mapped to the $i^\textrm{th}$ output HG mode, $HG_i$. A unitary transformation is completely determined by its action on a complete set of input modes. Thus, for a given simulation we calculate the output of the realistic transformation, $T$, when acting on the set of input HG modes $\{HG_{m}(t)\}$, which gives output modes $\{\chi _m(t) = T \cdot HG_{m}(t)\}$. The output modes are then compared with the targeted output modes $\{\xi _{m}(t) = U\cdot HG_{m}(t)\}$, with $m=1,2,\ldots$, that would be the ideal output of the transformation.

To find an optimal realistic transformation $T$ for a fixed number of phase applications, denoted $N$, constrained by finite electronic bandwidth, $B$, and half-wave voltage, $V_{\pi }$, of the EOPMs and driving electronics and the limited dispersion available, $\delta$, we use a modified simulated-annealing algorithm [35]. Each simulation begins with discretization of the input $\{HG_{m}(t)\}$ and target $\{\xi _{m}(t)\}$ modes, which have transform limited duration of approximately $\tau _{p} \approx M/2B$, where $M$ is the number of modes involved in the target transformation. This choice of $\tau _{p}$ is to ensure that the modes are wide enough to be independently modulated. For each simulation the modes are defined on a temporal window of $1$ ns, chosen to be several times wider than the longest pulses so that any temporal shifts or temporal broadening caused by the spectral phase modulation will remain within this window. They are sampled at a rate higher than twice the spectral width of the modes to prevent aliasing. The phase modulations, $\Phi _n(t)$ are initially generated by random samples in the range $[0,\pi ]$ at the frequency $2B$ corresponding to the phase modulation bandwidth $B$. This ensures that the generated phases can reach $V_{\pi }$ while remaining within the electronic bandwidth constraints. They are then interpolated to the same sampling rate as the modes. The dispersive Fourier transform is simulated by performing a fast Fourier transform (FFT) on the modes, multiplying each mode by a quadratic spectral phase, and then performing an inverse FFT.

The set of input modes is operated on alternately by the phase modulations and dispersive Fourier transforms up to a predefined number of steps, $N$, where a step is defined as the application of a phase modulation and the dispersive Fourier transform. After the final step the transformed input modes, $\{\chi _{m}(t) = T \cdot HG_{m}(t)\}$, are compared to the target modes, $\{\xi _{m}(t) = U \cdot HG_{m}(t)\}$, using a cost function tailored to the type of transformation performed, either a one-to-one mode mapping or $M$-to-$M$ mode mapping as described below. This cost function is minimized using a simulated annealing algorithm to optimize the phases.

#### 4.1 Single-mode transformation

When transforming one input pulse, $\psi (t)$, to an output targeted pulse, $\xi (t)$, there are, in principle, an infinite number of unitary transformations that can achieve this objective. Our simulations on such single-mode transformations aim to determine the $N$ applied phases $\{\Phi _j(t)\}$, $j=1,\dots ,N$, subject to experimental constraints that optimizes the overlap of the output and target modes. The simulated-annealing algorithm initializes the set of $N$ phases, $\{\Phi _j(t)\}$, by randomly setting each phase sample in the range $[0,\pi ]$. From these phases the transformation $T=\mathfrak {F}^{\dagger }D_{N}\cdots \mathfrak {F}D_{2}\mathfrak {F}^{\dagger }D_{1}$ is computed. This transformation is then applied to the input mode, $\psi (t)$ to give an output mode, $\chi (t)=T\cdot \psi (t)$. We use the fidelity as a measure of closeness between the output and target modes, defined as the modulus squared of the overlap of the output mode with the target mode

The algorithm generates an additional set of phases $\{\bar {\Phi }_j(t)\}$, $j=1,\dots ,N$ by randomly perturbing a small number of samples from the phases in the original set. The corresponding transformation $\bar {T}=\mathfrak {F}^{\dagger }\bar {D}_{N}\cdots \mathfrak {F}\bar {D}_{2}\mathfrak {F}^{\dagger }\bar {D}_{1}$ is calculated along with the output mode $\bar {\chi }(t)=\bar {T}\cdot \psi (t)$ and fidelity $\bar {F}$. The simulated annealing algorithm [35] starts with a temperature $K$. In each iteration the new set of phases is compared to the prior set of phases by computing $\Delta F = \bar {F}-F$. The new set of phases is taken with a probability $P(\Delta F)=e^{\frac {\Delta F}{K}}$, otherwise the initial phase settings are kept. The temperature is lowered with each iteration. The simulation results in a fidelity $F \leq 1$, where the maximum $F = 1$ would be the fidelity of the ideal transformation. For single-mode transformations we use this fidelity as the cost function, so the simulation maximizes the fidelity. Note that $L=1-F$ gives the loss associated with the transformation into modes orthogonal to the target mode.

As an example we simulate the transformation of a $0^\textrm{th}$-order HG mode with $\sigma = 10$ ps to a $5^\textrm{th}$-order HG mode with the same $\sigma$ value. The phase modulation bandwidth is restricted to $B=40$ GHz, and the simulation is performed for several different step numbers, $N$. The results shown in Fig. 2 depict the output pulse intensity profile, $I(t)=|\chi (t)|^2$ for phase steps of $N=2,4,6,8$. We see that the fidelity increases with step number, reaching $F=0.994$ after $8$ steps. Note that only after four phase settings, which implies two sets of combined spectral and temporal phase applications, nearly $95$% fidelity can be achieved. The four phases required to perform this four-step transformation are shown in Fig. 3.

To determine how the fidelity behaves with the number of steps we simulate the same $HG_0$ to $HG_5$ mode transformation over large range of steps for modulation bandwidths of $B=5, 10, 20$ GHz, keeping the pulse duration parameter, $\sigma = 10$ ps, fixed. The results, shown in Fig. 4, indicate that for a fixed modulation bandwidth and pulse duration fidelity plateaus and additional phase modulation steps do not significantly lead to increased fidelity. We also see that increased bandwidth leads to higher achievable fidelity and convergence to this fidelity in fewer steps. This leads one to conjecture that there are some transformations that are infeasible under realistic constraints. Furthermore, this indicates that there is a trade off in the resources needed for an experiment, quantified by the modulation bandwidth available and the number of phase steps required to achieve a target transformation.

#### 4.2 Multi-mode transformations

Now we turn our attention toward multi-mode transformations. Here we consider $M \times M$-dimensional transformations acting on a basis of $M$ HG modes. The transformation $U$ maps $M$ input HG modes onto a set of $M$ orthonormal target output modes $\{\xi _m(t) = U \cdot HG_m(t)\}$. We simulate this transformation using a similar procedure as used in the single-mode case. For a fixed number of phase modulation steps, $N$, the set of $N$ phases, $\{\Phi _j(t)\}$, is again initialized by randomly setting each phase in the range $[0,\pi ]$. The realistic transformation $T=F^{\dagger }D_{N}\cdots FD_{2}F^{\dagger }D_{1}$ is calculated using the dispersive Fourier transform and is applied to each of the $M$ input modes simultaneously. We can define an $M$-by-$M$ matrix $U$ for the target transformation on the $M$ HG modes, where the matrix elements in the HG-mode basis are given by the overlap of the target modes with the HG modes

Similarly, we define a matrix $T$ for the output of the simulation where the output modes of the transformation, $\{\chi _j(t)\}=\{T \cdot HG_j(t)\}$ replace the target modes in Eq. (12), giving

To evaluate the effectiveness of the transformation generated by this procedure we define the fidelity as

where $\textrm{Tr}(\cdot )$ is the trace operation. Note that while the trace is only over the $M$ HG modes the transformation $T$ may send energy into modes outside this $M$-mode subspace. To quantify this we introduce two new quantities related to the fidelity byHere $P$ is the success probability

which quantifies the probability that the output modes resulting from the transformation remain in the chosen $M$-mode subspace. A transformation that has a value of $P < 1$ means that there is loss into the other temporal modes. Note that $P$ does not account for other system losses, e.g. propagation or insertion loss. The other quantity used to evaluate the simulated transformation is the Hilbert-Schmidt fidelity [36]This can be interpreted as the probability that, given the output modes stay in the target subspace, the desired transformation is implemented. An optimal transformation would result in $P = 1$ and $F_{HS} = 1$.

After applying the phase modulations to the input pulses we calculate the matrix elements of the transformation as in Eq. (13). The phases are then optimized to maximize the fidelity, Eq. (15), using the iterative simulated annealing algorithm. We then compute the success probability and Hilbert-Schmidt fidelity. Here we consider three targeted multi-mode transformations.

### 4.2.1 Hadamard transformation

To begin with we demonstrate the ability of this system to implement a beam splitter, or Hadamard, transformation between two HG modes, which is represented by a matrix in the space of the two HG modes as

For this simulation we use the $0^\textrm{th}$- and $5^\textrm{th}$-order HG modes as our two-mode subspace, with equal pulse duration parameter, $\sigma = 10$ ps. The applied phases, subject to a modulation bandwidth constrained to $B=20$ GHz, are optimized to maximize the Hilbert-Schmidt fidelity $F_{HS}$. The temporal mode outputs for each input resulting from this simulation using $N=6$ steps are depicted in Fig. 5.

The output modes of the simulation closely match the target modes of the desired transformation with overlap fidelities $F_{1} = 0.923$ and $F_{2} = 0.952$. The presence of rapid oscillations outside the main peaks of the amplitudes in Fig. 5 can be considered as loss into higher-order HGn modes outside of the two-mode subspace. This contributes to a success probability $P=0.941$ that is less than the ideal value of $1$. The output matrix $T$ of this transformation is

The Hilbert-Schmidt fidelity of this matrix with the target in Eq. (18) is $F_{HS} = 0.999$. The success probability $P=0.941$ indicates loss into the other HG modes, but the high Hilbert-Schmidt fidelity indicates that within the two-mode subspace the transformation performs well.

### 4.2.2 Four mode Hadamard transformation

In principle, we should be able to perform targeted transformations on an arbitrarily large number of modes. However, we have seen that experimental constraints restrict the types of transformations that can be performed and may also impact the number of modes that can be addressed in a given experimental configuration. As an example we simulate a four-mode Hadamard transformation between the first four HG modes defined by the matrix

This transformation is simulated using a $B=20$ GHz bandwidth modulator and $N=12$ phase steps. The output matrix $T$ from the simulation was

From this matrix we compute a Hilbert-Schmidt fidelity with the target matrix in Eq. (20) of $F_{HS} = 0.975$ and a success probability $P = 0.852$. For this transformation as well as for the two-mode Hadamard transformation the fidelity and success probability increase with the number of steps. As shown in Fig. 6 the four-mode transformation requires more steps to converge than for the two-mode transformation, and the success probability converges to a lower value.

#### 4.3 Demultiplexer

As a final application of this system we look at a temporal-mode demultiplexer, which sorts HG modes centered at one time into Gaussian pulses temporally separated such that a fast detector could distinguish them by time of arrival. This application could also be performed using a sequence of quantum pulse gates [37], which would require a separate pulse gate for each additional modes. The advantage to our approach is that it could be performed with one device, no matter how many modes are considered.

By separating the HG-modes into separate time bins the information encoded in the temporally-overlapping HG modes can be read out using a time-resolved detector. We simulate this operation on the first three HG modes with a temporal duration parameter $\sigma = 20$ ps, demultiplexing them into individual Gaussian modes separated in time by $200$ ps. For this simulation we use the fidelity of Eq. (11) and optimize the set of applied phases to maximize the average fidelity of the three modes. The results of this simulation, shown in Fig. 7, for $N=0,4,8,12$ phase steps. To evaluate the efficacy of this transformation for demultiplexing we calculate the average signal-to-noise ratio (SNR) across the time bins. The SNR for each time bin given by the ratio of the energy in each time bin arising from the targeted mode to the energy in each time bin from the other two modes. For this transformation we find an SNR of $187$, $66$, and $88$ for modes $0$, $1$, and $2$ respectively. We see that this system is capable of performing the demultiplexing operation on three modes. After 12 steps the modes are demultiplexed with an average fidelity of $F = 0.977$.

## 5. Conclusion

A method to implement temporal mode transformations that are, in principle, unitary operations has been introduced. This has been shown to be experimentally feasible with current technology by means of numerical simulations. The approach uses a decomposition of the mode transformations into into a sequence of temporal phase modulations and Fourier transforms. The fidelity that can be achieved in our simulations is limited by the experimental constraints, including the electronic bandwidth of the EOPMs and available amount of optical dispersion. Under these constraints we have shown that transformations on up to four temporal modes with can be performed with fidelity greater than $95\%$. The number of steps needed to perform these transformations is proportional to the number of modes.

The simulations performed here neglected the effect loss. In principle, since each step to generate a temporal mode transformation involves phase-only operations the overall transformation should be lossless. However, in a realistic experimental setup each component would contribute to loss in the system. In the spectral and temporal regimes considered in this paper we do not anticipate time- or frequency-dependent losses. But insertion losses can have an impact on the overall transmission probability of the transformations. Typical off-the-shelf EOMs have insertion losses on the order of 2-4 dB. This loss would scale exponentially with the number of steps, making transformations involving a large number of steps unrealistic. The amount of loss depends highly on the particular implementation used. It is possible to perform these transformations in free-space or on chip using integrated components. The development of on chip quantum circuits is an ongoing process that has the potential to greatly reduce losses [17,38].

A further experimental challenge to be overcome is the generation of the electronic signals needed to drive the EOPMs. Each phase modulator must be driven by a different specified electronic signal for each step in the decomposition, and these must be synchronized with the arrival of the pulse at the EOPMs. Novel schemes to solve this problem have recently been demonstrated by using photonic waveform generation [39].

The implementation of this system would enable targeted multimode unitary transformations on temporal modes. This would allow the use of the temporal modes as a basis for encoding quantum information with wide ranging applications from computing and communications to dynamic spectroscopy and sensing.

## Funding

National Science Foundation (1620822); Defence Science and Technology Laboratory (DSTLX-100092545); Horizon 2020 Framework Programme (665148).

## Acknowledgments

The authors thank Michał Karpiński, Michael Raymer and Nicolas Treps for helpful discussions.

## Disclosures

The authors declare no conflicts of interest.

## References

**1. **C. H. Bennett and G. Brassard, “Quantum cryptography: Public key distribution and coin tossing,” in Proceedings of IEEE International Conference on Computers, Systems, and Signal Processing, vol. 175 (1984), p. 8.

**2. **S. Aaronson and A. Arkhipov, “The computational complexity of linear optics,” Theory Comput. **9**(1), 143–252 (2013). [CrossRef]

**3. **P. Kok, W. J. Munro, K. Nemoto, T. C. Ralph, J. P. Dowling, and G. J. Milburn, “Linear optical quantum computing with photonic qubits,” Rev. Mod. Phys. **79**(1), 135–174 (2007). [CrossRef]

**4. **C. Weedbrook, S. Pirandola, R. García-Patrón, N. J. Cerf, T. C. Ralph, J. H. Shapiro, and S. Lloyd, “Gaussian quantum information,” Rev. Mod. Phys. **84**(2), 621–669 (2012). [CrossRef]

**5. **J. Wang, F. Sciarrino, A. Laing, and M. G. Thompson, “Integrated photonic quantum technologies,” Nat. Photonics **14**(5), 273–284 (2020). [CrossRef]

**6. **P. C. Humphreys, B. J. Metcalf, J. B. Spring, M. Moore, X.-M. Jin, M. Barbieri, W. S. Kolthammer, and I. A. Walmsley, “Linear optical quantum computing in a single spatial mode,” Phys. Rev. Lett. **111**(15), 150501 (2013). [CrossRef]

**7. **P. C. Humphreys, W. S. Kolthammer, J. Nunn, M. Barbieri, A. Datta, and I. A. Walmsley, “Continuous-variable quantum computing in optical time-frequency modes using quantum memories,” Phys. Rev. Lett. **113**(13), 130502 (2014). [CrossRef]

**8. **J. M. Lukens and P. Lougovski, “Frequency-encoded photonic qubits for scalable quantum information processing,” Optica **4**(1), 8–16 (2017). [CrossRef]

**9. **M. Pant and D. Englund, “High-dimensional unitary transformations and boson sampling on temporal modes using dispersive optics,” Phys. Rev. A **93**(4), 043803 (2016). [CrossRef]

**10. **B. Brecht, D. V. Reddy, C. Silberhorn, and M. G. Raymer, “Photon temporal modes: A complete framework for quantum information science,” Phys. Rev. X **5**(4), 041017 (2015). [CrossRef]

**11. **J. Nunn, L. J. Wright, C. Söller, L. Zhang, I. A. Walmsley, and B. J. Smith, “Large-alphabet time-frequency entangled quantum key distribution by means of time-to-frequency conversion,” Opt. Express **21**(13), 15959–15973 (2013). [CrossRef]

**12. **A. Eckstein, B. Brecht, and C. Silberhorn, “A quantum pulse gate based on spectrally engineered sum frequency generation,” Opt. Express **19**(15), 13770–13778 (2011). [CrossRef]

**13. **D. V. Reddy and M. G. Raymer, “High-selectivity quantum pulse gating of photonic temporal modes using all-optical ramsey interferometry,” Optica **5**(4), 423–428 (2018). [CrossRef]

**14. **N. Sinclair, E. Saglamyurek, H. Mallahzadeh, J. A. Slater, M. George, R. Ricken, M. P. Hedges, D. Oblak, C. Simon, W. Sohler, and W. Tittel, “Spectral multiplexing for scalable quantum photonics using an atomic frequency comb quantum memory and feed-forward control,” Phys. Rev. Lett. **113**(5), 053603 (2014). [CrossRef]

**15. **V. Ansari, J. M. Donohue, B. Brecht, and C. Silberhorn, “Tailoring nonlinear processes for quantum optics with pulsed temporal-mode encodings,” Optica **5**(5), 534–550 (2018). [CrossRef]

**16. **Y.-P. Huang and P. Kumar, “Mode-resolved photon counting via cascaded quantum frequency conversion,” Opt. Lett. **38**(4), 468–470 (2013). [CrossRef]

**17. **P. Manurkar, N. Jain, M. Silver, Y.-P. Huang, C. Langrock, M. M. Fejer, P. Kumar, and G. S. Kanter, “Multidimensional mode-separable frequency conversion for high-speed quantum communication,” Optica **3**(12), 1300–1307 (2016). [CrossRef]

**18. **L. Fan, C.-L. Zou, M. Poot, R. Cheng, X. Guo, X. Han, and H. X. Tang, “Integrated optomechanical single-photon frequency shifter,” Nat. Photonics **10**(12), 766–770 (2016). [CrossRef]

**19. **L. J. Wright, M. Karpiński, C. Söller, and B. J. Smith, “Spectral shearing of quantum light pulses by electro-optic phase modulation,” Phys. Rev. Lett. **118**(2), 023601 (2017). [CrossRef]

**20. **F. Sośnicki and M. Karpiński, “Large-scale spectral bandwidth compression by complex electro-optic temporal phase modulation,” Opt. Express **26**(24), 31307–31316 (2018). [CrossRef]

**21. **V. Torres-Company, J. Lancis, and P. Andrés, * Chapter 1 - space-time analogies in optic*, (Elsevier, 2011), pp. 1–80.

**22. **B. H. Kolner and M. Nazarathy, “Temporal imaging with a time lens,” Opt. Lett. **14**(12), 630–632 (1989). [CrossRef]

**23. **B. H. Kolner, “Space-time duality and the theory of temporal imaging,” IEEE J. Quantum Electron. **30**(8), 1951–1963 (1994). [CrossRef]

**24. **M. Avenhaus, A. Eckstein, P. J. Mosley, and C. Silberhorn, “Fiber-assisted single-photon spectrograph,” Opt. Lett. **34**(18), 2873–2875 (2009). [CrossRef]

**25. **J. B. Goda K., “Dispersive fourier transformation for fast continuous single-shot measurements,” Nat. Photonics **7**(2), 102–112 (2013). [CrossRef]

**26. **L. Mandel and E. Wolf, * Optical Coherence and Quantum Optics* (Cambridge University, 1995), chap. 10.

**27. **J.-C. Diels and W. Rudolph, * Ultrashort Laser Pulse Phenomena* (Academic, 2006), chap. 8.

**28. **A. M. Weiner, “Ultrafast optical pulse shaping: A tutorial review,” Opt. Commun. **284**(15), 3669–3692 (2011). Special Issue on Optical Pulse Shaping, Arbitrary Waveform Generation, and Pulse Characterization. [CrossRef]

**29. **A. M. Weiner, “Femtosecond pulse shaping using spatial light modulators,” Rev. Sci. Instrum. **71**(5), 1929–1960 (2000). [CrossRef]

**30. **A. O. C. Davis, P. M. Saulnier, M. Karpiński, and B. J. Smith, “Pulsed single-photon spectrometer by frequency-to-time mapping using chirped fiber bragg gratings,” Opt. Express **25**(11), 12804–12811 (2017). [CrossRef]

**31. **J.-F. Morizur, L. Nicholls, P. Jian, S. Armstrong, N. Treps, B. Hage, M. Hsu, W. Bowen, J. Janousek, and H.-A. Bachor, “Programmable unitary spatial mode manipulation,” J. Opt. Soc. Am. A **27**(11), 2524–2531 (2010). [CrossRef]

**32. **Z. I. Borevich and S. L. Krupetskii, “Subgroups of the unitary group that contain the group of diagonal matrices,” J. Math. Sci. **17**(4), 1951–1959 (1981). [CrossRef]

**33. **M. Schmid, R. Steinwandt, J. Müller-Quade, M. Rötteler, and T. Beth, “Decomposing a matrix into circulant and diagonal factors,” Linear Algebr. its Appl. **306**(1-3), 131–143 (2000). [CrossRef]

**34. **C. Wang, M. Zhang, X. Chen, M. Bertrand, A. Shams-Ansari, S. Chandrasekhar, P. Winzer, and M. Lončar, “100-ghz low voltage integrated lithium niobate modulators,” in Conference on Lasers and Electro-Optics, (Optical Society of America, 2018), p. SM3B.4.

**35. **S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi, “Optimization by simulated annealing,” Science **220**(4598), 671–680 (1983). [CrossRef]

**36. **X. Wang, C.-S. Yu, and X. Yi, “An alternative quantum fidelity for mixed states of qudits,” Phys. Lett. A **373**(1), 58–60 (2008). [CrossRef]

**37. **D. V. Reddy and M. G. Raymer, “Photonic temporal-mode multiplexing by quantum frequency conversion in a dichroic-finesse cavity,” Opt. Express **26**(21), 28091–28103 (2018). [CrossRef]

**38. **A. W. Elshaari, W. Pernice, K. Srinivasan, O. Benson, and V. Zwiller, “Hybrid integrated quantum photonic circuits,” Nat. Photonics **14**(5), 285–298 (2020). [CrossRef]

**39. **F. Sosnicki, M. Mikolajczyk, A. Golestani, and M. Karpinski, “Aperiodic electro-optic time lens for spectral manipulation of single-photon pulses,” Appl. Phys. Lett. **116**(23), 234003 (2020). [CrossRef]