Simulating quantum field theories on continuous-variable quantum computers

We delve into the use of photonic quantum computing to simulate quantum mechanics and extend its application towards quantum field theory. We develop and prove a method that leverages this form of Continuous-Variable Quantum Computing (CVQC) to reproduce the time evolution of quantum-mechanical states under arbitrary Hamiltonians, and we demonstrate the method's remarkable efficacy with various potentials. Our method centres on constructing an evolver-state, a specially prepared quantum state that induces the desired time-evolution on the target state. This is achieved by introducing a non-Gaussian operation using a measurement-based quantum computing approach, enhanced by machine learning. Furthermore, we propose a framework in which these methods can be extended to encode field theories in CVQC without discretising the field values, thus preserving the continuous nature of the fields. This opens new avenues for quantum computing applications in quantum field theory.


Introduction
Harnessing the intricate dynamics of quantum mechanics to improve our understanding of fundamental physics has led to the pursuit of computational paradigms that go beyond classical boundaries and allow for complex systems to be simulated with devices which themselves are inherently quantum mechanical.Such devices would leverage the properties of quantum systems, such as superposition and entanglement, to perform calculations directly using the intrinsic dynamics of the system.Two main paradigms have been identified: digital and analogue quantum computing.The former encodes information onto systems with a finite number of discrete degrees of freedom, such as the qubit, a two-state quantum system.The latter instead encodes information on systems which are described by operators which have a continuous spectrum.This paradigm is often called Continuous-Variable Quantum Computing (CVQC) [1][2][3][4].Among the various kinds of CVQC, quantum optics emerges as a fascinating framework, using the infinite-dimensional landscape of photon states to encode and manipulate information [5][6][7][8][9][10][11].The eigenstates of these operators form an infinite-dimensional Hilbert space, with the continuous-variable analog of the qubit being the so-called qumode.
CVQC, rooted in the continuous spectra of quantum operators, offers various possibilities for simulating the dynamics of quantum particles and fields.By employing such qumodes -quantum analogues of classical harmonic oscillators -as the fundamental information units, CVQC provides a natural framework for encoding quantum states in the continuous observables of photons, e.g.their position or momentum.This paradigm allows for implementing Gaussian gate operations, which manipulate the quantum states through transformations that preserve their Gaussian character, thereby enabling a broad range of quantum simulations.However, the true power of CVQC unfolds with the inclusion of non-Gaussian operations, which introduce higher-order interactions essential for achieving universal quantum computation [1,12,13].These operations, albeit challenging to implement due to the weakly interacting nature of photons, open the door to simulating complex quantum systems with high fidelity.Most existing proposals to simulate quantum systems on CVQC rely on specific ways to induce non-Gaussian effects, such as the Kerr effect.However, the non-Gaussian characteristics introduced by current non-linear optical materials are very weak [2,3,6,7,13], and constructing an arbitrary non-Gaussian operation is difficult.An alternative approach is achieved by integrating measurement-based quantum computing techniques [14,15] and leveraging the entanglement of qumodes.Through this, it is possible to instead induce the desired non-Gaussian characteristics, paving the way for simulations that capture non-trivial quantum dynamics.
A central aspect of quantum systems that one might wish to explore using such methods is the Hamiltonian and the time-evolution that is governed by it, a cornerstone in understanding the dynamics of quantum particles and fields [16][17][18][19][20][21][22].By simulating the time evolution governed by a system's Hamiltonian, we can explore how quantum states change over time, which is crucial for predicting the behaviour of quantum particles and systems under various conditions.This process is essential for simulating inherently quantummechanical phenomena that cannot be accurately modelled using classical physics.One of the most notable examples is quantum tunnelling, a phenomenon where particles pass through potential barriers that would be insurmountable, according to classical mechanics.This process is critical in a wide range of quantum systems, from the decay of atomic nuclei to the operation of quantum dots and superconducting qubits.By simulating the time evolution of quantum systems, one can also investigate other observables, such as energy spectra, correlation functions, and phase transitions, providing deep insights into the nature of quantum materials, chemical reactions, and even the evolution of early universe conditions in high-energy physics.CVQC offers a novel approach to simulating the time evolution of quantum states under arbitrary Hamiltonians.By decomposing the time evolution into discrete steps through Trotterization, we show how CVQC facilitates the simulation of complex quantum systems, including those governed by non-Gaussian potentials.
In contrast, quantum gate computing operates within a digital framework, encoding quantum information in discrete qubits and manipulating it through a sequence of quantum gates.While this approach has paved the way for significant advancements in quantum computing, and has gained interest for uses in the simulation of quantum field theories [16][17][18][19][20][21][22][23][24][25][26], high-energy particle collisions [27][28][29][30], and machine learning [31][32][33][34][35], it inherently approximates the continuous nature of quantum systems, potentially limiting its ability to capture the full spectrum of quantum dynamics.Thus, CVQC, with its continuous-variable approach, offers a promising avenue for simulating quantum systems complementary to quantum gate computing approaches.
The simulation of non-trivial Hamiltonians on CVQC devices has been difficult due to the challenges in implementing non-Gaussian operations on photonic devices.Most current approaches propose circuits which involve non-Gaussian gate operations generated by nonlinear optics to achieve Hamiltonian simulation on a continuous-variable device [19,36].However, experimentally such operations are difficult to produce [1,2,4].This has led to attempts to generate non-Gaussian effects through the use of Gaussian operations and measurements [37], in particular References [12,13] utilise a machine-learning routine to enhance the production of non-Gaussian states.In this paper, we build and improve on this approach and propose a quantum circuit for simulating the Trotterised time-evolution of a quantum-mechanical state under the influence of an arbitrary Hamiltonian using only Gaussian operations and measurements.The circuit for a single Trotter step can then be applied iteratively to achieve the time-evolution of the Hamiltonian.By using a top-hat resource function and generating the evolver-state, the non-Gaussian part of the Trotter evolution, using a measurement-based circuit, we show that the effect of the noise-factor from Reference [12] can be maximally suppressed without reducing the strength of the overall operation.We demonstrate the circuit's ability to simulate time-evolution for several examples of quantum-mechanical Hamiltonians and find that the circuit performs remarkably well compared to exact, classical simulations.Furthermore, we show that the approach can be extended, outlining how the continuous behaviour of the CVQC device can be harnessed to accurately simulate quantum field theories, maintaining the continuous nature of fields.
In Section 2 we outline the necessary background on optical quantum computing required for the rest of the paper.Section 3 details the circuit architecture for the Trotterised time-evolution of a quantum-mechanical state under the influence of an arbitrary Hamiltonian.The circuit is then tested in Section 4, comparing the output of a continuous-variable quantum simulator against an exact, classical calculation.Finally, in Section 5, we explain how this method can be extended to simulate quantum field theories on a CVQC device.

Background: Continuous-Variable Quantum Computing
The framework we will consider is quantum computation via quantum optics, which offers an experimentally realisable approach to Continuous-Variable Quantum Computing (CVQC), in which the continuous-variable system is constructed from the quantised electromagnetic field [2,4].The use of quantum optics as a method of quantum computing benefits from the exceedingly low decoherence properties of photons, and therefore holds good potential for transmitting and maintaining quantum information throughout many gate operations [3,6,9].In this realisation, the Hilbert space of each qumode is the infinitedimensional photon-number degree of freedom [38] which is the Fock basis, such that the total Hilbert space, H , of an N qumode system is where H i is the Hilbert space of the i th qumode.The system can then be modelled as a set of N , non-interacting, quantum harmonic oscillators.Each qumode is an oscillator based on the simple-harmonic-oscillator (SHO) Hamiltonian, where the continuous operators x and p are defined in terms of the creation and annihilation operators, â † and â respectively, and obey the standard commutation relation (2.4) It will be convenient to express the state on a qumode as an expansion in the Fock basis, such that where A n is the coefficient of the n th Fock state, |n⟩.For the rest of this paper, we will adopt natural units, ℏ = m = ω = 1.
In the CVQC framework, computation is achieved by applying quantum gate operations on the qumodes.The simplest to achieve are the so-called Gaussian gates which act on the qumodes as quadratic phase operators in the quadratures, that is in full generality they take the form where i and j label the qumodes on which they act, and θ ij , θ ′ ij and θ ′′ ij are constants.For universal computation it is essential also to be able to implement non-Gaussian gates (i.e. with x3 and higher appearing in the phase) [1,12,13].This is a delicate process because the fact that photons do not strongly interact with each other, while being excellent for maintaining coherence, is accompanied by the negative implication that non-Gaussian effects are hard to achieve.Directly producing non-Gaussian gate operations requires the use of non-linear optical materials which induce non-Gaussian effects, such as the Kerr effect.However, currently the non-Gaussian effects induced by known non-linear optical materials are extremely weak [2,3,6,7,13], and the generation of arbitrary non-Gaussian operations is difficult.To circumvent these difficulties an alternative is the measurementbased approach (see References [12,13] and references therein), which we will be using here.Here non-Gaussianity is introduced by a process of post-selected measurement on entangled qumodes (in other words the accepted photons are filtered by the result of the measurement on an entangled ancilla qumode).This Section will present the necessary gate operations of both kinds that will be required for our paper.In Section 2.1, we review the action of the various Gaussian gate operations, and then Section 2.2 outlines the construction of non-Gaussian operators.Although the methods presented here are general, this paper will utilise the Gaussian gate operations available on the StrawberryFields platform [8,9].

Review of required Gaussian gate operations
The required Gaussian gate operations in the continuous-variable regime are expressed either in terms of the quadrature operators, x and p, or the creation and annihilation operators, â † and â, of the conventional SHO defined in Equation 2.3.Here we will outline the gates by highlighting the action that is most relevant for this paper (for a full set of expressions the reader is referred to Reference [2]): • Squeezing: The action of a squeezing gate with parameter z = re iϕ is Note that somewhat counterintuitively S(r) maps the wavefunction in the x-basis as where we maintain normalisation with the prefactor.(In detail for this one case, in Dirac notation we have S|x⟩ = |e −r x⟩ so that (Sψ)(x) = ⟨x|S|ψ⟩ = e r x|S † S|ψ = ⟨e r x|ψ⟩).
• Displacement: A displacement gate with complex parameter α has the following action on the x and p operators: which maps the wavefunction and its Fourier transform as (2.10) • Rotation: The action of a rotation gate with real parameter θ is given by As the phase e −iθ/2 corresponding to the ground-state energy acts universally, it will usually be possible to ignore it.
• Controlled-X: We will in addition to the above single qumode operators be using several Gaussian two-qumode operators.These induce displacements in x or p of qumode-x which depend on the value of y or p y measured on a second qumode-y to which it is coupled, and vice-versa.In terms of operators the controlled-X gate (again taking ℏ = 1) for two qumodes with variables x, p x , y and p y is which sends x → x + sŷ.Using the same steps as for the squeezing gate, the action on a product wavefunction is C X (s; ŷ, px )ψ(x)ψ ′ (y) = ψ(x − sy)ψ ′ (y). Figure 1: Example operations using a squeezing gate, and a controlled-X gate together with homodyne measurement.In (a) the ground state is squeezed by S(ln(1/2)) which produces a wave-function flattened by a factor of 2 (yellow line).Then it is squeezed again by S(ln (4)) producing a ground state squeezed by a factor 2 (orange line).In (b) we perform a composite displacement, by using a Controlled-X gate followed by a homodyne measurement of y, first displacing by 2 to the right, so that ψ(x) → ψ(x − 2) (yellow line), then displacing by 4 to the left, so that ψ(x − 2) → ψ(x + 4) (red line).In this case the Fock truncation is 60, and we see some distortion beginning to appear at the peak.
• Controlled-Z: The second type of control gate that will be needed for this discussion is the controlled-Z gate.In terms of operators the controlled-Z gate for two qumodes with variables x, p x , y, p y is (2.13) The final element that is required for the discussion is the notion of homodyne measurement.This is a projection of the state onto particular x or p values or a linear mix.In the Gaussian system this is done by projecting onto squeezed states, with a variance of σ = 2×10 −4 [8,9].As a warm-up exercise, let us perform a few test manipulations utilising some of these gates on a qumode groundstate.Figure 1a shows the groundstate ⟨x|0⟩ together with two manipulations corresponding to S(ln(1/2)) ⟨x|0⟩ which produces a widened wave function (in yellow), and a second state corresponding to S(ln(4))S(ln(1/2)) ⟨x|0⟩ (in orange).The second panel, Figure 1b, shows the ground state together with two displacement manipulations.These were performed not using the displacement gate in Equation (2.9), but with the controlled-X gate of Equation (2.12) followed by a homodyne measurement on y.That is we begin with two qumodes in their ground states, and act on it with a controlled-X gate, resulting in

Creating non-Gaussian operations
As mentioned, achieving universal quantum computation with continuous-variable devices requires non-Gaussian operations generated by Hamiltonians of cubic order or higher in the x and p operators from Equation (2.3) [1,12,13].Here the measurement-based approach of References [12,13] will be used.In this method Photon-Number-Resolving (PNR) measurements induce a non-Gaussian state on a target qumode.A disadvantage of moving to a measurement-based framework is that the production of the non-Gaussian operation is now probabilistic.However machine learning can be used to optimise the success of producing the desired non-Gaussian operation [12,13].
The circuit that will be trained to produce non-Gaussian states follows the n-qumode Gaussian Boson Sampling (GBS) architecture [39], first transforming the qumode states to displaced-squeezed states by applying a series of displacement and squeezing operations to each of the qumodes.The system is then entangled by feeding the displaced-squeezed states through an interferometer, constructed using the rectangular arrangement of beamsplitters from Reference [40].This process is then repeated for I layers, with each layer being parameterised with trainable variables, θ i .The number of layers depends on the required expressibility of the circuit.Finally (N − 1)-post-selected-measurements are made using PNR detectors to induce a non-Gaussian state on the target qumode, |ϕ⟩.The circuit parameters are then trained by a classical machine learning routine to fit the output of the circuit to a target state vector.At each step of the training, the loss is calculated by truncating the Fock state expansion from Equation (2.5).The loss has the form (2.15) where A n and A ′ n are the n th coefficients of the trained state and target state respectively in the Fock basis, and n max is the truncation.

Implementing time-evolution of wavefunctions
Having collected the required ingredients, we now present a Continuous-Variable Quantum Computing (CVQC) framework for simulating the time-evolution of quantum states under Layer with parameters ✓ i Non-Gaussian State Step C X Homodyne Rotate 1 Figure 4: Evolver-gadget to evolve through a single Trotter step.Here |ϕ⟩ is the evolverstate which is set according to Equation (3.19), and which in Section 3.2 will be machine learned using a measurement-based quantum algorithm.
the influence of an arbitrary potential.Section 3.1 describes the principle whereby an arbitrary state can be made to evolve under the influence of an arbitrary Hamiltonian, by using an ancilla qumode initialised with a prescribed non-Gaussian state called the evolverstate.Then Section 3.2 discusses how the evolver state may itself be constructed using the measurement-based approach described in Section 2.2.

Schrödinger evolving wavefunctions with arbitrary Hamiltonians
Let us start by explicitly stating the goal.In a non-relativistic system, the evolution of any quantum state is driven by the Hamiltonian, which takes the following form (where recall that m = ℏ = 1 throughout): The goal is to be able to evolve any arbitrary input state |ψ in ⟩ under the influence of the Hamiltonian, H, for which one must devise a photonic circuit that will implement the Schrödinger evolution The techniques that will be developed here to do this are applicable to any potential, V , but in order to have a specific system in mind it is useful to focus on three specific cases.
The first is the system with the potential The depth of the true vacuum of this potential is V min ≈ ε, at leading order.The potential is shown in Figure 3a.Around the origin this potential approximates the simple harmonic oscillator, thus the Gaussian SHO ground state at x = 0 is an approximate energy eigenstate which will partially decay by tunnelling through the barrier.
The second potential that will be considered is This potential is of interest because its expansion around x = 1 is V (x) = (x − 1) 2 /2 + . .., so to quadratic order it is also the SHO potential.Therefore any deviation from SHO behaviour is directly attributable to the higher-order terms, and moreover this deviation comes from a potential that is not polynomial.The final potential we will consider is where Θ(x) is the Heaviside function, which is shown in Figure 3c.This 'w' potential is interesting for a number of reasons.First is the fact that the barrier in the potential is not differentiable, so there is not even a good polynomial approximation for it.The second reason this potential is interesting emerges upon considering solutions to the Schrödinger equation in a potential where the second minimum is missing and instead replaced with a flat region extending from the peak, i.e.
In this potential the wavefunction is a bound state and none of it can escape to the right.In other words the ground-state energy of the SHO is smaller than the height of the barrier in the 'w' potential.Therefore any barrier penetration in the full 'w' potential of Eq. (3.5) is entirely due to quantum tunnelling, and the behaviour that will be recovered is characteristically "quantum".
To implement the Schrödinger evolution of the wavefunction in Equation (3.2), there are two approximations that will be made.The first is to approximate the Fock expansion from Equation (2.5).That is where A n is the coefficient of the Fock state |n⟩, and n max is the Fock state truncation.Thus in principle it is possible to determine the evolution in terms of a matrix acting on the Fock state coefficients, A n , by expanding x and p in terms of the creation and annihilation operators as in Equation (2.3).Although such Fock truncation is not strictly speaking required for a particular photonic circuit to work, it is required to determine the parameters of the circuit itself, as will become clear.
The second approximation that will be made is to Trotterise the time evolution, in other words to divide the total evolution time t into N steps of time δt = t/N .To do this it is convenient to separate out the Gaussian p2 /2 + x2 /2 part of the Hamiltonian because its contribution to the evolution can easily be generated by the rotation gate in Equation (2.11).That is, letting where ) is the Hamiltonian of the simple harmonic oscillator, and where is the non-Gaussian part of the potential, the operator e −iHδt corresponds to e −iHδt = R(−δt) e −iH 1 (x)δt+iO(δt 2 ) . (3.9) The complete evolution may then be enacted by applying N of these so-called Trotter steps, The δt 2 error in the Trotterisation approximation alluded to in Equation (3.9) arises because H 0 and H 1 do not commute, and it is given by the Zassenhaus relation, where the dots denote higher-order commutators.Assuming that [p 2 , H 1 (x)] ∼ 1, for such a trotterised evolution one therefore finds that an error accumulates in the exponent of order N δt 2 and hence one requires δt ≪ 1/t in natural units for the evolution to be accurate.Note that the Trotterisation error is retained as a product of unitary operators, so that it is also unitary * .Thus the main task is to prepare a non-Gaussian operator that can act on an arbitrary state to give the e −iH 1 (x)δt factor in the Trotter step.For compactness of notation, consider the task of implementing an arbitrary non-Gaussian operation, as a circuit, where in this case f (x) is the desired unitary operation on |ψ in ⟩, Such a non-Gaussian operator can be constructed by improving the method presented in Reference [12].The starting point of the method is to prepare a state |ϕ⟩ on an ancilla qumode, with coordinate denoted y, which mirrors the desired Trotter step.In full generality an arbitrary state on the ancilla qumode can (since f is invertible) be written as follows: where ⟨y|ϕ 0 ⟩ is some other resource state (to be determined) and where q is a parameter whose role will become clear.This prepared ⟨y|ϕ⟩ state is the non-Gaussian evolver-state.The incoming vacuum states are displaced, then squeezed before being interfaced with an interferometer, constructed using the rectangular architecture from Reference [40].This routine is repeated for I layers, parameterised with trainable variables, θ i , for each layer.Finally, (n − 1)-measurements are made using Photon Number Resolving (PNR) detectors, with the jth measurement post-selecting on m j .These measurements generate the induced non-Gaussian state on the n th qumode.
The process of transferring the evolution to the input-state |ψ in ⟩ begins by entangling it with the evolver-state using a controlled-X gate ĈX (−s; x, y) ≡ e isxpy/ℏ which induces a shift y → y + sx in the coordinates of the evolver-function as in Equation (2.12), and implementing a squeezing S(r; ŷ) with parameter r chosen such that e r s = q . (3.14) Next we make a rotation R(−δt) on the |ψ⟩ state and then finally the evolver-state is collapsed by making a homodyne measurement of y = 0.The entire procedure is shown in the circuit diagram of Figure 4. Consider the effect of this sequence of operations.Denoting the incoming state |ψ in ⟩ combined with the evolver-state |ϕ⟩ by a single ket, |Ψ⟩, the output on the two qumodes after this sequence of operations, and before any measurements are made, can be written ⟨x, y|Ψ⟩ = ⟨y|⟨x|R(−δt; x) C X (−s; x, ŷ) S(r; ŷ) f (ŷ/q) |ϕ 0 ⟩|ψ in ⟩ . (3.15) According to Equations (2.8) and (2.14), performing the various manipulations corresponding to these gates and then performing the homodyne measurement y = 0 with the choice of parameters in Equation (3.14) yields an evolved state on the |ψ⟩ qumode of the form This is the desired non-Gaussian evolution, corresponding to a single Trotter step, up to errors of order δt 2 and the noise-factor ⟨e r sx|ϕ 0 ⟩ ≡ ⟨xq|ϕ 0 ⟩.All that remains is to choose the optimal form of the resource function ⟨y|ϕ 0 ⟩ in order to maximally suppress the effect of the noise function.There are two possibilities: one can choose a small value of q which 'freezes' the value of the function ⟨xq|ϕ 0 ⟩, and/or choose a flat resource function.It is convenient to adopt the top-hat function as the idealised resource function: With this resource function the output state becomes Note that smaller values of q allow larger domains in x of valid evolution.Adopting this top-hat function as the resource state greatly simplifies the procedure, because one can determine all the Fock amplitudes of the evolver-state ⟨y|ϕ⟩ = ⟨y|f (ŷ/q)|ϕ 0 ⟩ directly, by numerically integrating it against Fock modes: e −iH 1 (y/q)δt ⟨n|y⟩ dy , where ⟨y|n⟩ is the n th Fock mode.Hence the evolver-state with which the ancilla qumode must be initialised is Due to the truncation n max , this is of course an approximation to the idealised f (y/q) function, which is expected to improve with higher n max .Provided that one is able successfully to initialise this evolver state, the Trotter step circuit of Figure 4 can be repeated N times to evolve the state through time t.Therefore being able to set this initial form of the evolver-state is the final ingredient that is crucial to be able to implement the procedure on genuine photonic devices.We now turn to this aspect.

Learning the evolver-state
To fully implement the procedure outlined in Section 3.1 on a photonic device, the non-Gaussian evolver-state, |ϕ⟩, must be prepared.Here, the measurement-based approach from Section 2.2 will be used, in which the circuit parameters of a circuit such as that in Figure 5 are trained against the target state from Equation (3.19).To achieve a good fit to the target, a circuit constructed from three-qumodes and 10 iterations of the layer method will be used.At each layer, the displaced-squeezed states pass through an interferometer Figure 6: Schematic of a three-qumode quantum circuit for the preparation of the non-Gaussian evolver-state.which entangles the system.Following in the rectangular architecture from Reference [40] only three beamsplitters are required in each layer for the three-qumode case.Each gate operation has two parameters, thus the full circuit has 180 trainable variables.The training of the gate parameters has been restricted to values which are experimentally realisable [41].
The values that the PNR measurements are post-selected on have not been included as trainable parameters and have instead been chosen to be m 0 = m 1 = 5.Reference [13] makes a detailed investigation into maximising success when creating non-Gaussian states using measurement-based quantum computing approaches.A schematic of the circuit diagram used to create the desired resource state for the time-evolution of an arbitrary Hamiltonian is shown in Figure 6.
Figure 7a shows the state produced by the trained quantum circuit against the target from Equation (3.19) for the potential from Equation (3.3) up to a Fock truncation of n max = 25.The circuit achieves a good fit to the target state, however some discrepancies are visible in the region 1 < x < 3. It is possible to increase the circuit size to four-qumodes, thus increasing the number of trainable parameters in 10 layers to 280. Figure 7b shows the fit from such a four-qumode circuit.One can see that the discrepancies are no longer visible and the fit to the target state is virtually exact.
Although the training of the circuit can be a lengthy process, for each system the circuit only ever needs to be trained once to determine the circuit parameters for a given potential and a given δt, because the evolver-state is the same at each Trotter step.Once these parameters have been determined, the trained circuit can then be incorporated into the circuit to generate the time-evolution of the wavefunction from Section 3.1.In Section 4, the time-evolution simulated by the quantum circuit will be compared to an exact, classical calculation.The state has been trained using an N -qumode Gaussian Boson Sampling architecture with (N − 1)-measurements, schematically shown in Figure 5, to produce the evolver-state on the N th qumode.
4 Results: Quantum mechanics on photonics versus numerically evaluated quantum mechanics In Section 3, the quantum algorithm for the simulation of the Trotterised time-evolution of a wavefunction under a Hamiltonian with an arbitrary potential was proposed for a Continuous-Variable Quantum Computing (CVQC) approach utilising currently achievable quantum optics.The system builds a non-Gaussian evolver-state on an ancillary qumode using the measurement-based circuit from Section 2.2, the parameters of which have been trained using a classical machine learning technique.In this Section, it will be shown that the algorithm performs as expected by investigating the evolution of a quantum-mechanical wave-function under the influence of the potentials from Equations (3.3) and (3.4).Due to the excessive memory required to simulate circuits with more than four qumodes at a high Fock truncation, part of this study will be performed using the Ket command from StrawberryFields [8,9] to simply set the evolver-state, without the need of addition qumodes.
First, consider the potential from Equation (3.3), as shown in Figure 3a.The system is initialised in the ground state of the SHO, i.e. a Gaussian wavefunction centred around x = 0. Figure 8 shows the time-evolution of the quantum-mechanical wavefunction simulated by the CVQC circuit (solid lines) compared to a classical simulation produced using Qibo [42] (dotted lines) for two scenarios: ε = 0.1 and ε = 0.5.The simulations have been run with a Trotter time-step of δt = 0.1.Here, the Ket command has been used to simulate the time-evolution at a Fock truncation of n max = 60 on the quantum device.The agreement of the quantum algorithm with the classical simulation has been quantified using the Kullback-Leiber (KL) divergence [43], and is shown in Figure 9a for the ε = 0.1 case.It can be seen that, above a Fock truncation of n max = 35, the agreement between the  quantum and classical cases is remarkably good, and degrades monotonically with time as one would expect given the accumulating Trotter and noise-factor errors discussed around Equation (3.16).
The second example that we consider is the time-evolution under the hyperbolic potential from Equation (3.4) shown in Figure 3b.Once again, the system is initialised in the ground state of the SHO Hamiltonian centred at the origin.Figure 10a shows the comparison between the time-evolution of the wavefunction simulated by the quantum device and the classical device, with a Trotter time-step of δt = 0.1 and a Fock truncation of n max = 60 on the quantum simulation.To achieve the simulation up to a truncation of 60 the Ket command has been used.The quantum circuit performs well, with the KL divergences showing good agreement for truncations greater than 35, as shown in Figure 9b.
Finally we consider evolution in the 'w' potential of Eq. (3.5) shown in Figure 3c.Again, the system is initialised in the ground state of the SHO Hamiltonian centred at the origin.Figure 11 shows the comparison between the time-evolution of the wavefunction simulated by the quantum device and the classical device, with a Trotter time-step of δt = 0.1 and a Fock truncation of n max = 60 on the quantum simulation.The evolution is extraordinarily accurate with this potential.Indeed the KL divergences, which are shown in Figure 9c, are extremely small for a sufficiently large Fock truncation.
It is interesting to ask why the evolution in the 'w' potential should be so much more accurate.Recall that the evolution in this case is expected to initially be dominated by tunnelling, implying that the penetration of the barrier (of height V (1) = 0.5) is driven by exponential tails of the wavefunction.This in turn implies that the whole wavefunction is a bound state of the double well that must be exponentially suppressed beyond x < −1 and x > 3. It is therefore insensitive to the edges of the top-hat resource state (which are well outside this range) and the noise-factor ⟨qx|ϕ 0 ⟩ appearing in Eq. (3.16), in contrast with the situation in the other two potentials.
To fully test the performance of the proposed quantum algorithm, the full circuit was constructed for the cosh potential of Eq. (3.4).Due to the memory constraints on the simulation, this circuit was run using the three-qumode evolver-state preparation circuit from Figure 6 with a Fock truncation of 25. Figure 10b shows the time-evolution simulated by the full circuit compared to the classical simulation for a Trotter time-step of δt = 0.1.Good agreement is achieved between the quantum and classical simulations, with the KL divergence of the full circuit matching exactly with the compact simulation using the Ket command, as shown by the exact match between the evolution using the full circuit and the Ket operation in Figure 12. agreement therefore validates the performance of the method.

Towards quantum field theory
Given the ability to perform real-time dynamics on a single quantum-mechanical state, continuous-variable models of quantum computing open up interesting avenues to explore from the perspective of field theory.Both fundamental and effective quantum fields are of paramount importance in many aspects of physics, in particular in particle physics and the Standard Model.Many phenomena, such as strong coupling effects in gauge theory, quantum tunnelling, phase-transitions and other dynamical processes are very hard to study analytically and quantum computing promises to become an important tool, as proposed in the work of References [16-18, 20, 23, 24, 37] (see References [21] for a more recent review).
The reason that the continuous-variable method of quantum computing is an attractive platform for such studies is that fields can be encoded without need for explicitly digitising the field value itself.One can instead simply use the continuous variables to stand for field values.This will turn out to be a great simplification because it then allows the kinetic terms in the field theory Hamiltonian to be constructed using a much smaller number of simple Gaussian gates.This Section will demonstrate that this can be implemented by outlining a framework for real scalar field theory in 1+1 dimensions.The time dimension will as for the quantummechanical system be encapsulated by the Trotterised evolution.This is to be accompanied by a single space dimension which is discretised in M qumodes.The expectation values of the fields ⟨φ⟩ at each point in space will be encoded in the value of the ⟨x⟩ value on each qumode.In order to avoid confusion the single physical space-dimension will be denoted r, and it will be discretised using a one-dimensional lattice of spacing a.Thus the field at the k th space position, where r 0 is a constant fiducial value, is described by the k th qumode: For a space interval r ∈ [−L/2, L/2] we have a = L/M .
Figure 9: The Kullback-Leibler (KL) divergence between the quantum simulation and exact calculation for different evolution times and Fock truncations for the (a) quartic, (b) cosh and (c) 'w' potentials.The KL divergence quantifies the disparity between probability distributions as a relative entropy (which broadly speaking encodes the information required to get from one distribution to the other).After a sufficient cutoff, the KL divergence exhibits a monotonic behaviour with time.
In order to set-up the system one may use the fact that the canonical momenta pk are already included among the available continuous variables (therefore it is not necessary to implement a matrix representation of the action of p2 in the x-basis as one would have to do in the Jordan-Lee-Preskill field discretization method for example [16,17,21] or in the domain-wall encoding of References [23,24]).Thus the Hamiltonian discretised over the M space points becomes In photonic systems the continuous variable x on a qumode and its conjugate variable p are already canonically normalised, with the commutation relation between the qumodes Figure 10: The time-evolution of a quantum system under the influence of the hyperbolic potential from Equation (3.4) generated by the photonic quantum simulator (solid lines) compared to an exact calculation (dotted lines).In (a) the circuit has used the Ket command to initialise the evolver-state and has been run at a Fock truncation of 60.In (b) the evolver-state has been initialised using the full circuit and has been run at a truncation of 25.

being
However in the discretised field theory the field theoretic conjugate momenta are required to satisfy [φ(r k ), π(r ℓ )]] = ia −1 δ kℓ .Therefore the correct commutation relations for the field and its conjugate momentum are given by identifying π(r k ) = a −1 pk . (5.5) Finally the spatial derivative ∂ r ϕ k can be approximated by using the discretised derivative: The space-discretised field theory in Equation (5.3) in terms of the sum over qumode operators then becomes where it is convenient to adapt periodic coordinates for the space dimension, such that  The Hamiltonian takes a more familiar form if one expands the terms in the Hamiltonian: where again H 1 plays the role of an effective potential Finally the overall factor of a may be absorbed by rescaling the evolved time, δt ′ = δt/a.The simplicity of qumode implementation is at this point notable: the Hamiltonian ultimately consists of a simple sum over terms that exactly resemble the quantum mechanics evolution on each qumode, together with just a single ring of "hopping terms" which connect each qumode to its neighbour.These terms are nothing other than controlled-Z gates C Z (δt ′ ; x k+1 , x k ).The entire circuit is shown in Figure 13, where the evolver-gadgets, labelled E i , each comprise the circuit shown in Figure 4.
It is worth comparing the scaling of this method with that of a discrete system in terms of the required gate operations.Each evolver-gadget contains 3 gates.In addition there are M of the C Z gates.The ancilla circuit for the evolver-state can be reused so this does not need to be included in the circuit count.Thus in total there are M qumodes and 4M gates.In a d-dimensional system this scales as (4M ) d gates.By contrast suppose the field is encoded in a discrete way, with each field value being encoded by N qubits.To make the kinetic cross-terms, every qubit describing the field at a given space point has to be  connected to every qubit of the field at the two-dimensional nearest-neighbour points.Thus one requires at least M d × N 2d gates, even before the potential has been encoded.As is evident it is the gate-count that gets out-of-hand very quickly.Indeed a three-dimensional lattice that is only 10 points on a side with the field encoded in 10 qubits, which gives only 1/32 accuracy assuming a binary encoding of complex values, requires at least a billion gates † .The same system encoded on a photonic device, including the potential, would require only 40 3 = 64, 000 gates.

Conclusion
We focused on Continuous-Variable Quantum Computing (CVQC) and its applications in simulating quantum mechanics and quantum field theory.Our investigation stems from recognising the need to surpass classical computational paradigms to deepen our understanding of fundamental physics through quantum-mechanical simulations.Our primary objective was to demonstrate the efficacy of CVQC, leveraging the infinite-dimensional Hilbert space of quantum states, for the accurate simulation of quantum mechanics.We achieved this by meticulously constructing a framework to simulate the time evolution of quantum states under arbitrary Hamiltonians using photonic devices.This involved a detailed exploration of Gaussian and non-Gaussian gate operations essential for the manipulation of quantum states encoded in the continuous observables of photons.A  pivotal technical achievement in our paper is the development of the evolver-state, a specially prepared quantum state that facilitates the desired Trotterised time-evolution of a quantum-mechanical wavefunction.This approach allowed us to simulate the time evolution of quantum systems under arbitrary potentials, using a combination of quantum gate operations and the strategic manipulation of the evolver-state.The proposed algorithm for simulating the time-evolution of a quantum-mechanical system under the influence of an arbitrary Hamiltonian has been validated against an exact, classical simulation.The circuit shows good agreement with the classical approach for three scenarios, and has been shown to work in full up to a Fock truncation of n max = 25, limited by memory constraints when simulating the quantum device.In a practical application on a real CVQC device, these limitations would not be present and the full circuit could be achieved.The promising agreement between these simulations underscores the potential of our approach in simulating complex quantum systems.
Furthermore, we ventured into the domain of quantum field theory, proposing a scheme to discretise space without the need to discretise the field values themselves, thus maintaining the continuous nature of the fields.This proposition opens new avenues for applying CVQC to quantum field theories, potentially simplifying the implementation of these theories on photonic quantum computers.
Thus, this marks a significant stride towards harnessing the capabilities of photonic quantum computing for the simulation of quantum mechanics and the exploration of quantum field theory.We anticipate that our findings will enrich the field of quantum computing for field theories and catalyse further research into the simulation of quantum phenomena.

Figure 2 :
Figure 2: Circuit diagram representation of the simple manipulations which produced Figure 1.Following the convention for control gates in discrete gate systems, the controlled-X gate in (b) is controlled by the upper y qumode (represented by a solid circle) and acts on the lower x qumode (represented by cross-hairs). .

Figure 3 :
Figure 3: The potentials of focus in this study: namely the (a) quartic, (b) cosh potential and (c) 'w' potential.In all cases the wave-function is initialised as a Gaussian state centred on the origin.

C X Homodyne Rotate 2 Figure 5 :
Figure 5: Schematic of a quantum circuit for the preparation of a non-Gaussian state.The circuit architecture is inspired by a Gaussian Boson Sampling routine on n-qumodes.The incoming vacuum states are displaced, then squeezed before being interfaced with an interferometer, constructed using the rectangular architecture from Reference[40].This routine is repeated for I layers, parameterised with trainable variables, θ i , for each layer.Finally, (n − 1)-measurements are made using Photon Number Resolving (PNR) detectors, with the jth measurement post-selecting on m j .These measurements generate the induced non-Gaussian state on the n th qumode.

Figure 7 :
Figure 7: Normalised evolver-state function with a truncation to the first 25 Fock levels.The state has been trained using an N -qumode Gaussian Boson Sampling architecture with (N − 1)-measurements, schematically shown in Figure5, to produce the evolver-state on the N th qumode.

Figure 8 :
Figure 8: time-evolution of a quantum system with the asymmetric quartic-potential of Equation (3.3) with (a) ε = 0.1 and (b) ε = 0.5, generated by the photonic quantum simulator with a Fock truncation of 60 (solid line) compared to an exact calculation (dotted lines).

Figure 11 :
Figure11: The time-evolution of a quantum system under the influence of the 'w' potential of Equation (3.5) generated by the photonic quantum simulator (solid lines) compared to an exact calculation (dotted lines).

Figure 12 :
Figure 12: A comparison between the time-evolution simulated using the full circuit (solid lines) and the Ket command (dotted lines) for a Fock truncation of n max = 25.

Figure 13 :
Figure 13: Circuit for scalar quantum field theory on M points.