<<

www.nature.com/npjqi

ARTICLE OPEN Simulating many-body dynamics on a current digital quantum computer

Adam Smith 1,2*,M.S.Kim1, Frank Pollmann2 and Johannes Knolle1

Universal quantum computers are potentially an ideal setting for simulating many-body that is out of reach for classical digital computers. We use state-of-the-art IBM quantum computers to study paradigmatic examples of condensed physics—we simulate the effects of disorder and interactions on quantum particle transport, as well as correlation and entanglement spreading. Our benchmark results show that the quality of the current machines is below what is necessary for quantitatively accurate continuous- dynamics of and reachable system sizes are small comparable to exact diagonalization. Despite this, we are successfully able to demonstrate clear qualitative behaviour associated with localization physics and many-body interaction effects. npj (2019) 5:106 ; https://doi.org/10.1038/s41534-019-0217-0

INTRODUCTION example, allowed us to study physics31,35 and 32–34 Quantum computers are general purpose devices that leverage many-body localized systems in two . More 1234567890():,; quantum mechanical behaviour to outperform their classical recently, there have also been advances in trapped ion quantum counterparts by reducing the computational time and/or the simulators, which have the benefit of being able to implement 6,7,37 required physical resources.1 Excitement about quantum compu- long range interactions, and have been used to study the tation was initially fuelled by the prime-factorization algorithm Schwinger-mechanism of pair production/annihilation in 1D developed by Shor,2 which is most popularly associated with the lattice QED7 and Floquet time .38 ability to attack currently used cyber security protocols. More Universal quantum computers are also increasingly looking like importantly, it provided a paradigmatic example of dramatic a feasible setting for simulating quantum dynamics. One of the exponential improvement in computational speed when com- biggest advantages of using a quantum computer for this purpose pared with classical algorithms. It has since been realised that the is the flexibility it offers. A single quantum device could in potential power of quantum computers could have far reaching principle perform simulations that currently require several applications, from and the associated benefits different experiments, using disparate methods. Furthermore, it for medicine and drug discovery,3 to learning should be possible to access new physics not currently accessible, and artificial intelligence.4 Even before reaching these lofty goals, most notably, the simulation of lattice gauge theories with there may also be practical uses for noisy intermediate-scale dynamical gauge fields. These are ubiquitous in the theoretical quantum (NISQ) devices.5 study of strongly-correlated quantum matter but require multi- These quantum devices can be implemented in a large number body couplings, which have so far proven difficult to achieve in of ways, for example, using ultracold trapped ions6–11 cavity experiment.39,40 (QED),12–15 photonic circuits,16–18 sili- A particularly exciting opportunity has been provided by IBM in con quantum dots,19–21 and theoretically even by braiding, as yet the form of an online network called IBM Q. unobserved, exotic collective excitations called non-abelian any- This consists of a set of small quantum computers of 5 and 16 ons.22–24 One of the most promising approaches is using that are available freely to the public, two 20 superconducting circuits,25–27 where recent advances have machines accessible by IBM Q partners,41 and the python resulted in devices consisting of up to 72 qubits, pushing us ever API42 for programming the devices. The publicly available closer to realising so-called .28 The apparent resources have already resulted in a spread of results, such as proximity of current devices to this milestone makes it timely to calculating the of simple molecules,3,43 creating and review the current capabilities and limitations of quantum measuring highly entangled many qubit states,44,45 implementing – computers. quantum algorithms,46 48 and simulating non-equilibrium ’s original idea was to simulate quantum dynamics in the transverse-field Ising,49,50 Heisenberg51,52 and many-body dynamics—a notoriously hard problem for a classical Schwinger53 models, as just a few examples. Given the infancy of computer—by using another quantum system.29 Over the last quantum computing efforts, all these results are understandably couple of decades, this approach of using a purpose built small scale and of limited accuracy. has been extremely successful in accessing IBM is not alone in their efforts to make quantum computing physics beyond the reach of numerics on a classical computer. more mainstream, with introducing the Q-sharp Most notable are cold experiments with optical lattices30–36 programming language,54 Google developing the Circq python where the natural of the atoms corresponds to a high library,55 and Rigetti providing their own Quantum Cloud Service accuracy to that of a local Hamiltonian of choice. This has, for and Forest SDK built on Python.56 Rigetti and IonQ also provide

1Blackett Laboratory, Imperial College London, London SW7 2AZ, UK. 2Department of Physics, T42, Technische Universität München, James-Franck-Straße 1, D-85748 Garching, Germany. *email: [email protected]

Published in partnership with The University of New South Wales A. Smith et al. 2 selective public access to hardware—based on superconducting qubits and trapped ions, respectively. All of these resources are allowing a lot of hands on experience with quantum computers from researchers and the general public all around the world. Furthermore, it highlights that there are currently several parallel efforts of research and development from industry focussed on quantum computing, and cloud-based services that are flexible and prepared for hardware. Given the current stage of development, and the immense expectation from the public and physics communities, it is timely to critically assess and benchmark the state-of-the-art. In this article we consider the far-from-equilibrium dynamics of global quantum quenches simulated on an IBM 20 qubit quantum computer. The models that we consider are of central importance to and display a wide range of phenomenologies. By measuring a range of physical correlators, Fig. 1 Schematic of the implementation of Trotterized evolution. a The procedure of adding more Trotter steps to reach longer . b, c we can assess the capabilities and limitations of current quantum are the basic and symmetric Trotter decomposition, respectively, for computers for simulating quantum dynamics. ^z ^ Àihj σ Δt ^ the Hamiltonian Eq. (3). In b the operators are Aj ¼ e j ; Bj ¼ σ^z σ^z σ^x σ^x σ^y σ^y Δ ^z Δt ÀiðU j j 1ÀJð j j 1þ ÞÞ t ^ Àihj σ ^ e þ þ j jþ1 and in c they are Aj ¼ e j 2 ; Bj ¼ σ^z σ^z σ^x σ^x σ^y σ^y Δt σ^z σ^z σ^x σ^x σ^y σ^y Δ ÀiðU j j 1ÀJð j j 1þ ÞÞ ^ ÀiðU j j 1ÀJð j j 1þ ÞÞ t RESULTS e þ þ j jþ1 2 ; Cj ¼ e þ þ j jþ1 . Setup In this article, we study global quantum quenches,57,58 that is we calculate local observables and correlators of the form These Hamiltonians are perfect testbeds for digital quantum simulation since they can be directly simulated on a quantum ψ ^ ψ ; ψ ^ ^ ψ ; (1) ðtÞ Oj ðtÞ ðtÞ OjOk ðtÞ computer – the spins-1/2 of the former correspond directly to the ^ where Oj are local operators and the time-dependent states are qubits of the latter, and the local connectivity of the qubits is

1234567890():,; suited for the local form of the Hamiltonian. ψ ÀiHt^ ψ ; jiðtÞ ¼ e jið0Þ (2) In our simulations we achieve the time evolution using a Trotter 66,67 and where jiψð0Þ is the initial state, which differs globally from an decomposition of the unitary time evolution ^ ÀiHt^ eigenstate of H^. In other words, we can consider jiψð0Þ to be the UðtÞ¼e . Our simulation proceeds by the following steps. ground state of a (time-independent) preparation Hamiltonian, First, we create the initial state, which is done by applying Pauli-X ^ ^ ^ ^ operations to the default initial state of the IBM machine, H0 ¼ H À hV, where V is a global perturbation, and the perturba- tion strength h is instantaneously quenched from zero at time jiÁ Á Á """ Á Á Á . Second, we discretize time and the evolution becomes a product of discrete evolution operations t ¼ 0. ^ ^ Δ ^ Δ We consider one dimensional -1/2 chains, consisting of N UðtÞ¼Uð tÞÁÁÁUð tÞ. Note that in our plots we include fi additional data points by varying δt in the final discrete evolution spins, initially prepared in either a domain wall con guration, Δ jiÁ Á Á ###""" Á Á Á , or Néel state, jiÁ Á Á "#"#" Á Á Á . Quenches from step. Third, we trotterize the discrete operators Uð tÞ into a these initial states are particularly easy to prepare due to the local product of one- and two-qubit unitaries. Finally, we decompose tensor-product structure of the initial state and have been studied these unitaries into the CNOT and single qubit rotation gates that in cold atom experiments.32 The time evolution after the quantum can be directly applied on the IBM devices. Please see Fig. 1 for a quench will be governed by a Hamiltonian of the form schematic of this procedure, and see Methods for more details. Once we have constructed the state jiψðtÞ ,wethenperform XNÀ1XNÀ1 XN ^ σ^xσ^x σ^yσ^y σ^zσ^z σ^z; measurements, which allows us to construct the quantities of H ¼ÀJ j jþ1 þ j jþ1 þ U j jþ1 þ hj j (3) σ^z interest in Eq. (1). We will only consider correlators of j operators, j¼1 j¼1 j¼1 whereweonlyneedtomakemeasurementsinasingle(z-basis) for σ^α with J>0, and j are the Pauli matrices with eigenvalues ±1. This the spins. In the following we will use 8192 measurements per data model can also be written in terms of hard-core boson, or spinless point, which means that the statistical error for these local fermion Hamiltonian via the Jordan-Wigner transformation. correlators is 0:01, which is too small to be included in our figures. We will consider four distinct cases for the Hamiltonian We consider three different types of dynamical quantities: parameters: ● The local magnetization (i) The XX chain,defined by U ¼ 0 and h ¼ 0. This is a uniform, z j M ðtÞ¼hψðtÞjσ^ jψðtÞi: (4) non-interacting model. j j (ii) Disordered XX chain for U ¼ 0 and hj uniformly randomly In the case of a domain wall initial state, we will also compute ; sampled from the interval ½Àh hŠ. This is the prototypical = 59 XN 2 σ^z lattice model for Anderson localization. j þ 1 NhalfðtÞ¼ hjψðtÞ jiψðtÞ ; (5) (iii) XXZ spin chain,defined by U ≠ 0 and hj ¼ 0. This is a 2 j¼1 particular case of the Heisenberg model for quantum magnetism. which is equal to zero at t ¼ 0 and grows as the domain wall (iv) XXZ chain with linear potential,defined by U>0 and hj ¼ hj, spreads. i.e., a linearly increasing potential. This model was recently ● The connected equal-time correlator studied in the context of many-body localization without ^z ^z ^z ^z CjkðtÞ¼hjψðtÞ σ σ jiÀψðtÞ hjψðtÞ σ jiψðtÞ hjψðtÞ σ jiψðtÞ : disorder,60,61 where Wannier-Stark localization62 is induced j k j k by the linear potential. (6) This family of Hamiltonians covers a large range of physics in Note, the connected form of this correlator measures the condensed matter, from the integrable limit,57 to many-body quantum correlators between distant spins but is not sensitive quantum magnetism,63 to that of many-body localization.64,65 to the classical correlations in our initial states.

npj Quantum Information (2019) 106 Published in partnership with The University of New South Wales A. Smith et al. 3

Fig. 2 Results for a global quench from a domain wall initial state. a, b The local magnetization of the fourth and sixth spins of the chain with N ¼ 6, and c is for the sixth spin for longer times. Plotted are the result of exact diagonalization, numerical Trotter evolution, and the experimental data, both in raw form (IBM) and when the conserved quantities are imposed (IBM constrained), see the main text. d–f The time and site resolved IBM results for the local magnetisation for N ¼ 6; 8; 10 sites, respectively. g The corresponding numerical symmetric Trotter evolution for N ¼ 10. Data were obtained on 12 March 2019 for all figures except (c), which were obtained on 3 April 2019.

● The quantum Fisher information (QFI). We will consider a is that the fidelities of these two qubit gates are an order of particular case of the QFI for a pure state, namely, magnitude worse than the single qubit gates. The CNOTs also take ! X X 2 a longer real-world time to implement than the single qubit gates. z z z The increased implementation time of the circuits increases the F ðtÞ¼ s s hjψðtÞ σ^ σ^ jiψðtÞ À s hjψðtÞ σ^ jiψðtÞ ; Q j k j k j j potential for errors due to energy relaxation and dephasing, jk j parametrized by the T1 and T2 times, as well as other (7) environmental effects and cross-talk. On the IBM device, we use where sj ¼þ1 for left half of the sites j and sj ¼À1 for the N = 6, 8, 10 of the qubits as our system with 4 or 5 symmetric right half at t ¼ 0. More generally, the QFI (for a pure state) is Trotter steps. These qubits are chosen as the connected subset 2 2 defined as the variance, 4ðhO^ iÀhO^i Þ, where O^ is a sum of with the lowest average CNOT errors such that the single qubit local operators, which each have a spectrum of unit width. In measurement errors and T2 decoherence times do not exceed a P certain threshold. Please see Methods for more details about the our case we have O^ ¼ 1 s σ^z. The QFI is an entanglement 2 j j j quantum device and details of the algorithm used to select the 68–70 fi witness, and for our chosen de nition in Eq. (7) is also qubits. closely related to the von Neumann entanglement .71–73 Local magnetization The IBM quantum computers First, we consider results for the uniform XX spin chain The quantum computer that we use is the latest 20-qubit IBM Hamiltonian with U ¼ 0 and hj ¼ 0 (case (i)), quenched from a device, codenamed ibmq_poughkeepsie. It consists of a two- domain wall configuration, shown in Fig. 2. Figure 2a–c show a dimensional array of qubits that have local connectivity. We can comparison of the magnetization of the fourth (middle) and sixth perform arbitrary single qubit rotations and controlled-NOT (end) spins of the chain as computed by exact diagonalization (CNOT) gates between connected qubits, see Methods. For the with continuous time evolution, a numerical implementation of data presented in this paper the average readout errors, CNOT the Trotter decomposition and the corresponding data from the errors, and T2 (dephasing) times were approximately 4%, 2% IBM machine. The data from the machine is further split into the and 90 μs, respectively. An important point to note is that the raw data (orange triangles) and constrained data (red squares). IBM machines are recalibrated on an approximately daily basis, The constrained data only considers those measurement out- which means the data can vary across days. Crucially, we find comes that have the same total magnetization as the initial state that the our results are qualitatively reproducible, and we —which is a conserved quantity—that is, we restrict to the compare data obtained across three consecutive days in the physical Hilbert of the Hamiltonian we are simulating. We Methods. discuss this rudimentary error mitigation method further in the To benchmark the accuracy of the simulation, we compare the context of quantifying the accuracy of the quantum computer (see data with a numerical implementation of the Trotter evolution, as Fig. 6b), and it will be used in all subsequent figures. See Methods well as continuous-time exact diagonalization (ED). The errors in for more details. our results are strongly influenced by the number of CNOT gates The data in Fig. 2a, b show that while all curves show in the corresponding . One of the reasons for this reasonable agreement at short times—for instance, we have a

Published in partnership with The University of New South Wales npj Quantum Information (2019) 106 A. Smith et al. 4

Fig. 3 Results for short time behaviour of Nhalf after a quench from a domain wall initial state. In all subfigures the inset shows the corresponding results of numerical Trotter evolution. a The disordered XX spin chain with disorder strength controlled by h using a symmetric Trotter decomposition. b The XXZ spin chain with nearest neighbour interactions parametrized by U with basic trotterization. c The XXZ spin chain with a linear potential with slope h ¼ 1:5, interaction strength U, and a symmetric Trotter decomposition. a, b were obtained on 12 March 2019 and c on the 10 May 2019.

delayed decay of the magnetization in Fig. 2b—the accuracy of First, we consider the disordered XX chain (case (ii)), which is the IBM data becomes bad very quickly. For times Jt > 1 the known to exhibit Anderson Localization in 1D for all values of the magnetization as measured on the machine approaches zero, disorder strength, h.74 As a consequence of increasing the which is the expected average value if the system thermalizes or if disorder strength, the extent of the spreading of the domain we were to randomly sample states. The agreement between the wall, and consequently the growth of Nhalf is reduced (indicated numerical results obtained from exact diagonalization (ED) and by a black arrow). We are able to reproduce this behaviour trotterization shows that the inaccuracy of the results is due to the qualitatively for short times on the IBM machine as shown in machine and not our approximation of the evolution. This rapid Fig. 3a. The corresponding numerical Trotter results are shown in decay in the accuracy with number of Trotter steps was also the inset, which shows that while the accuracy of the results is observed in ref. 49 for the transverse field on the 5 and quite low, the qualitative behaviour is still captured. Once again, 16 qubit IBM machines. we see that the data is biased towards the scrambled value as the In Fig. 2c we consider the evolution over a longer time window, number of Trotter steps is increased, which in the case up to Jt ¼ 10, rather than Jt ¼ 2:5. We see that the data very is 1:5. quickly approaches 0 and remains there, indicating that the Next, we consider the uniform XXZ chain (case (iii)) with U>0 system has equilibrated. From this figure we can see that due to and hj ¼ 0. In contrast to the previous cases, this Hamiltonian is the quality of the machine we want to take Δt in our Trotter steps interacting and thus describes true many-body physics. At short as large as possible so that we can reach longer times without times, the spreading of the domain wall is also hindered by the thermalizing. However, for the Trotter evolution to be accurate we energy cost of the additional interactions between neighbouring want Δt as small as possible. The Δt that we use are chosen spins. Once again, we can see this behaviour qualitatively in the (without much optimization) to maintain a reasonable accuracy in experimental results, shown in Fig. 3b. Note that while the short both the IBM data and the numerical trotterization. time results are similar to the previous case, it is due to a different Next, we consider the site dependence of the magnetization physical mechanism and is a many-body effect. The long-time shown in Fig. 2d–f, for N ¼ 6; 8; 10 sites and compared with the behaviour would be starkly different from that of the Anderson numerically computed Trotter evolution shown in Fig. 2g. In these localized case, which is, however, beyond the current capabilities figures we see a clear qualitative agreement between the of the IBM quantum computers. experimental and numerical results at short times, particularly In the third case we combine features of the previous two by the presence of a linear light-cone causality structure for the models and include both on-site potential energies and interac- spreading of the domain wall. This qualitative agreement, tions. We will consider the XXZ spin chain with a linear potential however, also worsens at longer times, and as we increase the (case (iv)), and both U>0 and h>0. If we compare with U ¼ 0, that is, a linear potential alone, then the eigenstates will be system size. In particular, in Fig. 2d we can see a marked decrease 60–62 in accuracy every three time steps. The origin can be explained as localized, and thus the spreading of the domain wall will be follows. Each block of three time steps is computed for the same limited. If we have U>0, then the two energy costs can fl number of time steps with Δt varying in the final Trotter steps (as compensate. For instance, consider ipping the middle two spins, explained earlier). It is when we add an additional time step for then there will be an increase in energy due to the potential but a the next block—and thus increase the number of gates in the decrease in the interaction energy. Therefore, the presence of quantum circuit—that we see a drop in the accuracy. This interactions makes it easier for the domain wall to spread resulting in an increase of Nhalf as a function of U (see black arrow). This behaviour is also seen in Fig. 6b where we show the number of fi measurements that are in the physical Hilbert space. There is a simple argument of energetics is con rmed by the numerical clear decrease in the percentage after the introduction of each results in the inset of Fig. 3c, and is qualitatively reproduced in the experimental data shown in the main figure. Note, however, that new Trotter step. this trend is less pronounced than in the previous two cases. This is in part due to the small scale of the changes in the exact results, Short-time many-body physics as well as the bias towards the thermal value of 1.5 at long times. While the results in Fig. 2 may at first seem discouraging for In this data, the addition of disorder and interactions lead to quantitative large-scale dynamical simulations, we will show in this similar qualitative behaviour on the time scales that we have section that we may still observe qualitative behaviour associated considered. However, at longer times there is a clear difference with non-trivial quantum phenomena. Here, we consider NhalfðtÞ, between the two cases. In the former we have localization defined in Eq. (5), after quenching from the domain wall initial behaviour leading to the long-time persistence of the initial state for three different cases. imbalance, whereas interactions generically lead to ergodic and

npj Quantum Information (2019) 106 Published in partnership with The University of New South Wales A. Smith et al. 5 state and we are not able to differentiate between the unitary and non-unitary errors occurring in our circuits. For non-interacting models (as is the case for the Hamiltonian of (case (i))), there is a direct relationship between the bipartite von Neumann entanglement entropy and the magnetization fluctua- 71–73 A A A tions. The former is defined by SvN ¼ÀTr ½ρ lnρ Š, where ρ is the reduced for half of the system. The variance of the half chain magnetization is proportional to our definition of the QFI and we have the approximate relation 5 S  F ; (8) vN 32 Q see ref. 73 for details of this cumulant expansion. In MBL systems the QFI—using instead the staggered magnetization for the operator O^ in Eq. (7)—also appears to mimic the bipartite entanglement entropy and grows logarithmically after a quantum quench.76 The QFI is also a multi-partite entanglement witness,68,69,77 and fi in particular, if the state is separable then we have that FQ  N, Fig. 4 Results for the connected spin correlator de ned in Eq. (6). 78–80 Data are computed using: a exact diagonalization, b numerical which is known as the shot noise limit in . trotterization, c the IBM quantum device. Data are shown for N ¼ For a general entangled state, however, the QFI is bounded by 2 = 6; hj ¼ 0 and U ¼ 0, using a symmetric trotterization, and obtained FQ  N , and a value of FQ N  m, indicates at least m þ 1-partite on 12 March 2019. entanglement. Note that the QFI is sensitive to theP choice of the ^ ^ σ^z operator O, and for example, if we choose O / j j , the total thermalizing behaviour, resulting in the loss of this information in local observables. With the current devices we are unfortunately unable to distinguish these two different regimes.

Spreading of correlations—light cone In the previous section, all the data correspond to some combination of local average magnetizations. Here, we look at the correlations between pairs of spatially separated spins, and how these correlations spread. Lieb and Robinson showed that for a local Hamiltonian, correlations can spread at most linearly and display a light-cone causality structure.75 For instance, for tight- binding spinless fermions, correlations spread with a speed proportional to their maximum group velocity, v ¼ 4J.57 In Fig. 4 we compare ED, numerical trotterization and experimental results for the connected spin correlator defined in Eq. (6), for hj ¼ U ¼ 0. We measure correlations between the first and the jth spin after a quench from a charge density wave initial state. The ED results show a clear ballistic spreading of correlations, which is also qualitatively reproduced by the numerical trotterization and the IBM data. As with all previous results, the agreement between the numerical and IBM results is best at short times, but the IBM data are able to capture the point where the correlations reach the system size. Furthermore, for this free model, there are only significant correlations along the light- cone and not within it, which is also approximately captured by the experimental data. There does, however, seem to be a slightly faster light-cone velocity, which is most evident in the shift of the position of the peak on site 6. This indicates that there is an effective renormalization of the Hamiltonian parameters, particu- larly J, due to the errors in the machine.

Quantum fisher information Finally, we consider the quantum Fisher information defined in Eq. (7) starting from both the Néel and domain wall initial states, shown in Fig. 5a, b, respectively. In this section, we will consider the model of (case (i)), for which the quantum Fisher information Fig. 5 The quantum Fisher information. As computed by ED, numerical trotterization and using the IBM quantum device for h ¼ has two important relations to entanglement, which we outline j 0 and U ¼ 0 and a symmetric trotterization. Data are compared with below. Note that the quantum Fisher information has a more the bipartite von Neumann entanglement entropy S with an equal fi fi vN general de nition for mixed states, which reduces to our de nition left/right partition, scaled by aNÀ1 with a ¼ 32=5, see main text. a for pure states. We do not consider the more general definition Quench from the Néel initial state. b Quench from the domain wall since we are simulating unitary evolution from a pure quantum initial state. Data were obtained on 12 March 2019.

Published in partnership with The University of New South Wales npj Quantum Information (2019) 106 A. Smith et al. 6

magnetization, then FQ ¼ 0, since our models conserve the total magnetization. Let us now consider the IBM results for the QFI, starting with a quench from a Néel initial state shown in Fig. 5a. We first note that the numerical results for the QFI (black) closely follow the bipartite von Neumann entanglement entropy (blue). The results from the IBM machine are also able to reproduce this behaviour quite accurately, characterized by the linear growth with a maximum just after Jt ¼ 1 due finite size effects. The fact that we measure FQ=N>1 also implies entanglement in the state on the IBM quantum computer. In Fig. 5b, we consider a quench from a domain wall. In this case both the numerical and experimental simulations have the same qualitative behaviour but are further off in absolute value, as compared with Fig. 5a. The QFI computed on the IBM machine once again is able to reproduce the behaviour of the von Neummann entanglement entropy. The entanglement entropy is generally a difficult quantity to measure. It typically requires some form of state tomography,

which consists of a set of measurements in a number of different Fig. 6 Quantifying the accuracy of the device. a Values of MGHZ bases that grows exponentially with system size, rendering it defined in Eq. (9) computed on the IBM device for a GHZ state on impractical for large systems. Furthermore, even with low error three qubits. Values of MGHZ>2 cannot be explained by a classical rates, the resulting density matrix may be unphysical.45,81 The theory of local realism, see main text. b The percentage of measured quantum Fisher information may provide an alternative in certain states that are in the physical Hilbert space as a function of time circumstances because it can be significantly easier to compute – after a quenchqffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi from a domain wall. c Data for the computation of À1 for the definition that we consider we only need to measure in a the quantity U^ ðtÞU^ðtÞ, as performed on the IBM device, after a single basis. quench from a Néel state. Data were obtained for N ¼ 6 across four consecutive days in 2019. Dashed lines indicate the average value Quantifying the accuracy of the quantum computer for a randomly selected state. While in the previous sections we showed that the current IBM device can qualitatively reproduce physical behaviour, it is also the accuracy of the implementation of the unitary U^ðtÞ. If the important to develop practical quantitative measures of their implementation is non-unitary then we should expect decay with accuracy. These measures should allow us to track the evolution of an increasing number of Trotter steps. We should also expect the quantum computers as they are developed and improved, as decay of this quantity if there are only unitary errors since this well as potentially providing further insight into the various quantity takes the form of a Loschmidt echo, which measures the sources of error that are present. sensitivity of the system to perturbations. It does not rely on any Going beyond the reported gate errors, one of the simplest ^ things to measure is the violation of the Mermin inequality,82 special properties of UðtÞ, such as the presence and knowledge of conserved quantities. It therefore provides an unbiased measure ^^^ ^^^ ^^^ ^^^ ; MGHZ ¼ XYY þ YXY þ YYX À XXX  2 (9) of the quality of the implementation of U^ðtÞ and of the quantum where X^; Y^ are the x and y Pauli-operators, and we omit the device. consecutive site labels on the operators. This inequality should We show the computation of the identity performed on the IBM hold for a classical theory with local realism. If we consider the machine across four consecutive days in Fig. 6c. In an ideal machine this quantity should be identically equal to 1 for all times. GHZ state jiψ ¼ p1ffiffi ðji """ ÀjiÞ ### , then M ¼ 4 and this 2 GHZ However, with each additional Trotter step—corresponding to the bound is maximally violated and can be used to demonstrate observed plateaux—the accuracy drops significantly. We also note the "quantumness" of the machine. In Fig. 6a we show the values fi that the behaviour observed in Fig. 6b, c are very similar, and both computed across 4 consecutive days for the rst three qubits used reflect the accuracy of the simulations in the previous sections. for the N ¼ 6 simulations. This data shows that we are consistently able to violate the Mermin inequality. As can be seen in the methods, the fidelities of individual gates DISCUSSION fl do not necessarily re ect the accuracy of a simulation across many Probably the most striking feature of our results from the IBM qubits. It may, therefore, make sense to consider more practical machines is the low quantitative accuracy when compared with measures of quality that more directly relate to the simulations we exact numerics. Considering the limited system sizes and time are performing. We use the physical conservation laws of the scales that we can reach; it highlights the current limitations of evolution to improve the accuracy of our simulations by throwing these quantum devices. Most importantly, this shows that whilst away measurements of unphysical states. The number of the number of qubits is now reaching limits beyond the measurements that are kept/thrown away can also be taken as capabilities of classical computers, the error rates and/or the a quantitative measure of the effective accuracy of the machine fi since for a perfect quantum computer we should find that all isolation of these quantum computers is not yet suf cient for measured states are in the physical Hilbert. In Fig. 6b, we show the useful computations, at least for accurately simulating quantum percentage of measured states that are physical for 4 consecutive dynamics. Due to the large array of possible error sources, pinning fi days, showing the variation in the effective quality of the device. down the most damaging for our simulations is a dif cult task, and is an import practical area for future research. As an unbiased measure of the quality of ourq simulationffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi we Despite this unfortunate conclusion, we are still able to access a ^ ^À1 ^ suggest to compute the identity in the form I ¼ U ðtÞUðtÞ.By range of qualitative physical behaviours demonstrating non-trivial implementing a circuit to perform the forward and backward time simulations of quantum dynamics. We were able to compute a evolution, the probability of returning to the initial state measures range of expectation values and two-point correlators, and

npj Quantum Information (2019) 106 Published in partnership with The University of New South Wales A. Smith et al. 7 observe behaviour associated with localization, many-body First, we discretize time, that is, we split the time evolution operator, ^ interactions, and the ballistic spreading of quantum correlations. U^ðtÞ¼eÀiHt, into a sequence of discrete operators, i.e., U^ðtÞ¼ ^ ^ We also observed the compensation of different energy costs due UðΔtÞÁÁÁUðΔtÞ with fixed Δt. Each application of the discrete operator ^ Δ to on-site potentials and neighbouring site interactions and Uð tÞ is called a Trotter step. This is illustrated in Fig. 1a where we apply an increasing number of Trotter steps to reach later times. witnessed the generation of entanglement due to unitary In our simulations we fix Δt to fix the accuracy of our approximation. evolution through the QFI. However, since we can only implement up to 5 Trotter steps, we add The goal of using quantum computers for dynamical simula- additional data points by varying Δt in the final Trotter step. More explictly, tions is to be able to access systems intractable using classical consider Trotter steps M and M þ 1, we can add additional data points by algorithms. The limitations of the current devices that we have using the evolution operator observed in our results demonstrate the need for improved ^ eÀiHt  U^ðΔtÞMU^ðδtÞ; (10) quality of the machines and not simply adding more qubits. In this type of simulation, the number of gates, and thus the real where δt ¼ Δt=, where r is the number of data points we want between execution time of the quantum circuits, grows linearly with the t ¼ MΔt and t ¼ðM þ 1ÞΔt. Since the accuracy of the trotter decomposi- tion UðδtÞ is better than that of UðΔtÞ (see below), these extra data points system size and with the number of Trotter steps. This means that th th we can estimate that we would need at least an order of will have errors intermediate between that of the M and ðM þ 1Þ steps. fi Second, we perform a Trotter decomposition of (trotterize) the unitary magnitude improvement in a combination of the gate delities , that is, we approximately decompose the operator U^ðΔtÞ into a and/or T1/T2 times to get close to achieving this goal. sequence of unitaries that act on at most two neighbouring qubits. In the One of the biggest challenges facing the field of quantum following we use either a basic or symmetric Trotter decomposition, shown computation is how to deal with errors. Although this is primarily in Fig. 1b, c, respectively. For m Trotter steps of length Δt, the error of the an engineering issue to increase the quality, isolation and control symmetric decomposition is of order OðmðΔtÞ3Þ, compared with 2 of the devices, there is also the theoretical contribution of error OðmðΔtÞ Þ for the basic decomposition. Note, however, that due to the correction methods.1,83,84 A particularly promising avenue for error symmetric structure, when we apply several Trotter steps we can combine several layers of gates. This means that we only need an extra two layers of correction is to use codes.85,86 One big advantage of these fi gates compared with the basic decomposition regardless of the number of methods is the moderately low delities required for them to work Trotter steps. effectively. As the size and quality of the quantum computers Third, we must efficiently decompose these two qubit operators into the increases, it is hoped that these error correction schemes will gates that can be directly implemented on the quantum device, which are allow us to rapidly increase their scale, and with it their utility. In the CNOT gate and arbitrary single qubit unitaries. An efficient decomposi- 92 the meantime, there may also be more room for practical error tion is found in ref. , which we summarise below. The result is that if U ≠ 0 ^ ^ fi fi mitigation schemes, such as the one that we have used, to get the then B and C (de ned in the gure caption) can be implemented using three CNOTs and with U 0 this can be reduced to only two CNOTs. most out of NISQ devices. ¼ While we have considered a range of correlation functions and physical mechanisms, there is still much that can be learnt about Trotter Decomposition In this paper, we use a Trotter decomposition (commonly known as a the current quantum computers and how well they can simulate ^ ^ quantum dynamics for condensed matter systems. In particular, trotterization) of the unitary time evolution operator UðtÞ¼eÀiHt. That is, there are physical mechanisms beyond those that we have we want to approximate these operators by a sequence of more easily implemented operators, namely those that act on at most two qubits. considered here. For instance, models with gauge coupling to ^ ^ ^ 7,39,40,53 As a starting point, consider a Hamiltonian of the form H ¼ A þ B, where dynamical gauge fields, and the physics of confine- ^; ^ ≠ 87,88 ½A BŠ 0. Then, since these operators do not commute in general, we have ment. In these settings there is also hope that interesting that physics can be extracted from the short-time dynamics and thus ÀiHt^ ÀiAt^ ÀiBt^ 2 may be suited to the current machines. The combination of e ¼ e e þOðt Þ; (11) disorder and interactions, resulting in the many-body localized which can be naturally extended to Hamiltonians that are sums of more , is also currently a particularly active area of than two terms. To use this fact for trotterized evolution we can use the research.32,33,64,65 The investigation of the transition between two steps outlined in the main text. We will now go through the details of MBL and ergodic dynamics may also benefit in the future from these steps in more detail, for the Hamiltonian Eq. (3): quantum computation. It is notoriously difficult to study XNÀ1XNÀ1 XN ^ σ^x σ^x σ^y σ^y σ^zσ^z σ^z; numerically due to the requirement of large systems and/or H ¼ÀJ j jþ1 þ j jþ1 þ U j jþ1 þ hj j (12) long-time simulations.89–91 j¼1 j¼1 j¼1 In conclusion, digital quantum simulation is still in its infancy which we rewrite here for convenience. First, we discretize time and split the evolution operator U^ðtÞ into a and we have shown that it requires an order of magnitude ^ improvement in fidelity and until it will realistically product of discrete evolution operators UðΔtÞ, i.e.,  outperform classical computers, at least applied to dynamical ^ ^ M eÀiHt eÀiHΔt ; (13) problems of interest in condensed matter physics. However, while ¼ it is hard to predict the pace of technological progress, our results where Δt ¼ t=M and M is the number of "Trotter steps". Since the will serve as a useful benchmark for improvements in the Hamiltonian commutes with itself, Eq. (13) is exact. To perform time foreseeable future; and in the long run they will provide a evolution, we will typically fix Δt and increase the number of Trotter steps snapshot of capabilities at the beginning of a new quantum M to reach later times. simulation era. The second step is to approximate each of these discrete time operators in a similar manner to Eq. (11). For notational simplicity, let us first define the operators σ^z Δ σ^z σ^z σ^x σ^x σ^y σ^y Δ METHODS ^ Àihj j t ^ ÀiðU j jþ1 ÀJð j jþ1 þ j jþ1ÞÞ t Aj ¼ e ; Bj ¼ e : (14) Implementation: trotterized evolution Using these operators, we can make the approximation For our global quench protocol, we first need to prepare the initial state of ! ! ! Y Y Y our system. Since the IBM quantum computers are initialized in the state ^ ÀiHΔt ^ ^ ^ Δ 2 ; ji"" ÁÁÁ by default, both of our choices of initial states are tensor product e ¼ Aj Bj Bj þ Oðð tÞ Þ (15) states in the z-basis and thus can be created by applications of the Pauli X j j even j odd gate. Next, we need to implement the time evolution, which proceeds by which corresponds to the schematic quantum circuit show in Fig. 1b in the three main steps that we will briefly outline here. main text, and which we will refer to as the basic trotterization. If we wish

Published in partnership with The University of New South Wales npj Quantum Information (2019) 106 A. Smith et al. 8 to evolve to time t ¼ MΔt, then we find that the error is OðΔtÞ, which is bit-flip errors can become significant and the error mitigation will be controlled by the size of the Trotter step Δt. We can, therefore, improve the ineffective. accuracy of the approximation by decreasing Δt, however, this must be In Fig. 6b, we show the percentage of measurements that are within the balanced against the cost of needing more Trotter steps, as explained in physical Hilbert space, that is, the percentage of measurements that are kept. the main text. For the first data points, we are simply measuring the initial state, which has To improve the accuracy of our simulations, we can use better an average measurement fidelity per qubit of 95% leading to a value of approximations to the discrete evolution operators by way of higher- approximately ð95%Þ6  70%. At long times the number of retained states order Trotter decompositions.93 The leading error term in Eq. (11) is due to stabilises and approaches a value that corresponds to the percentage of the non-zero commutator ½A^; B^Š. By compensating for this error, we can states in the total Hilbert space that are physical – in other words, the increase the order of the leading error term. percentage probability that a randomly selected state is in the physical The only higher-order decomposition that we will consider is the subspace. Once this number of discarded measurements is reached, the symmetrized Trotter step. Let us again start with the simple case of errors are very large and the error mitigation is no longer effective. H^ ¼ A^ þ B^. The symmetric decomposition would then be Bit-flips are not the only type of errors that could occur. As an example, there are also phase errors, which do not necessarily change the net ÀiHt^ Ài tA^ ÀitB^ ÀitA^ 3 e ¼ e 2 e e 2 þOðt Þ: (16) magnetization. However, we note that the constrained data does typically The error in this decomposition is of higher-order due to the symmetry have improved accuracy, and so we use the restriction to the physical y Hilbert space for all our subsequent data. which ensures that UðÀtÞ¼UðtÞ ¼ UÀ1ðtÞ. This means that the even- order error terms vanish and the leading error is ðΔtÞ3. See ref. 93 for more details and for an iterative method for constructing higher-order Quantum Circuits decompositions. Here, we will go over some of the details necessary to implement the For the Hamiltonian Eq. (3) in question, let us again make some trotterized evolution operators on the IBM devices. We will only cover fi de nitions to simplify notation those elements of direct relevance to this paper and refer the reader to z z x x y y Δ 1 ^ Àih σ^z Δt ^ ÀiðUσ^ σ^ ÀJðσ^ σ^ þσ^ σ^ ÞÞ t ref. for an introduction to quantum circuits and quantum computation. A ¼ e j j 2 ; B ¼ e j jþ1 j jþ1 j jþ1 2 ; j j We will first introduce the quantum gates that can be implemented on the σ^z σ^z σ^x σ^x σ^y σ^y Δ (17) ^ ÀiðU j j 1ÀJð j j 1 þ ÞÞ t Cj ¼ e þ þ j jþ1 ; IBM quantum computers, and then decompose the two qubit unitary operations that appear in our trotterized evolution operator in terms of the then the symmetric Trotter decomposition is ! ! ! ! ! elementary one and two qubit gates. Y Y Y Y Y A quantum circuit consists of an array of quantum channels – which ÀiH^Δt ^ ^ ^ ^ ^ 3 e ¼ Aj Bj Cj Bj Aj þ OððΔtÞ Þ; represent the physical qubits—and a series of quantum gates that are j j even j odd j even j applied to them. These quantum gates are unitary operators that can be (18) applied to one or more of the qubits. The IBM quantum devices can implement the CNOT gate along with an arbitrary single qubit gate, which is shown schematically in Fig. 1c of the main text. parametrized by three phases. The cobination of these gates forms a universal set that is, any N qubit gate can be implemented using a Measurement combination of these gates, and in principle an arbitrary quantum When making a measurement we will find the system in one of the many- computation can be performed. There is a collection of single particle gates that are useful for writing body states jiλ in this basis, e.g., ji"## Á Á Á or ji#"# Á Á Á . By performing multiple runs and measurements, we can approximate the probability of quantum circuits. We write down a list of the most frequently used gates 2 and how they are implemented on the IBM machines. Consider the measuring each of the many-body states, that is, we can extract jjαλ , α λ computational basis to be the tensor product of single qubit states in the where λ is the for the state ji. These probabilities ; can then be used to construct the observables. To be more concrete, z-basis, i.e., f"jijig# . All matrix forms of the gates are given in this basis σ^z and all measurements are made in this z-basis. It is important to note that consider the expectation value of the operator j on site j. This is computed as follows, gate multiplication reads left to right, whereas matrix multiplication is right X X to left, i.e. . z 2 2 ψðtÞ σ^ ψðtÞ ¼ jαλj À jαλ0 j ; hjj ji (19) Firstly, we have the Pauli matrices, which in the standard quantum λ: λ0: j¼" j¼# information notation are where the sums are over all states with the jth spin up or down respectively, 2 and jαλj is the proportion of measurements for which we found the state λ. In all the following experiments we will use 8192 measurements per data point, which means that the statistical error for these local correlators is ð20Þ  0:01, which is too small to be included in our figures.

Error mitigation: physical Hilbert space Secondly, we have the Hadamard and the S and T phase gates, As we noted in the previous section, due to the presence of conserved quantities in the Hamiltonian evolution, the Hilbert space of states splits into those that are physically allowed by the evolution and those that are not. In particular,P the models we consider have conserved net ð21Þ σ^z magnetization Sz ¼ j j . This fact turns out to be advantageous, and allows us to perform rudimentary error mitigation – atermthatweuse to distinguish it from scalable error correction methods, since in this case we deal only with the lowest order errors. The idea is to simply And finally, we have the X; Y and Z rotation gates, disregard any measurements for states outside of the physical Hilbert space. Let use present a simplified argument for why this might be a goodthingtodo,wherewewillfirst assume that only bit-flips can occur. A single bit-flip in the course of the evolution will take us outside of ð22Þ the Hilbert space, and let us denote the probability of this happening as Δ. However, the lowest order of errors within the physical Hilbert space is Δ2, i.e., we need at least two bit-flip errors to get back to the same total magnetization. Hence, by discarding counts outside of the physical Hilbert space we reduce the leading order error to Δ2. If the probability, Δ,issufficiently small, then we can rely on these perturbative which correspond to rotations of the qubit around the x; y and z axes arguments. However, if the error rate is large enough, then multiple respectively. All single qubit gates can be written as a product of these

npj Quantum Information (2019) 106 Published in partnership with The University of New South Wales A. Smith et al. 9 rotation gates, up to a phase. This phase is global and is not measurable unitary operators. We, therefore, want to find a way to write a general two and can therefore be omitted. In the IBM machine, all single qubit gates qubit unitary in terms of the CNOT gate and single qubit gates that can be can be directly implemented using applied directly on the IBM devices. The optimal decomposition is found in ref. 92. We briefly review the main results of this paper that are of direct relevance to us. ð23Þ The optimal decomposition uses the fact that a general matrix in Uð4Þ 94 can be decomposed as U ¼ðA1 A2ÞÁNðα; β; γÞÁðA3 A4Þ, where Nðα; β; γÞ¼exp½ŠiðÞασx σx þ βσy σy þ γσz σz : (28) For slightly less general gates the IBM computer implements either As a quantum circuit, this can be written as U2ðϕ; λÞ¼U3ð0; ϕ; λÞ or U1ðλÞ¼U3ð0; 0; λÞ, which use fewer physical operations and shorter real time. Before running the circuits, we can combine all strings of single qubit gates into a single one of these three single qubit gates, using the functions available in qiskit.42 The most important two qubit gate for our purposes is the CNOT gate ð29Þ

This operator Nðα; β; γÞ is of direct interest to us for quantum dynamics 24 ð Þ since it is already of the form required for our Trotter decomposition. This gate can be constructed using a minimum of three CNOTs. The optimal decomposition for Nðα; β; γÞ is given by the quantum circuit

This gate flips the second qubit depending on the state of the first. This gate allows the two qubits to become entangled, and combined with general single qubit gates forms a set capable of universal quantum ð30Þ computation, see ref. 1 for a proof. The CNOT is the only multi-qubit gate currently that can be directly implemented on the IBM quantum machines. Also of interest to us is the reversed CNOT gate θ π γ; ϕ α π λ π β 92 where ¼ 2 À 2 ¼ 2 À 2, and ¼ 2 À 2 . Note that in ref. they use a different sign convention for the rotation gates. Despite the apparent asymmetry of the decomposition, this sequence of gates is symmetric with ð25Þ respect to swapping the two qubits. For certain cases of our Hamiltonian, namely when U ¼ 0, the Nðα; β; γÞ gate is more general than we need. By restricting ourselves to Nðα; 0; γÞ (plus single qubit basis changes) we can reduce the number of CNOTs where we differentiate the reversed CNOT from the CNOT because of the required to two. This gives us access to matrices of the form directionality of the IBM machines, i.e., only CNOTs in a given direction can Nðα; 0; γÞ¼exp½iðασx σx þ γσz σzފ: (31) be implemented along the qubit connections. If a CNOT is applied 92,94 (programmatically) in the wrong directly, the above transformation using We can proceed with the help of the so-called Magic Matrix Hadamard gates will be applied by qiskit implicitly. Since the single qubit gate fidelities are an order of magnitude better than that of the CNOTs this transformation is not costly, and these additional gates will often be ð32Þ incorporated into other strings of single qubit gates.

z z Change of basis Using this matrix we find MyNðα; 0; γÞM ¼ eiγσ eiασ , which in turn γσz ασz When we make a measurement on the quantum machine it is with respect implies that Nðα; 0; γÞ¼Mðei ei ÞMy, since M is unitary. As a to a given basis, which we take to be the z-basis. However, we may choose quantum circuit this can be written as to change the basis for several reasons such as: to measure different operators, to prepare an initial state, or to apply a gate which is more efficiently implemented in a different basis. We will consider only local changes of basis, i.e. a change of basis for the ð33Þ individual qubits. While a general local change of basis can be implemented using the general single qubit gates above, the most frequently used will be those that change from the Z basis to the X or Y basis. This gate can be further simplified by noting that a product of single qubit To change to the X basis, we use the Hadamard gate, H. This implements gates is another single qubit gate. Furthermore, ½S; Rzðθފ ¼ 0, and the transformation HRzðθÞH ¼ Rx ðθÞ which gives Z ! X; X ! Z; Y !ÀY: (26) Note that this mapping is its own inverse, which is a result of the ð34Þ Hadamard gate being both unitary and Hermitian. To change to the Y basis, we use a combination of the Hadamard and S gates. We can implement the basis change with the combination HSH, where we have arbitrarily flipped the circuit with respect to the two qubits. which maps Z ! Y; Y ! Z; X !ÀX: (27) Choosing the best qubits Note that this combination of gates is not its own inverse but instead is In all our numerics we used between 6 and 10 of the qubits of the IBM HSyH. machines, which is only a subset of the available 20 qubits. Hence, we wish to findthebestsuchsubsetsothatwegetthemostaccurate results from the machine. We do this by using a simple iterative Two qubit gates algorithm, which we will outline here. We note that "best" is a matter of The Trotter decomposition allows us to write the general unitary time definition involving the balance of many different parameters. We define evolution operator approximately as a product of single and two qubit best to mean the set of qubits that has the lowest average CNOT errors.

Published in partnership with The University of New South Wales npj Quantum Information (2019) 106 A. Smith et al. 10 We do, however, impose restrictions on the allowed measurement error and T2 times. The algorithm consists of the following steps: 1. Restrict the set of allowed qubits to N~ by discarding any for which the measurement error exceeds a measurement threshold or has a T2 time lower than a given threshold. 2. List all CNOTs that connect the allowed qubits. 3. Set value M ¼ N À 1, where N is the number of qubits. 4. Construct a restricted list of M CNOTs that have the lowest errors. 5. From this restricted list of CNOTs, iteratively, construct all chains that connect N qubits. 6. If no such chain is found and M

Data across different days One practical issue with using the current IBM machines, is the fact that they are recalibrated on approximately a daily basis. Due to the large errors inherent in the devices, this can have a large effect on the results of a simulation and even mean that a different set of qubits is the "best" on different days. This has the unfortunate consequence that the data obtained from the machine will depend on the day on which it was computed. In this section we show a comparison of the results across three days, demonstrat- ing this variability. Thankfully, we also show that the conclusions that we have made in the previous section remain valid independent of the day on which we performed the computations. First, in Fig. 7a we show the constrained IBM data for the local density of the end spin—corresponding to that shown in Fig. 2b—obtained across fl the three days. This demonstrates the large uctuations in our simulations Fig. 7 Comparing data from different days. a Simulation of the that are due to the different calibrations of the device. For comparison, we magnetization on the end spin compared across three consecutive show the results from two runs from the same day separated by days. b Comparison of two separate runs for the local magnetization approximately 10 h in Fig. 7a. Unlike in Fig. 7a the IBM device was not on the end site after a quench from a domain wall with N ¼ 6 and recalibrated between runs. The difference between the runs (blue squares) Hamiltonian (case (i)). The data sets were obtained on 6 May 2019 is of the order of 5%, which is comparable to the measurement and with approximately 10 h between runs. The blue squares show the statistical errors. difference between runs. In both figures we impose the conserva- Fortunately, the day-to-day fluctuations do not affect the qualitative tion laws, see main text. behaviour that is simulated by the machine. For example, in Fig. 8 we compare the data for the spin correlator, corresponding to Fig. 4cofthe main text. While some of the behaviour is reproduced in all three subfigures—such as the linear light-cone spreading at short-times—the quality of the simulations in Fig. 8a is quite clearly better. For instance, we see a much clearer linear spread of the correlations, and it is the only subfigure 8a where the correlations convincingly reach the boundary of the system. We also consistently see the correct qualitative behaviour for the spread of particles, Nhalf, in Fig. 9. Here, we show the data corresponding to Fig. 3a. While the behaviour differs quantitatively across the days, the qualitative physical behaviour is clear in all plots. This verifies the robustness of the results that we presented above. Finally, in Table 1, we show the different qubits that were chosen on three consecutive days. We also show the minimum, average and maximum values for the readout errors, CNOT errors and T2 decoherence times for the 6-qubit chain. These values were computed using the calibration data provided by IBM. This table shows that across the three day period, the optimal set of qubits can change and the corresponding values can fluctuate significantly. While there is clear variation across the three subsequent days that we studied, we point out that the parameters provided by IBM, shown in Table 1, are not necessarily good indicators of the quality of the simulation. For instance, the numbers in the table might suggest that on 12 March 2019 the accuracy of the quantum computer was the worst of the three, yet we find the opposite when considering the data for our simulations, see e.g., Fig. 8 Data computed across three consecutive days for the spin Fig. 8. While it is true that the results obtained from the other IBM devices correlator. Corresponding to Fig. 4 of the main text. The subfigures are generally worse, which also reflects a significant difference in gate are labelled by the dates on which the simulation was run.

npj Quantum Information (2019) 106 Published in partnership with The University of New South Wales A. Smith et al. 11

Fig. 9 Data computed across three consecutive days. Corresponding to Fig. 3a. The date for each subfigure is shown at the top.

3. Kandala, A. et al. Hardware-efficient variational quantum eigensolver for small Table 1. Values for IBM machine for the three consecutive days of molecules and quantum magnets. Nature 549, 242–246 (2017). simulations. 4. Biamonte, J. et al. Quantum . Nature 549, 195–202 (2017). 5. Preskill, J. Quantum computing in the NISQ era and beyond. Quantum 2,79 12 Mar 2019 13 Mar 2019 14 Mar 2019 (2018). 6. Cirac, J. I. & Zoller, P. Quantum computations with cold trapped ions. Phys. Rev. qubits: 6 [3 2 1 0 5 6] [3 4 9 14 19 18] [3 4 9 14 19 18] Lett. 74, 4091–4094 (1995). 8 [50123498][65012349][65012349] 7. Martinez, E. A. et al. Real-time dynamics of lattice gauge theories with a few-qubit quantum computer. Nature 534, 516–519 (2016). 10 [6501234 [6501234 [6501234 8. Nam, Y. et al. A Ground-state energy estimation of the water molecule on a 9 14 19] 9 14 19] 9 14 13] trapped ion quantum computer. https://arxiv.org/abs/1902.10171v2 (2019) 9. Wright, K et al. Benchmarking an 11-qubit quantum computer. https://arxiv.org/ readout min 0.0370 0.0290 0.0220 abs/1903.08181v1 (2019). error: avg 0.0442 0.0352 0.0357 10. Bruzewicz, C. D., Chiaverini, J., McConnell, R. & Sage, J. M. Trapped-ion quantum max 0.0670 0.0420 0.0610 computing: progress and challenges. http://arxiv.org/abs/1904.04178 (2019). 11. Figgatt, C. et al. Parallel entangling operations on a universal ion trap quantum CNOT min 0.0127 0.0136 0.0141 computer. http://arxiv.org/abs/1810.11948 (2018). 12. Houck, A. A., Türeci, H. E. & Koch, J. On-chip quantum simulation with super- error: avg 0.0215 0.0176 0.0192 conducting circuits. Nat. Phys. 8, 292–299 (2012). max 0.0288 0.0225 0.0247 13. Barends, R. et al. Superconducting quantum circuits at the surface code threshold for fault tolerance. Nature 508, 500–503 (2014). T2 times (μs): min 58.03 61.74 85.37 14. Blais, A. et al. Quantum-information processing with circuit quantum elec- avg 89.62 94.77 98.38 trodynamics. Phys.Rev.A75, https://doi.org/10.1103/PhysRevA.75.032329 (2007) max 125.01 113.54 117.71 15. Zhu, G., Subasi, Y., Whitfield, D. & Hafezi, M. Hardware-efficient fermionic simu- The first rows show the optimal qubits as selected by the algorithm in lation with a cavity-QED system. (2017). https://doi.org/10.1038/s41534-018- Methods. The remaining rows correspond to the readout errors, CNOT 0065-3. – errors, and T2 times for the 6-qubit chain. Data for the 8 or 10 qubit chains, 16. Aspuru-Guzik, A. & Walther, P. Photonic quantum simulators. Nat. Phys 8, 285 291 or for all 20 qubits, are not shown (2012). 17. Sun, K. et al. Mapping and measuring large-scale photonic correlation with single-photon imaging. http://arxiv.org/abs/1806.09569 (2018). 18. Tambasco, J.-L. et al. Quantum interference of topological states of light. Sci. Adv. errors etc., it seems that the small set of numbers in Table 1 is not able to 4, eaat3187 (2018). fully characterize the machine. 19. Kane, B. E. Nature, Tech. Rep. (1998). 20. West, A. et al. Gate-based single-shot readout of spins in silicon. Nat. Nanotechnol 14, 437–441 (2019). fi DATA AVAILABILITY 21. Yang, C. H. et al. Silicon qubit delities approaching incoherent noise limits via pulse engineering. Nat. 2, 151–158 (2019). fi Source data that support the ndings of this study have been deposited in a GitHub 22. Nayak, C., Simon, S. H., Stern, A., Freedman, M. & Sarma, S. D. Non-Abelian repository: https://github.com/as2457/QC-paper-data. anyons and topological quantum computation. Rev. Mod. Phys. 80,1083–1159 (2008). 23. Sarma, S. D., Freedman, M. & Nayak, C. Topological quantum computation Physics CODE AVAILABILITY Today. Quantum Comput. A Gentle Introd 593, 32 (2006). The code used to generate the numerical results presented in this paper can be made 24. Lahtinen, V. & Pachos, J. A short introduction to topological quantum compu- available upon reasonable request. tation. SciPost Phys 3, 021 (2017). 25. Nakamura, Y., Pashkin, Y. A. & Tsai, J. S. Coherent control of macroscopic quantum – Received: 14 June 2019; Accepted: 1 October 2019; states in a single-Cooper-pair box. Nature 398, 786 788 (1999). 26. Wendin, G. Quantum information processing with superconducting circuits: a review. Reports Prog. Phys. 80, 106001 (2017). 27. Krantz, P. et al. A Quantum engineer’s guide to superconducting qubits. http:// arxiv.org/abs/1904.06560 (2019). REFERENCES 28. Boixo, S. et al. Characterizing quantum supremacy in near-term devices. Nat. Phys 1. Nielsen, M. A. & Chuang, I. L. Cambridge Univ. Press. (Cambridge University Press, 14, 595–600 (2018). Cambridge, 2010). 29. Feynman, R. P. Simulating physics with computers. Int. J. Theor. Phys. 21, 467–488 2. Shor, P. W. Polynomial-Time Algorithms for Prime Factorization and Discrete (1982). Logarithms on a Quantum Computer. https://doi.org/10.1137/S00975397952 30. Bloch, I., Dalibard, J. & Zwerger, W. Many-body physics with ultracold . Rev. 93172 (1995). Mod. Phys. 80, 885–964 (2008).

Published in partnership with The University of New South Wales npj Quantum Information (2019) 106 A. Smith et al. 12 31. Bakr, W. S., Gillen, J. I., Peng, A., Fölling, S. & Greiner, M. A quantum micro- 67. Heyl, M., Hauke, P. & Zoller, P. Quantum localization bounds Trotter errors in scope for detecting single atoms in a Hubbard-regime . Nature 462, digital quantum simulation. Sci. Adva. 5, eaau8342 (2019). 74–77 (2009). 68. Hyllus, P. et al. Fisher information and multiparticle entanglement Phys. Rev. A. 32. Schreiber, M. et al. Observation of many-body localization of interacting fermions https://journals.aps.org/pra/abstract/10.1103/PhysRevA.85.022321 (2012). in a quasirandom optical lattice. Science (80-.) 349, 842–845 (2015). 69. Tóth, G. Multipartite entanglement and high-precision metrology. Phys. Rev. A. 33. Choi, J.-Y. et al. Exploring the many-body localization transition in two dimen- https://journals.aps.org/pra/abstract/10.1103/PhysRevA.85.022322 (2012). sions. Science (80-.) 352, 1547–1552 (2016). 70. Hauke, P., Heyl, M., Tagliacozzo, L. & Zoller, P. Measuring multipartite entangle- 34. Bordia, P. et al. Probing slow relaxation and many-body localization in two- ment through dynamic susceptibilities. Nat. Phys 12, 778–782 (2016). dimensional quasiperiodic systems. Phys. Rev. X 7, 041047 (2017). 71. Klich, I. & Levitov, L. as an entanglement meter. Phys. Rev. Lett. 35. Mitra, D. et al. Quantum gas microscopy of an attractive Fermi-Hubbard system. 102, 100502 (2009). Nat. Phys 14, 173–177 (2017). 72. Song, H. F., Flindt, C., Rachel, S., Klich, I. & Le Hur, K. Entanglement entropy from 36. Cooper, N. R., Dalibard, J. & Spielman, I. B. Topological bands for ultracold atoms. charge statistics: exact relations for noninteracting many-body systems. Phys. Rev. http://arxiv.org/abs/1803.00249 (2018). B - Condens. Matter Mater. Phys 83, 161408 (2011). 37. Garttner, M. et al. Measuring out-of-time-order correlations and multiple quan- 73. Song, H. F. et al. Bipartite fluctuations as a probe of many-body entanglement. tum spectra in a trapped-ion quantum magnet. Nat. Phys 13, 781–786 (2017). Phys. Rev. B 85, 035409 (2012). 38. Zhang, J. et al. Observation of a discrete time . Nature 543, 217–220 (2017). 74. Kramer, B. & MacKinnon, A. Localization: theory and experiment. Reports Prog. 39. Wiese, U.-J. Ultracold quantum gases and lattice systems: quantum simulation of Phys. 56, 1469–1564 (1993). lattice gauge theories. Ann. Phys 525, 777–796 (2013). 75. Lieb, E. H. & Robinson, D. W. The finite group velocity of quantum spin systems. 40. Zohar, E., Cirac, J. I. & Reznik, B. Quantum simulations of lattice gauge theories Commun. Math. Phys. 28, 251–257 (1972). using ultracold atoms in optical lattices. Reports Prog. Phys. 79, 014401 (2016). 76. Smith, J. et al. Many-body localization in a quantum simulator with program- 41. IBM Q. https://www.research.ibm.com/ibm-q/. mable random disorder. Nat. Phys 12, 907–911 (2016). 42. Aleksandrowicz, G. et al. Qiskit: An open-source framework for quantum com- 77. Pezzé, L. & Smerzi, A. Entanglement, Non-linear Dynamics, and the Heisenberg puting. https://doi.org/10.5281/ZENODO.2562111 (2019). Limit. https://arxiv.org/abs/0711.4840v3 (2009). 43. O’Malley, P. J. J. et al. Scalable quantum simulation of molecular energies. Phys. 78. Helstrom, C. W. Quantum Detection and Estimation Theory (Academic Press Lim- Rev. X 6, 031007 (2016). ited, New York, 1976). 44. Wang, Y., Li, Y., Yin, Z.-Q. & Zeng, B. 16-qubit IBM universal quantum computer 79. Holevo, A. S. Probabilistic and Statistical Aspects of Quantum Theory (North-Hol- can be fully entangled. npj Quantum Inf. 4, 46 (2018). land, Amsterdam, 1982). 45. Choo, K., vonKeyserlingk, C. W., Regnault, N. & Neupert, T. Measurement of the 80. Giovannetti, V., Lloyd, S. & Maccone, L. Quantum-enhanced measurements: entanglement spectrum of a symmetry-protected topological state using the IBM beating the standard quantum limit. https://arxiv.org/pdf/quant-ph/0412078.pdf quantum computer. Phys. Rev. Lett. 121, 086808 (2018). (2004). 46. Bravo-Prieto, C., García-Martín, D. & Latorre, J. Quantum singular value decom- 81. Smolin, J. A., Gambetta, J. M. & Smith, G. Efficient method for computing the poser. http://arxiv.org/abs/1905.01353 (2019). maximum-likelihood from measurements with additive gaussian 47. Doronin, S. I, Fel’dman, E. B. & Zenchuk, A. I. Solving systems of linear algebraic noise. Phys. Rev. Lett. 108, 070502 (2012). equations via unitary transformations on quantum processor of IBM Quantum 82. Mermin, N. D. What’s wrong with these elements of reality? Phys. Today 43,9–11 Experience. https://arxiv.org/abs/1905.07138v1 (2019). (1990). 48. Amico, M., Saleem, Z. H. & Kumph, M. An Experimental Study of Shor’s Factoring 83. Preskill, J. Chapter 7 7.1 A Quantum Error-Correcting Algorithm on IBM Q. https://arxiv.org/abs/1903.00768v3 (2019). Code. Tech. Rep. 49. Zhukov, A. A., Remizov, S. V., Pogosov, W. V. & Lozovik, Y. E. Algorithmic simu- 84. Devitt, S. J., Munro, W. J. & Nemoto, K. Quantum error correction for beginners. lation of far-from-equilibrium dynamics using quantum computer. Quantum Inf. Reports Prog. Phys. 76, 076001 (2013). Process. 17, 223 (2018). 85. Fowler, A. G., Mariantoni, M., Martinis, J. M. & Cleland, A. N. Surface codes: towards 50. Cervera-Lierta, A. Exact Ising model simulation on a quantum computer. Quan- practical large-scale quantum computation. Phys. Rev. A 86, 032324 (2012). tum 2, 114 (2018). 86. Bravyi, S., Englbrecht, M., Koenig, R. & Peard, N. Correcting coherent errors with 51. Lamm, H. & Lawrence, S. Simulation of nonequilibrium dynamics on a quantum surface codes. https://doi.org/10.1038/s41534-018-0106-y (2017). computer. Phys. Rev. Lett. 121, 170501 (2018). 87. Kormos, M., Collura, M., Takács, G. & Calabrese, P. Real-time confinement following 52. Chiesa, A. et al. Quantum hardware simulating four-dimensional inelastic neutron a quantum quench to a non-integrable model. Nat. Phys. 13, 246–249 (2016). scattering. Nat. Phys 15, 455 (2019). 88. Liu, F. et al. Confined dynamics in long-range interacting quantum spin chains. 53. Klco, N. et al. Quantum-classical computation of dynamics http://arxiv.org/abs/1810.02365 (2018). using quantum computers. Phys. Rev. A 98, 032331 (2018). 89. Pal, A. & Huse, D. A. Many-body localization . Phys. Rev. B 82, 54. The Q# Programming Language. https://docs.microsoft.com/en-us/quantum/ 174411 (2010). language/?view=qsharp-preview. 90. Luitz, D. J. Laflorencie, N., & Alet, F. Many-body localization edge in the random- 55. Circq. https://github.com/quantumlib/Cirq. field Heisenberg chain. https://arxiv.org/abs/1411.0660v2 (2014). 56. PyQuil. https://github.com/rigetti/pyquil. 91. Herviou, L., Bera, S. & Bardarson, J. H. Multiscale entanglement clusters at the 57. Essler, F. H. L. & Fagotti, M. Quench dynamics and relaxation in isolated integrable many-body localization phase transition. http://arxiv.org/abs/1811.01925,35–37 quantum spin chains. Theory Exp. 2016, 064002 (2016). (2018). 58. Vasseur, R. & Moore, J. E. Nonequilibrium quantum dynamics and transport: from 92. Vatan, F. & Williams, C. Optimal quantum circuits for general two-qubit gates. integrability to many-body localization. J. Stat. Mech. Theory Exp. 2016, 064010 Phys. Rev. A 69, 032315 (2004). (2016). 93. Hatano, N. & Suzuki, M. Finding exponential product formulas of higher orders. in 59. Anderson, P. W. Absence of diffusion in certain random lattices. Phys. Rev. 109, Lect.Notes Phys 679,37–68 (2005). 1492–1505 (1958). 94. Kraus, B. & Cirac, J. I. Optimal creation of entanglement using a two-qubit gate. 60. Schulz, M., Hooley, C. A., Moessner, R. & Pollmann, F. Stark many-body localiza- Phys. Rev. A 63, 8 (2001). tion. http://arxiv.org/abs/1808.01250. arXiv, 1–6 (2018). 95. Nishio, S., Pan, Y., Satoh, T., Amano, H. & Van Meter, R. Extracting success from 61. van Nieuwenburg, E. P. L., Baum, Y. & Refael, G. From bloch oscillations to many IBM’s 20-qubit machines using error-aware compilation. https://arxiv.org/abs/ body localization in clean interacting systems. https://arxiv.org/pdf/1808.00471. 1903.10963v1 (2019). (2018). 96. Tamura, K. & Shikano, Y. Quantum random numbers generated by the cloud 62. Wannier, G. H. Dynamics of band in electric and magnetic fields. Rev. superconducting quantum computer. https://arxiv.org/abs/1906.04410 Mod. Phys. 34, 645 (1962). 97. Smith, A., Kim, M., Pollmann, F. & Knolle, J. IBM data. https://github.com/as2457/ 63. Vasiliev, A., Volkova, O., Zvereva, E. & Markina, M. Milestones of low-D quantum QC-paper-data (2019) magnetism. https://www.nature.com/articles/s41535-018-0090-7 (2018). 64. Nandkishore, R. & Huse, D. A. Many-Body Localization and Thermalization in Quantum Statistical . Ann. Rev. Condens. Matter Phys. 6,15–38 ACKNOWLEDGEMENTS (2015). We are grateful for discussions with Peter Haynes, Florian Mintert, Éamonn Murray, ć 65. Abanin, D. A. & Papi , Z. Recent progress in many-body localization. Ann. Phys Abolfazl Bayat, Johnnie Gray, Stefanos Kourtis, Valentin Leeb, and Markus Heyl. We 529, 1700169 (2017). acknowledge the Samsung Advanced Institute of Technology Global Research 66. Sieberer, L. M. et al. Digital quantum simulation, Trotter errors, and quantum Partnership. A.S. and F.P. were in part funded by the European Research Council (ERC) chaos of the kicked top. npj Quantum Information. npj Quantum Inf. 5, 78 (2019). under the European Union’s Horizon 2020 research and innovation programme

npj Quantum Information (2019) 106 Published in partnership with The University of New South Wales A. Smith et al. 13 (grant agreement No. 771537). All data presented is made available in a public Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims GitHub repository.97 in published maps and institutional affiliations.

AUTHOR CONTRIBUTIONS A.S. obtained the data and produced the figures. All authors discussed the results and This article is licensed under a Creative Commons contributed to the final paper. Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative COMPETING INTERESTS Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless The authors declare no competing interests. indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly ADDITIONAL INFORMATION from the copyright holder. To view a copy of this license, visit http://creativecommons. Correspondence and requests for materials should be addressed to A.S. org/licenses/by/4.0/.

Reprints and permission information is available at http://www.nature.com/ reprints © The Author(s) 2019

Published in partnership with The University of New South Wales npj Quantum Information (2019) 106