Quantum walks and Dirac cellular automata on a programmable trapped-ion quantum computer

The quantum walk formalism is a widely used and highly successful framework for modeling quantum systems, such as simulations of the Dirac equation, different dynamics in both the low and high energy regime, and for developing a wide range of quantum algorithms. Here we present the circuit-based implementation of a discrete-time quantum walk in position space on a five-qubit trapped-ion quantum processor. We encode the space of walker positions in particular multi-qubit states and program the system to operate with different quantum walk parameters, experimentally realizing a Dirac cellular automaton with tunable mass parameter. The quantum walk circuits and position state mapping scale favorably to a larger model and physical systems, allowing the implementation of any algorithm based on discrete-time quantum walks algorithm and the dynamics associated with the discretized version of the Dirac equation.

Q uantum walks (QWs) are the quantum analog of classical random walks, in which the walker steps forward or backward along a line based on a coin flip. In a QW, the walker proceeds in a quantum superposition of paths, and the resulting interference forms the basis of a wide variety of quantum algorithms, such as quantum search [1][2][3][4][5] , graph isomorphism problems [6][7][8] , ranking nodes in a network [9][10][11][12] , and quantum simulations, which mimic different quantum systems at the low and high energy scale [13][14][15][16][17][18][19][20][21][22] . In the discrete-time QW (DQW) 23,24 , a quantum coin operation is introduced to prescribe the direction in which the particle moves in position space at each discrete step. In the continuous-time QW (CQW) 25,26 , one can directly define the walk evolution on position space itself using continuous-time evolution. We focus on DQWs and their implementation on gatebased quantum circuits in this work.
DQWs can be realized directly on lattice-based quantum systems where position space matches the discrete lattice sites. Such implementations have been reported with cold atoms 27,28 and photonic systems [29][30][31][32] . In trapped ions, a DQW has been implemented by mapping position space to locations in phase space given by the degrees of freedom associated with the harmonic motion of the ion in the trap [33][34][35] . All these physical implementations have followed an analogue quantum simulation approach. However, implementing QWs on a circuit-based system is crucial to explore the algorithm applications based on QWs. The implementation of a DQW on a three-qubit NMR system 36 , a CQW on a two-qubit photonic processor 37 and a split-step QW on superconducting circuits 38,39 are the circuitbased implementations reported to date. To implement DQWs on circuit-based quantum processors, its necessary to map the position space to the available multi-qubit states. The range of the walk is set by the available qubit number and gate depth. The term Quantum Cellular Automaton (QCA) describes a unitary evolution of a particle on a discretized space [40][41][42] , as occurs with QWs. In this context, the one-dimensional Dirac cellular automaton (DCA) has been derived from the symmetries of the QCA showing how the dynamics of the Dirac equation emerges [40][41][42][43][44] .
Here we implement efficient quantum circuits for a DQW in one-dimensional position space, which provide the timeevolution up to five steps. We report the experimental realization of a DQW on five qubits within a seven-qubit programmable trapped-ion quantum computer 45 . With a tunable walk probability at each step we also show the experimental realization of a DCA where the coin bias parameter mimics the mass term in the Dirac equation. This will be central for discrete-time quantum simulation of the dynamics associated with the relativistic motion of a spin-1/2 particle in position space.

Results
Review of quantum walks and the connection to the Dirac equation. The DQW consists of two quantum mechanical systems, an effective coin and the position space of the walker, as well as an evolution operator, which is applied to both systems in discrete time-steps. The evolution is given by a unitary operator defined on a tensor product of two Hilbert spaces H c H p where, H c is the coin Hilbert space spanned by the internal states 0 j i c and 1 j i c of a single qubit, while H p represents the position Hilbert space given by the position states x j i with x 2 Z encoded in several qubits as described below. Here, the unitary quantum coin toss operation,Ĉ θ , is a unitary rotation operator that acts on the coin qubit space, where θ is a coin bias parameter that can be varied at each step to modify the QW path superposition weights. The conditional position-shift operator,Ŝ, translates the particle to the left and right conditioned by the state of the coin qubit, The state of the particle in position space after t steps of the walk, is accomplished by the repeated action of the operatorŴ ¼ŜĈ θ on the initial state of the particle ψ j i c ¼ α 0 j i c þ β 1 j i c at position x = 0, as shown in Fig. 1, where ψ 0ð1Þ x;t denotes the left(right) propagating component of the particle at time-step t. The probability of finding the particle at position x and time t will be Pðx; tÞ ¼ jψ 0 x;t j 2 þ jψ 1 x;t j 2 . Recent works have shown a relationship between DQWs and the Dirac equation [14][15][16][17][18]43 . Starting form a discrete-time evolution operator and then moving from position space to momentum space, Dirac kinematics can be recovered from the diagonal terms of the unitary evolution operator for small momenta in the small mass regime [16][17][18] . In contrast with these proposals in the Fourier frame, we focus our implementation on the probability distribution of the DQW, which is analogous to the spreading of a relativistic particle. To realize a DCA and recover the Dirac equation, a split-step quantum walk, one form of the DQW, is used 40 . Each step of a split-step quantum walk is a composition of two half step evolutions with different coin biases and positionshift operators,Ŵ where the coin operationĈ θ j , with j = 1, 2, is given in Eq. (1). The split-step position-shift operators are, Following Mallick 40 and Kumar 44 , the particle state at time t and position x after the evolution operationŴ ss is described by the differential equation,

∂ ∂t
ψ 0 The tunability of parameters θ 1 and θ 2 on the split-step QW permits the study of one-dimensional Dirac equations effectively, within the low momentum subspace, for spin-1/2 particles 40,44 . It is important to stress out that, the description of the Dirac Discrete-time quantum walk scheme. Each step is composed of a quantum coin operation,Ĉ θ , with tunable effective coin bias parameters, θ i , followed by a shift operation,Ŝ. equation used here corresponds to the 2 × 2 representation, i.e. no spin degree of freedom. For instance, the massless particle Dirac equation can be recovered for cosðθ 1 þ θ 2 Þ ¼ 1. Thereby, Eq. (7) becomes i_½∂ t À cos θ 2 ðcos θ 1 σ z þ sin θ 1 σ y Þ∂ x Ψðx; tÞ ¼ 0, which is identical to the Dirac equation of a massless particle in the relativistic limit 46 . In contrast, considering θ 1 = 0 and a very small value of θ 2 corresponds to the Dirac equation for particles with small mass 35,46 in the form At the same time, by choosing θ 1 = 0, the quantum walk operatorŴ ss given in Eq. (4) takes the form of the unitary operator for a DCA 40 , Within this framework, θ 2 determines the mass of the Dirac particle. The split-step DQW described by the operatorŴ ss is equivalent to the two period DQW with alternate coin operations, θ 1 and θ 2 , when the alternate points in position space with zero probability are ignored 47 . Therefore, all the dynamics of a DCA can be recovered from the DQW evolution usingŴ and alternating the two coin operations. See Methods for a comparison between DCA and the explicit solution of the Dirac equation. Typical features of the Dirac equation in relativistic quantum mechanics, such as the Zitterbewegung 40 and the Klein paradox 48 , are also dynamical features of the DCA, as well as the spreading of the probability distribution and the entanglement of localized positive-energy states. We note that these effects have also been shown in direct analog simulations of the Dirac equation with trapped ions 35 and BECs 49 .
Experimental DQW implementation. To realize the DQW on a system of qubits one must pick a mapping of the particle position to the qubit space. As shown in 50 , there is no unique way to map position states to multi-qubit states, so each circuit decomposition depends on the configuration adopted. A direct mapping of each walker position to one qubit in the chain mimicking the arrangement of the qubit array is inefficient in terms of qubit number and gates required (the former grows linearly and the latter quadratically with the position space size modeled). In order to minimize resource use, we take advantage of a digital representation to map the position space into a multi-qubit state and re-order it in such a way that the state 0 j i ð 1 j iÞ of the last qubit corresponds to even (odd) position numbers. This allows us to minimize the changes needed in the qubit space configuration during each step of the walk (see Fig. 2). To implement a quantum walk in one-dimensional position Hilbert space of size 2 n , (n + 1) qubits are required. One qubit acts as the coin and the other n qubits mimic the position Hilbert space with 2 n − 1 positions of a symmetric walk about x ¼ 0 j i. We note that the particle can be started from any point in the position space, however setting the initial state reduces the gate counting in the circuit and hence reduces the overall error. The coin operation is achieved by single-qubit rotations on the coin-qubit while the shift operators are realized by using the coin as a control qubit to change the position state during the walk.
We realize the walk on a chain of seven individual 171 Yb + ions confined in a Paul trap and laser-cooled close to their motional ground state 45,51 . Five of these are used to encode qubits in their hyperfine-split 2 S 1/2 ground level. Single-qubit rotations, or R gates, and two-qubit entangling interactions, or XX gates are achieved by applying two counter-propagating optical Raman beams to the chain, one of which features individual addressing (see Methods for experimental details). We can represent up to 15 positions of a symmetric QW, including the initial position x ¼ 0 j i. Based on this position representation a circuit diagram for the DQW on five qubits with the initial state 0 j i c 0000 j i is composed for up to five steps, see Fig. 3. Each evolution step,Ŵ, starts with a rotation operation on the coin-qubit,Ĉ θ j , followed by a set of controlled gates that change the position state of the particle underŜ. Due to the gratuitous choice of position representation used, it is enough to perform a single-qubit rotation on the last qubit at every step, which could also be done by classical tracking 50 .
Computational gates such as CNOT, Toffoli, and Toffoli-4 are generated by a compiler which breaks them down into constituent physical-level single-and two-qubit gates 45 . A circuit diagram detailing the compiled building blocks is shown in Methods. To prepare an initial particle state different from 0 j i c it is enough to perform a rotation on the coin-qubit before the first step. In some cases this rotation can be absorbed into the first gates in step one. Table 1 summarizes the number of native gates needed per step for initial state. To recover the evolution of the Dirac equation in a DQW after five steps, 81 single qubit gates and 32 XX-gates are required.
After evolving a number of steps, we sample the corresponding probability distribution 3000 times and correct the results for readout errors. For the DQW evolution up to five steps shown in Fig. 3, a balanced coin (θ 1 = θ 2 = π/4) is used where the initial position is x ¼ 0 j i for different initial particle states, 0 j i c in Fig. 3b i, 1 j i c in Fig. 3b ii, and an equal superposition of both in Fig. 3b iii. In Fig. 3b iv, b v, and b vi we show the ideal output from classical simulation of the circuit for comparison (see Methods for a plot of the difference). With a balanced coin the particle evolves in equal superposition to the left and right position at each time step and upon measurement, there is a 50/ 50 probability of finding the particle to the left or right of its previous position, just as in classical walk. If we let the DQW evolve for more than three steps before we perform a position measurement, we will find a very different probability distribution compared to the classical random walk 52 .
The same experimental setup can be used to recover a DCA with a two-period DQW. Here we set θ 1 = 0 and varied θ 2 to recover the Dirac equation for different mass values. In Fig. 3c, we show experimental results for θ 2 = π/4, π/10 and π/20, corresponding to a mass 1.1357, 0.3305, and 0.159 in units of ℏc −2 s −1 , with the initial particle state in the superposition 0 j i c þ i 1 j i c . The main signature of a DCA for small mass values is the presence of peaks moving outward and a flat distribution in the middle as shown for the cases with small values of θ 2 , Figs. 3c ii-iii. This bimodal probability distribution in position space is an indication of the one-dimensional analog of an initially localized Dirac particle, with positive energy, evolving in time which spreads in all directions in position space at speeds close to the speed of light 53 . In contrast, a DCA with θ 2 = π/4, Fig. 3c i corresponds to a massive particle and hence there is a slow spread rather than a ballistic trajectory in position space.  Fig. 2 Mapping of multi-qubit states to position states. Multi-qubit states are re-ordered in such a way that the state 0 j ið 1 j iÞ of the last qubit corresponds to even (odd) position numbers and its correspondence in the position space. NATURE COMMUNICATIONS | https://doi.org/10.1038/s41467-020-17519-4

Discussion
We have shown how quantum walks form the basic elements for simulation of the dynamics associated with the free Dirac particle with positive energy. Despite the population mismatch of 0.05-0.2 between the simulation and the experimental results after five steps, the final probability density exhibits the characteristic behavior of an initially localized Dirac particle. A key factor on the digitization of DQW/DCA is the mapping of qubit states to position space. An adequate mapping is important to minimize the number of gates on the protocol, and as a consequence, the resource scaling of the evolution. By increasing in the available number of qubits, these quantum circuits can be scaled to implement more steps and simulate a multi-particle DQW. The number of gates has a polynomial growth rate with the number of steps 54 . The correspondence between DQWs and the dynamics of Dirac particles suggests that the QWs formalism is as a viable approach to reproduce a variety of phenomena underpinned by Dirac particle dynamics in both the high-and low-energy regime 22,39,43 . Quantum simulations of free quantum field theory 43 , Yang-Mills gauge-field on fermionic matter 55 , as well as the effect of mass and space-time curvature on entanglement between accelerated particles 20,56,57 have been reported and probing quantum field theory from the algorithmic perspective in an active field of research. However, the circuit complexity for position-dependent coin operations needed for simulating these effects will increase with the complexity of the evolution, which means further improvements in quantum hardware will be necessary for their realization.

Methods
Experimental details. The experiments are performed in a chain of seven individual 171 Yb + ions confined in a Paul trap and laser-cooled close to their motional ground state 45,51 . In order to guarantee higher uniformity in the ion spacing, matching the equally spaced individual addressing beams, the middle five of these are used to encode qubits in their hyperfine-split 2 S 1/2 ground level, with an energy difference of 12.642821 GHz. The two edge ions are neither manipulated nor measured, however, their contribution to the collective motion is included when creating the entangling operations. The ions are initialized by an optical pumping scheme and are collectively read out using state-dependent fluorescence detection 58 , with each ion being mapped to a distinct photo-multiplier tube (PMT) channel. The system has two mechanisms for quantum control, which can be combined to implement any desired operation: single-qubit rotations, or R gates, and two-qubit entangling interactions, or XX gates. These quantum operations are achieved by applying two counter-propagating optical Raman beams from a single 355-nm mode-locked laser 59 . The first Raman beam is a global beam applied to the entire chain, while the second is split into individual addressing beams, each of which can be controlled independently and targets one qubit. Single-qubit gates are generated by driving resonant Rabi rotations of defined phase, amplitude, and duration. Two-qubit gates are realized by illuminating two ions with beat-note frequencies near to the motional sidebands and creating an effective spin-spin (Ising) interaction via transient entanglement between the state of two ions and all modes of motion [60][61][62] . The average state detection fidelity for single-and two-qubit gate are 99.5(2)% and 98-99%, respectively. Rotations around the z-axis are achieved by phase advances on the classical control signals. Both the R as well as the XX angle can be varied continuously. State preparation and measurement (SPAM) errors are characterized and corrected by applying the inverse of an independently measured state-to-state error matrix 63 .
Errors. In order to illustrate how our experiment performs, we plot the absolute value of the difference between measured and simulated position distributions, Fig. 4, they match the theoretical expectation closely. These distributions are obtained after tracing out the coin information of the unitary evolutionŴ ¼ŜĈ θ for each time-step. In both instances, DQW and DCA, the number of gates and hence the error incurred grows with the number of steps. Step 1 Step 2 Step 3 Step 4 Step 5 Output of a step-5 Dirac Cellular Automaton for θ 1 = 0 and, c i and c iv θ 2 = π/4, c ii and c v θ 2 = π/10 and c iii and c vi θ 2 = π/20 with the initial state Ψ in Step Apart from this, the output from the walk both, DQW and DCA, is designed to have zero probabilities for an alternate position, however, due to addressing crosstalk in the system, we see a small amount of population in these states. The same mechanism can populate the state 1000 j iof the logical encoding not included in our mapping. In fact, the average experimental population registered in this state is <2% for the deepest circuits and hence does not affect the results significantly.

Data availability
The data that support the findings of this study are available from the corresponding author upon reasonable request.