{'fraction_non_alphanumeric': 0.036350706935497364, 'fraction_numerical': 0.014640675980925291, 'mean_word_length': 4.454483230663929, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Simulation of chemical reaction dynamics on an NMR quantum computer

Quantum simulation can beat current classical computers with minimally a few tens of qubits and will likely become the first practical use of a quantum computer. One promising application of quantum simulation is to attack challenging quantum chemistry problems. Here we report an experimental demonstration that a small nuclear-magnetic-resonance (NMR) quantum computer is already able to simulate the dynamics of a prototype chemical reaction. The experimental results agree well with classical simulations. We conclude that the quantum simulation of chemical reaction dynamics not computable on current classical computers is feasible in the near future.

Introduction. In addition to offering general-purpose quantum algorithms with substantial speed-ups over classical algorithms (1) [e.g., Shor's quantum factorizing algorithm (2)], a quantum computer can be used to simulate specific quantum systems with high efficiency (3). This quantum simulation idea was first conceived by Feynman (4). Lloyd proved that with quantum computation architecture, the required resource for quantum simulation scales polynomially with the size of the simulated system (5), as compared with the exponential scaling on classical computers. During the past years several quantum simulation algorithms designed for individual problems were proposed (6-10) and a part of them have been realized using physical systems such as NMR (11)(12)(13) or trapped-ions (14). For quantum chemistry problems, Aspuru-Guzik et al. and Kassal et al. proposed quantum simulation algorithms to calculate stationary molecular properties (15) as well as chemical reaction rates (16), with the quantum simulation of the former experimentally implemented on both NMR (17) and photonic quantum computers (18). In this work we aim at the quantum simulation of the more challenging side of quantum chemistry problems -chemical reaction dynamics, presenting an experimental NMR implementation for the first time.
Theoretical calculations of chemical reaction dynamics play an important role in understanding reaction mechanisms and in guiding the control of chemical reactions (19,20). On classical computers the computational cost for propagating the Schrödinger equation increases exponentially with the system size. Indeed, standard methods in studies of chemical reaction dynamics so far have dealt with up to 9 degrees of freedom (DOF) (21). Some highly sophisticated approaches, such as the multi-configurational time-dependent Hartree (MCTDH) method (22), can treat dozens of DOF but various approximations are necessary. So generally speaking, classical computers are unable to perform dynamical simulations for large molecules.
For example, for a 10-DOF system and if only 8 grid points are needed for the coordinate representation of each DOF, classical computation will have to store and operate 8 10 data points, already a formidable task for current classical computers. By contrast, such a system size is manageable by a quantum computer with only 30 qubits. Furthermore, the whole set of data can be processed in parallel in quantum simulation.
In this report we demonstrate that the quantum dynamics of a laser-driven hydrogen transfer model reaction can be captured by a small NMR quantum simulator. Given the limited number of qubits, the potential energy curve is modeled by 8 grid points. The continuous reactantto-product transformation observed in our quantum simulator is in remarkable agreement with a classical computation based also upon an 8-dimensional Hilbert space. To our knowledge, this is the first explicit implementation of the quantum simulation of a chemical reaction process. Theoretical methods and general experimental techniques described in this work should motivate next-generation simulations of chemical reaction dynamics with a larger number of qubits.
Theory. Previously we were able to simulate the ground-state energy of Hydrogen molecule (17). Here, to simulate chemical reaction dynamics, we consider a one-dimensional model of a laser-driven chemical reaction (23), namely, the isomerization reaction of nonsymmetric substituted malonaldehydes, depicted in (Fig. 1A). The system Hamiltonian in the presence of an external laser field is given by In (Eq. 1), E(t) is the laser-molecule interaction Hamiltonian, µ = eq is the dipole moment operator, ε(t) represents the driving electric field, T = p 2 /2m is the kinetic energy operator, is a double-well potential of the system along the reaction coordinate. In (Eq. 2) V ‡ is the barrier height, ∆ gives the asymmetry of the two wells, and ±q 0 give the locations of the potential well minima. See the figure caption of (Fig. 1B) for more details of this model.
We first employ the split-operator method (24,25) to obtain the propagator U(t + δt, t) associated with the time interval from t to t + δt. We then have The unitary operator e −iT δt/ in (Eq. 3) is diagonal in the momentum representation whereas all the other operators are unitary and diagonal in the coordinate representation. Such U(t + δt, t) can be simulated in a rather simple fashion if we work with both representations and make transformations between them by quantum Fourier transform (QFT) operations. To take snapshots of the dynamics we divide the reaction process into 25 small time steps, with δt = 1.5 fs and the total duration t f = 37.5 fs. The electric field of an ultrashort strong laser pulse is chosen as with s 1 = 5 fs and s 2 = 32.5 fs. More details, including an error analysis of the split-operator technique, are given in the supplementary material. The reactant state at t = 0 is assumed to be the ground-state |φ 0 of the bare Hamiltonian T + V , which is mainly localized in the left potential well. The wavefunction of the reacting system at later times is denoted by |ψ(t) . The product state of the reaction is taken as the first excited state |φ 1 of T + V , which is mainly localized in the right potential well.
With the system Hamiltonian, the initial reactant state, the product state, and the propagation method outlined above, the next step is to encode the time-evolving wavefunction |ψ(t) and the T , V , E(t) operators by n qubits. To that end we first obtain the expressions of these operators in representation of a set of N = 2 n discretized position basis states. The evolving state can then be encoded as and as a result the system operators become where σ j z (j = 1, 2, · · · , n) is the Pauli matrix and σ j i is the N-dimensional identity matrix.
Because our current quantum computing platform can only offer a limited number of qubits and the focus of this work is on an implementation of the necessary gate operations under the above encoding, we have employed a rather aggressive 8-point discretization using n = 3 qubits.
The associated diagonal forms of the T , V , and q matrices are given in the supplementary material. In particular, the end grid points are at q = ±0.8Å and the locations of other 6 grid points are shown in (Fig. 1B). The eigenvalues of the ground and first excited states of the bare Hamiltonian treated in the 8-dimensional encoding Hilbert space are close to the exact answers.
The associated eigenfunctions are somewhat deformed from exact calculations using, e.g., 64 grid points. Nonetheless, their unbalanced probability distribution in the two potential wells is maintained. For example, the probability for the first excited state being found in the right potential well is about 80%.
Experiment. In our experiment qubits 1,2, and 3 are realized by the 19 F, 13 C, and 1 H nuclear spins of Diethyl-fluoromalonate. The structure of Diethyl-fluoromalonate is shown in (Fig.  2A), where the three nuclei used as qubits are marked by oval. The internal Hamiltonian of this system is given by where ν j is the resonance frequency of the jth spin and J jk is the scalar coupling strength between spins j and k, with J 12 = −194.4 Hz, J 13 = 47.6 Hz, and J 23 = 160.7 Hz. The relaxation time T 1 and dephasing time T 2 for each of the three nuclear spins are tabulated in (Fig. 2B).
The experiment is conducted on a Bruker Avance 400 MHz spectrometer at room temperature.
The experiment consists of three parts: (A) Initial state preparation. In this part we prepare the ground state |φ 0 of the bare Hamiltonian T + V as the reactant state; (B) Dynamical evolution, that is, the explicit implementation of the system evolution such that the continuous chemical reaction dynamics can be simulated; (C) Measurement. In this third part the probabilities of the reactant and product states associated with each of the 25 snapshots of the dynamical evolution are recorded. For the jth snapshot at t j ≡ jδt, we measure the overlaps C(|ψ(t j ) , |φ 0 ) = | φ 0 |ψ(t j ) | 2 and C(|ψ(t j ) , |φ 1 ) = | φ 1 |ψ(t j ) | 2 , through which the continuous reactant-to-product transformation can be displayed. The main experimental details are as follows. Readers may again refer to the supplementary material for more technical explanations.
The initial state |φ 0 was prepared from ρ 000 by applying one shaped radio-frequency (RF) pulse characterized by 1000 frequency segments and determined by the GRadient Ascent Pulse Engineering (GRAPE) algorithm (27)(28)(29). The preparation pulse thus obtained is shown in where U QF T represents a QFT operation, and other operators are defined by Each individual operation in the U m loop can be implemented by a particular RF pulse sequence applied to our system. However, in the experiment such a direct decomposition of U m requires a very long gate operation time and highly complicated RF pulse sequences. This bottom-up approach hence accumulates considerable experimental errors and also invites serious decoherence effects. To circumvent this technical problem we find a better experimental approach, which further exploits the GRAPE technique to synthesize U m or their products with one single engineered RF pulse only. That is, the quantum evolution operator U(t j , 0), which is simulated by j m=1 U m , is implemented by one GRAPE coherent control pulse altogether, with a preset fidelity and a typical pulse length ranging from 10 ms to 15 ms. For the 25 snapshots of the dynamics, totally 25 GRAPE pulses are worked out, with their fidelities always set to be larger than 0.99. As a result, the technical complexity of the experiment decreases dramatically but the fidelity is maintained at a high level. The task of finding a GRAPE pulse itself may be fulfilled via feedback learning control (19) that can exploit the quantum evolution of our NMR system itself. However, this quantum procedure is not essential or necessary in our experiment because here the GRAPE pulses on a 3-qubit system can be found rather easily.
(C) Measurement. To take the snapshots of the reaction process at t j = jδt we need to measure the overlaps of C(|ψ(t j ) ,|φ 0 ) and C(|ψ(t j ) ,|φ 1 ). A full state tomography at t j will do, but this will produce much more information than needed. Indeed, assisted by a simple diagonalization technique, sole population measurements already suffice to observe the reactantto-product transformation.
Specifically, in order to obtain C(|ψ(t j ) , we first find a transformation matrix R to diagonalize ρ 0 , that is, , it becomes clear that only the diagonal elements or the populations of ρ ′ (t j ) are , we simply add the extra R operation to the quantum gate network. The actual implementation of the R operation can be again mingled with all other gate operations using one GRAPE pulse. A similar procedure is used to measure C(|ψ(t j ) ,|φ 1 ).
The populations of ρ ′ (t j ) can be measured by applying [π/2] y pulses to the three qubits and then read the ensuing free induction decay signal. In our sample of natural abundance, only ∼ 1% of all the molecules contain a 13 C nuclear spin. The signals from the 1 H and 19 F nuclear spins are hence dominated by those molecules with the 12 C isotope. To overcome this problem we apply SWAP gates to transmit the information of the 1 H and 19 F channels to the 13 C channel and then measure the 13 C qubit.
To assess the difference between theory and experiment, we carry out one full state tomography for the final state density matrix at t = t f . Because the GRAPE pulse is made to reach a fidelity larger than 0.995, the experimental density matrix ρ exp (t f ) is indeed very close to the theoretical density matrix ρ theory (t f ) obtained in an 8-dimensional Hilbert space, with a fi-  1B). A prototype laser-driven reaction is thus successfully simulated by our 3-qubit system. We emphasize that due to the use of GRAPE pulses in synthesizing the gate operations, our simulation experiment lasts about 30 ms only, which is much shorter than the spin decoherence time of our system. The slight difference between theory and experiment can be attributed to imperfect GRAPE pulses, as well as inhomogeneity in RF pulses and in the static magnetic field.

Conclusion.
Quantum simulation with only tens of qubits can already exceed the capacity of a classical computer. Before realizing general-purpose quantum algorithms that typically require thousands of qubits, a quantum simulator attacking problems not solvable on current classical computers will be one conceivable milestone in the very near future. The realization of quantum simulations will tremendously change the way we explore quantum chemistry in both stationary and dynamical problems (15,16). Our work reported here establishes the first experimental study of the quantum simulation of a prototype laser-driven chemical reaction.
The feasibility of simulating chemical reaction processes on a rather small quantum computer is hence demonstrated. Our proof-of-principle experiment also realizes a promising map from laser-driven chemical reactions to the dynamics of interacting spin systems under shaped RF fields. This map itself is of significance because it bridges up two research subjects whose characteristic time scales differ by many orders of magnitude.
Its formal solution can be written as where the quantum propagator U(t, t 0 ) is a unitary operator and is given by with T being the time ordering operator. There are a number of established numerical methods for propagating the Schrödinger equation, such as Feynman's path integral formalism (1), the split-operator method (2) and the Chebychev polynomial method (3,4), etc. For our purpose here we adopt the split-operator method.
The propagator U(t, t 0 ) satisfies where, for example, the intermediate time points can be equally spaced with t m = mδt + t 0 .
For one of such a small time interval, e.g., from t m−1 to t m = t m−1 + δt, we have where terms of the order (δt) 3 or higher are neglected. For sufficiently small δt, the integral in the above equation can be further carried out by a midpoint rule, leading to This integration step has an error of the order of (δt) 2 , which is still acceptable if the total evolution time is not large. Next we separate the total Hamiltonian into two parts: For example, H 0 (t) is the kinetic energy part of the total Hamiltonian and H ′ (t) represents the potential energy part. In general H 0 (t) and H ′ (t) do not commute with each other. The split-operator scheme (2) applied to (Eq. 16) then leads to The small error of this operator splitting step arises from the nonzero commutator between H 0 (t) and H ′ (t), which is at least of the order of (δt) 3 . The advantage of the split-operator method is that each step represents a unitary evolution and each exponential in (Eq. 18) can take a diagonal form in either the position or the momentum representation. The error of this operator splitting step is in general smaller than that induced by the aforementioned midpoint rule integration in (Eq. 16). Because in our work the total duration of the simulated chemical reaction is short, the above low-order approach already has a great performance. If long-time simulations with preferably larger time steps are needed in a quantum simulation, then one may use even higher-order split-operator techniques for explicitly time-dependent Hamiltonians (5,6).

EXPERIMENTAL IMPLEMENTATION
The experiment consists of three steps: (a) Initial state preparation, which is to prepare the ground state |φ 0 of the bare Hamiltonian T + V (representing the reactant state); (b) 25 discrete steps of dynamical evolution to simulate the actual continuous chemical reaction dynamics; (c) Measurement of the overlaps C(|ψ(t j ) , |φ 0 ) = | φ 0 |ψ(t j ) | 2 and C(|ψ(t j ) , |φ 1 ) = | φ 1 |ψ(t j ) | 2 at t j = jδt, which is to show the transformation between the reactant and product states.

A. Initial State Preparation
To prepare the ground state |φ 0 , firstly we need to create a pseudo-pure state (PPS) from the thermal equilibrium state -a mixed state which is not yet ready for quantum computation purposes. The thermal equilibrium state of our sample can be written as is the gyromagnetic ratio of the nuclear spins. Typically, γ C = 1, γ H = 4 and γ F = 3.7, with a constant factor ignored. We then use the spatial average technique (7) to prepare the PPS where ǫ ≈ 10 −5 represents the polarization of the system and I is the 8 × 8 unity matrix. The unity matrix has no influence on our experimental measurements and hence can be dropped.
The pulse sequence to prepare the PPS from the thermal equilibrium state is shown in (Fig.   S1A). In particular, the gradient pulses (represented by G Z ) destroys the coherence induced by the rotating pulses and free evolutions. After obtaining the PPS, we apply one shaped pulse calculated by the GRadient Ascent Pulse Engineering (GRAPE) algorithm (8)(9)(10) to obtain the initial state |φ 0 , with the pulse width 10 ms and a fidelity 0.995. In order to assess the accuracy of the experimental preparation of the initial state, a full state tomography (11) is implemented.
The fidelity (12) between the target density matrix ρ target and the experimental density matrix ρ exp is found to be A detailed comparison between ρ target and ρ exp is displayed in (Fig. S1B).

B. Dynamical Evolution
To observe the continuous reactant-to-product transformation, we divide the whole time evolu- where the operators are assumed to be in their diagonal representations.
To map U(t m , t m−1 ) to our 3-qubit NMR quantum computer, we discretize the potential energy curve using 8 grid points. Upon this discretization, operators V δt To evaluate the Eδt The quantum gate network for the QFT operation that transforms the momentum representation to the coordinate representation is already shown in (Fig. 3). It consists of three which maps the basis state |0 to 1 √ 2 (|0 + |1 ) and |1 to 1 The matrix form of the SWAP gate is which exchanges the state of the 19 F qubit and with that of the 1 H qubit. This bottom-up approach will then accumulate the errors in every single-qubit operation. Considerable decoherence effects will also emerge during the long process. For example, we have attempted to directly decompose the network into a sequence of RF pulses, finding that the required free evolution time for the 25 loops of evolution is more than 1 s, which is comparable to the T 2 time of our system. To overcome these problems and to reach a high-fidelity quantum coherent control over the three interacting qubits, the unitary operators used in our experiment are realized by shaped quantum control pulses found by the GRadient Ascent Pulse Engineering (GRAPE) technique (8)(9)(10). To maximize the fidelity of the experimental propagator as compared with the ideal gate operations, we use a mean gate fidelity by averaging over a weighted distribution of RF field strengths to minimize the inhomogeneity effect of the RF pulses applied to the sample.
For a known or desired unitary operator U target , the goal of the GRAPE algorithm is to find a shaped pulse within a given duration t total to maximize the fidelity where U cal is the unitary operator actually realized by the shaped pulse and 2 n is the dimension of the Hilbert space. We discretize the evolution time t total into N segments of equal duration ∆t = t total /N, such that U cal = U N · · · U 2 U 1 , with the evolution operator associated with the jth time interval given by Here H int is the three-qubit self-Hamiltonian in the absence of any control field, H k represents the interaction Hamiltonians due to the applied RF field, and u k (j) is the control vectors associated with H k . Specifically, in our experiment u k (j) are the time-dependent amplitudes of the RF field along the x and y directions, for the F-channel, the C-channel and the H-channel.
With an initial guess for the pulse shape, we use the GRAPE algorithm to optimize u k (j) iteratively until U cal becomes very close to U target . More details can be found from Ref. (8). The GRAPE technique dramatically decreases the duration and complexity of our experiment and at the same time increases the quantum control fidelity. In our proof-of-principle demonstration of the feasibility of the quantum simulation of a chemical reaction, the task of searching for the GRAPE pulses is carried out on a classical computer in a rather straightforward manner. It is important to note that this technique can be scaled up for many-qubit systems, because the quantum evolution of the system itself can be exploited in finding the high-fidelity coherent control pulses.
As an example, (Fig. S2) shows the details of one 15 ms GRAPE pulse to realize the quantum evolution from t = 0 to t 7 = 7δt (also combining the operations for initial state preparation and the extra operation R that is useful for the measurement stage). The shown GRAPE pulse is found by optimizing the frequency spectrum divided into 750 segments. The shown GRAPE pulse has a fidelity over 0.99.

C. Measurement
To simulate the process of a chemical reaction, it is necessary to measure the simulated reactantto-product transformation at different times. To that end we measure the overlaps of C(|ψ(t m ) , |φ 0 ) and C(|ψ(t m ) , |φ 1 ) at t m = mδt. Here we first provide more explanations about how a diagonalization method can reduce the measurement of the overlaps to population measurements.
The three population-readout spectra after applying the GRAPE pulse are shown in (  S3B) and 1 H (see Fig. S3D) spectra as well as the normalization condition 8 i=1 P (i) = 1, we obtain all the 8 populations and hence the overlap C(|ψ(t 7 , |φ 0 ). The theoretical and experimental results for this overlap are 0.535 and 0.529, which are in agreement. A similar procedure is used to obtain C(|ψ(t m , |φ 1 ).
The spectra of the 1 H and 19 F channel are obtained by first transmitting the signals of the 19 F and 1 H qubits to the 13 C qubit using SWAP gates. With this procedure all the spectra shown in (Fig. S3) are exhibited on the 13 C channel. Indeed, because in our sample of natural abundance, only ≈ 1% of all the molecules contain a 13 C nuclear spin, the signals from the 1 H and 19 F nuclear spins without applying SWAP gates would be dominated by those molecules with the 12 C isotope.   S3. Measured spectra to extract the populations of the system density matrix before or after applying the GRAPE shown in (Fig. S2). (A) 13 C spectrum of the PPS |000 as a result of a [π/2] y pulse applied to the 13 C qubit. The area (integral) of the absorption peak can be regarded as one benchmark in NMR realizations of quantum computation. (B)-(D) Signals from the 19 F, 13 C and 1 H qubits after applying the GRAPE pulse and a [π/2] y pulse to each of the three qubits. All the spectra are exhibited on the 13 C channel through SWAP gates. The integration of each spectral peak gives the difference of two particular diagonal elements of the density matrix ρ ′ (t 7 ).   Hz