Exact Ising model simulation on a Quantum Computer

Alba Cervera-Lierta1, 2 1 Barcelona Supercomputing Center (BSC), Barcelona, Spain 2 Dept. Fı́sica Quàntica i Astrofı́sica, Universitat de Barcelona, Barcelona, Spain (Dated: July 20, 2018) We present an exact simulation of a one-dimensional transverse Ising spin chain with a quantum computer. We construct an efficient quantum circuit that diagonalizes the Ising Hamiltonian and allows to obtain all eigenstates of the model by just preparing the computational basis states. With an explicit example of that circuit for n = 4 spins, we compute the expected value of the ground state magnetization, the time evolution simulation and provide a method to also simulate thermal evolution. All circuits are run in IBM and Rigetti quantum devices to test and compare them qualitatively.arXiv:1807.07112v1 [quant-ph] 18 Jul 2018

However, the first suffer from the well-known sign prob- In recent years the quantum computing has dived fully lem and the second are only efficient for slightly entan- into the experimental realm. Control of quantum systems gled systems [12]. In the end, very strongly correlated has improved so much that quantum computing devices quantum systems, such as those displaying frustration, have become a near term reality. These experimental will need a quantum computer to be efficiently simulated advances rely on some criteria proposed in the 2000’s by [13]. There are some works that propose quantum algo- DiVicenzo [1]: scalable physical system to characterize rithms to construct arbitrary Slater determinants, both the qubits, simple fiducial qubit state initialization, long in one and two dimensions, to simulate the dynamics of coherence times (longer than the gate implementation the ground state of fermionic hamiltonians, in particu- times), universal set of quantum gates and qubit-specific lar the Hubbard model [14, 15]. Other proposals intro- measurement capability. Although there are some candi- duce the concept of compressed quantum computation, dates that can fulfill the first criterion, the field is still in i.e. simulation of n-spin chain using log n qubits [16]. an early stage of development of this technology, where This method has been tested in one of the IBM’s quan- the improvement of qubits control is crucial to accom- tum computers also simulating the magnetization of the plish the others. Ising model [17]: the main difference respect the work Private companies have also joined to the field. Since proposed in that paper is we have access to the whole 2016, IBM offers cloud based quantum computation plat- energy spectrum, which allows us to simulate time and form [2]. Any user can run quantum algorithms on their temperature evolution as well. two five qubits devices, their 16 qubits device, and their In this work, we implement a four-qubit experiment 20 qubits device which is available for hubs and partners. that could be interesting both as a proposal for testing It is not the only company that has launched this kind of and comparing devices quality and for its implications in service: Rigetti Computing also allows the use of its 19- condensed matter physics. We perform the exact simu- qubits device on the cloud [3]. Although both companies lation of a spin chain proposed in Ref.[18] with an Ising- are betting for superconducting qubits, their respective type interaction. The Ising model is one of the most fa- device characterization is not the same: basic gate sets mous exactly solvable models, i.e. those models that are and qubits connectivity are some of the differences. As integrable. Actually, the steps to find a quantum circuit more quantum devices are appearing, it is important to that diagonalizes the Ising Hamiltonian follow the same find some methods to test their quality when running strategy than the analytical solution of the model. There- sophisticated quantum algorithms. fore, the method can be extended to other integrable Several approaches on computer’s quantumness have models like the Kitaev-honeycomb model, which a circuit already been tried. The first published article using an has already been proposed [19]. As we are performing an IBM device tested the violation of Bell inequalities by exact simulation, we have access to the whole spectrum more than two qubits (Mermin inequalities) [4], or a re- and not only to ground state: time evolution and thermal cent article tests if the 16-qubit IBM device can be fully states can be simulated exactly as well. This provides a entangled by generating graph states [5]. Other works new approach in quantum simulation if an exact circuit tried to exploit different few qubit experiments, such as is found for those non trivial models, such as Heisenberg error correcting codes and quantum arithmetics [6]. model, which have an ansatz to be solved. In particular, On the other hand, the community has not forgot for one-dimensional spin chains, the Bethe ansatz [20] is Feynman’s original aim for the proposal of construction the most successful method and several proposals exist of a quantum computer [7]: the simulation of quan- to simulate and extend it to two-dimensions using tensor tum systems. Many classical techniques have been de- network techniques [21]. As the one-dimensional Ising veloped in that direction, for instance quantum Monte model hs analytic solutions for arbitrary number of spins 2

and the circuit proposed in this paper can be efficiently A. Jordan-Wigner transformationgeneralized to larger number of qubits, the methods out-lined in this work can be used to benchmark a quantum Let’s start with the Ising Hamiltonian with transversecomputer by seeing how this compares against known so- fieldlutions. n n The paper is structured as follows. In section II we X X H= σix σi+1 x + σ1y σ2z · · · σn−1 z σny + λ σiz , (3)describe the method proposed in Ref.[18] to construct an i=1 i=1efficient circuit that diagonalizes the Ising Hamiltonian:the number of gates scales as n2 and the circuit depth as where λ is the field strength. The second term has beenn log n. In section III we explain briefly the basic con- added to cancel the periodic boundary term, σnx σ1x , aftercepts of time evolution in quantum mechanics and give a the Jordan-Wigner transformation in order to solve thespecific example to be simulated using the circuit derived system as it was infinite. This modified Hamiltonian willin the previous section. In section IV, we propose two have finite size effects that become negligible as n grows.methods to simulate the expected value of an operator The Jordan-Wigner transformation corresponds tofor finite temperature. Section V summarizes the prop- transform the spin operators σ into fermionic modes certies of the three devices used for this work, two from [24]:IBM and one from Rigetti, and in section VI we present σjx + iσjy † σjx − iσjy Y z ! !the results of ground state magnetization and the time Y zevolution of | ↑↑↑↑i state and compare the three devices cj = σl , cj = σl , (4) 2 2 l<j l<jaccording to them. Finally, the conclusions are exposedin section VII. where cj and c†j are the fermionic annihilation and cre- ation operators acting on the vacuum |Ωc i, ci |Ωc i = 0, and following the anticommutation rules {ci , cj } = 0 and {ci , c†j } = δij . After this transformation the Hamiltonian II. QUANTUM CIRCUIT FOR THE ISING reads HAMILTONIAN n n 1X † ci ci+1+c†i+1 ci+ci ci+1+c†i c†i+1 +λ c†i ci . (5) X Hc = Let’s consider the existence of a quantum circuit that 2 i=1 i=1disentangles a given Hamiltonian and transforms its en-tangled eigenstates into product states. This circuit will In terms of the wave function,be represented by an unitary transformation Udis X |ψi = ψi1 ···in |i1 · · · in i i1 ,··· ,in =0,1 e = U † HUdis , H (1) dis ψi1 ···in (c†1 )i1 · · · (c†n )in |Ωc i. X = (6) i1 ,··· ,in =0,1where H is the model Hamiltonian and H e is a noninter-acting Hamiltonian that can be written as H e = P i σ z . Notice that the coefficients ψi1 ···in do not change. Then i iThis diagonal Hamiltonian contains the energy spectrum it will not be necessary to implement any gates on thei of the original one and its eigenstates correspond to quantum register to perform this transformation. How-the computational basis states. Then, we will have ac- ever, for now on we should take into account we are deal-cess to the whole spectrum of the model by just preparing ing with fermionic modes, so any swap between two occu-a product state and applying Udis . pied modes will carry a minus sign. In terms of quantum For the case of Ising Hamiltonian, the steps to ob- gates, this is translated into the use of fermionic SWAPtain the Udis quantum gate are based on the analytical gate (fSWAP) each time we exchange two modes:solution of the model [22, 23]: i) Implement the Jordan- 1 0 0 0  Wigner transformation to map the spins into fermionic 0 0 1 0 modes. ii) Perform the Fourier transform to get fermions fSWAP =  , (7) 0 1 0 0 to momentum space. iii) Perform a Bogoliubov transfor- 0 0 0 −1mation to decouple the modes with opposite momentum.Thus, the construction of the disentangling gate can be which corresponds with the usual SWAP gate followed ordone by pieces: preceded by a controlled-Z gate (see appendix A).

Udis = UJW UF T UBog . (2) B. Fourier Transform

In the following subsections, we derive the quantum gates The next step to solve the Ising model consists on get-needed to implement the above transformation. ting the fermionic modes to momentum space using the 3

which it is not diagonal yet as modes with opposite mo- |0000i for λ > 1, |gsi = (16)mentum are still coupled. |0001i for λ < 1. The circuit strategy consists in undoing the steps that C. Bogoliubov transformation diagonalize the Ising Hamiltonian. Thus we first undo Bogoliubov transformation by applying (Bkn )† gates, fol- lowed by undoing the Fourier transform using the (Fkn )† The last step will consist on finding a transformation gates and finally undo the Jordan-Wigner transformationwhich mix the two modes according to which, fortunately, does not need from any gate as has been explained in the previous section. ak = uk bk + ivk c†−k , For n = 4, the Bogoliubov modes are ±3π/2 and a†k = uk c†k − ivk c−k . (13) ±π/2, so we need two Bogoliubov gates. Notice that 4

we have removed the (B0 )† gate from the circuit of Fig-

ure 1; this gate corresponds with the identity for λ > 1and exchange qubits in the same state for λ < 1, i.e.|00i → −i|11i and |11i → −i|00i. As the initial state forλ < 1 is the |0001i and (B0 )† is applied over the last twoqubits, it does not affect this state and we can avoid it.If we want to obtain an excited state which eigenstate inthe diagonal basis contains |00i or |11i states, then weshould only apply bit flip gates over the last two qubitsto implement the (B0 )† gate. The circuit shown in Figure 1 also contains fSWAPgates represented with crosses. These will be necessaryif even and odd qubits are not physically connected and,as much, they will increase the total number of gates in Figure 2: Magnetization of n = 4 Ising spin chain as a func-n2 . We can eliminate them if the implementation is done tion of temperature β = 1/(kB T ) and transverse field λ. Thein the ibmqx5 device, which allow us to save up to 16 system undergoes a phase transition, from paramagnetic togates of depth according to IBM gate set, but they are ferromagnetic, as λ increases. For zero temperature (β → ∞)indispensable for the implementation in the other IBM the transition point is located at λ = 1, whereas for finitedevice, ibmqx4, as well as in Rigetti’s 19-qubit chip. temperature there is a quantum critical region around λ = 1.

First, we have to express this state in the H

e basis, which III. TIME EVOLUTION † using Udis become † Once we have the Udis circuit, we have access to the |ψ0 i = Udis |0000i = cos φ|0000i + i sin φ|1100i, (19)whole Ising spectrum by only implementing this gate over √the computational basis states. This allows us to perform with φ = arccos(λ/ 1 + λ2 )/2. Then, we apply the timeexactly time evolution, where the characterization of all evolution operator to obtain |ψ(t)i:states is needed. √ 2 The time evolution of a given state driven by a time- |ψ(t)i = cos φ|00i + ie4it 1+λ sin φ|11i ⊗ |00i. (20)independent Hamiltonian is described using the time evo-lution operator U (t) ≡ e−itH : Analytically, √ X 1 + 2λ2 + cos 4t 1 + λ2 |ψ(t)i = U (t)|ψ0 i = e−iti |Ei ihEi |ψ0 i, (17) hσz i = , (21) i 2 + 2λ2 from which we can obtain the expected value of magne-where |ψ0 i is the initial state and i are the energies of the tization, M = 21 hσz i.Hamiltonian states |Ei i. Then, if |ψ0 i is an eigenstate ofH there is no change in time (steady state) and thereforethe expected value of an observable O will be constant IV. THERMAL SIMULATIONin time. On the contrary, and if [H, O] 6= 0, the expectedvalue will show an oscillation in time given by When a quantum system is exposed to a heat bath its X density matrix at thermal equilibrium is characterized by hO(t)i = e−it(i −j ) hψ0 |Ej ihEj |O|Ei ihEi |ψ0 i. (18) thermally distributed populations of its quantum states i,j following a Boltzmann distribution: We can take advantage from the fact that the eigen- e−βH 1 X −βistates of the non-interacting Hamiltonian H e are the com- ρ(β) = = e |Ei ihEi |, (22) Z Z iputational basis states and, as we have solved the model,we also know all energies i . Then, it is straightforward where β = 1/(kB T ), Z = i e−βi is the partition func- Pto construct the time evolution of a given state |ψ0 i by tion and i and |Ei i are the energies and eigenstates ofonly expressing it in the computational basis and adding the Hamiltonian H. The expected value of some operatorthe corresponding factors e−iti . After that, we only need O for finite temperature is computed asto implement Udis gate over this state to obtain the timeevolution driven by the Ising Hamiltonian. 1 X −βi hO(β)i = Tr[Oρ(β)] = e hEi |O|Ei i. (23) As example, we compute the time evolution of the ex- Z ipected value of magnetization. We take all spins alignedin the positive z direction as initial state, i.e. | ↑↑↑↑i, Simulate thermal evolution according to Ising Hamil-which in the computational basis is the |0000i state. tonian is, again, straightforward once we have Udis gate, 5

qubits which are accessible on the cloud, both interac-

tively in their webpage (Quantum Composer )[2] or using a software development kit (QISKit). Currently, three quantum chips are available for the general public: two of 5 qubits, ibmqx2 and ibmqx4, and one of 16 qubits, ib- mqx5 [27]. When we performed the experiments ibmqx2 was offline, so we have only used ibmqx4 and ibmqx5. All backends work with an universal gate set composed by one-qubit rotational and phase gates iλ ! √1 − e√2

cos(θ/2) −e sin(θ/2) U3 (θ, λ, φ) = , (24) eiφ sin(θ/2) ei(λ+φ) cos(θ/2)since it consists on preparing the corresponding state inthe He basis and apply Udis circuit. In the case of thermal and a two-qubit gate, the controlled-X or CNOT gate.evolution, |Ei i states are the states of the computational The differences between the devices, apart from thebasis, so no further gates are needed to initialize qubits number of qubits, come from the qubits connectivity orapart from the corresponding combination of X gates. topology and the role that each qubit plays when applied At that point, we can perform an exact simulation or a CNOT gate (control or target). Figure 3 shows the con-sampling. In the first case, we run the circuit to obtain nectivity of the used devices. Each qubit in the 5-qubitthe expected value of the observable taking as initial state device is connected with other two except the centralall states in the computational basis and average them one which is connected with the other four. Qubits inwith their corresponding energies. This is done classically the 16-qubit device are connected with three neighborsonce we have the expected values of each state. in a ladder-type geometry. Both, the one-directionality of On the other hand, we can perform a more realistic CNOT gate and the qubits connectivity, are crucial forsimulation by sampling all states according to Boltzmann the quantum circuit implementation. If the circuit de-distribution. First, we need to prepare classically a ran- mands an interaction between qubits that are not physi-dom generator that returns one of the computational cally connected, we should implement SWAP gates whichstates following the distribution e−βi . Then, we run will increase our circuit depth and the probability of er-the circuit many times and compute the expected value rors in our final result. Moreover, each time we need toof the operator by preparing as initial state the one re- implement a CNOT gate using as a control qubit a physi-turned by the generator each time. cal qubit which is actually a target, we have to invert the The first method demands more runs of the experi- CNOT direction using Hadamard gates which, again, willment, N × 2n , needed for the computation of each ex- increase the circuit depth and the error probability.pected value. No statistical errors come from the averag- For our propose, ibmqx5 is the best choice for the im-ing part, as it is done classically. For the second method, plementation of the n = 4 circuit. We can use any of thewith only N runs we will obtain√ a value for the observable squares and identify upper qubits as 0 and 2 and lowerwith a statistical error of 1/ N . qubits as 1 and 3: according to the circuit of Figure 1, we For n = 4 the magnetization can be computed analyt- will not need to use any fSWAP gates. We should onlyically and it is shown in Figure 2. At zero temperature, take into account which qubits are control or target toi.e. β → ∞, the system undergoes to phase transition, try to reduce the times that we have to invert the CNOTfrom paramagnetic to ferromagnetic, at the correspond- direction.ing critical point of λ = 1. As temperature increases(β decreases), the system have a critical region aroundλ = 1 until the temperature is high enough to disorder B. Rigetti Computing: Forestall spins, independently of the transverse field strength(limit β → 0) [26]. At the end of 2017, Rigetti Computing launched a 19- qubit processor, ‘Acorn’, that can be used in the cloud through a development environment called Forest [3]. It V. IMPLEMENTATION ON A QUANTUM includes a python toolkit, pyQuil, that allows the users COMPUTER to program, simulate and run quantum algorithms in a similar way as IBM’s QISKit. The chip is made of of 20 A. IBM Quantum Experience superconducting transmon qubits but for some technical reasons, qubit 3 is off-line and cannot interact with its Since 2016, IBM is providing universal quantum com- neighbors, so it is treated as a 19-qubit device.puter prototypes based on superconducting transmon Currently, Rigetti’s gate set is formed by three one- 6

Figure 4: Rigetti’s 19-qubit processor ‘Acorn’. Lines indicate

the two-qubit connection ruled by a controlled-Z gate. Fortechnical reasons, qubit 3 is offline. Figure 5: Expected value of hσz i of the ground state of a n = 4 Ising spin chain as a function of transverse field strength λ. Solid line represents the exact result in comparison withqubit rotational gates the experimental simulations represented by scatter points. The best simulation comes from ibmqx5 device, which is an θ θ θ RX (θ) = ei 2 σx , RY (θ) = e−i 2 σy , RZ (θ) = ei 2 σz , (25) expected result since the number of gates used is lesser than with the other devices because qubits connectivity.and a two-qubit gate, controlled-Z. This two-qubit gatehas the advantage of bi-directionality as the result is thesame independently of which is the control qubit. Forthat reason, the connectivity of the device shown in Fig- look at the exact ground state wave function:ure 4 does not specify the direction of the two-qubit gate. The qubit topology is very different from IBM’s de-  α(|0001i−|0010i+|0100i−|1000i)vices: some qubits are connected with three neighbors    +|0111i−|1011i+|1101i−|1110i for λ<1,and others with two in a zigzag-type geometry. Then, 1  |gsi=we can not do without the fSWAP gates, which means N  α(|0011i−|0110i+|1001i+|1100i) that the circuit depth will be greater than the ibmqx5’s.  +2|1111> for λ>1,On the other hand, it will be comparable with the ib- √ √ √ (26)mqx4, which also needs from these gates. 2 where α = λ − 1 + λ and N = 2 2 1 + λα. As λ increases, the amplitude for the states proportional to α goes to zero. That means that any error occurring for VI. RESULTS AND DISCUSSION λ > 1 is dramatic as it will affect the state with higher probability amplitude, the |1111i. Then, any error in Figure 5 shows the results of the exact simulation of that regime will inevitably cause a decrease in magne-ground state magnetization for the √ three devices. All tization. On the other hand, errors in some states forpoints contain a statistical error of 1/ N with N = 1024 λ < 1 can be compensated in average for the other ele-which comes from the average over all runs to compute ments with the same probability amplitude.the expected value. The other error sources are discussed Similar results are obtained for the time evolution sim-qualitatively in the following paragraphs. ulation. Figure 6 shows the results for the simulation of The best performance come from the ibmqx5 device. the | ↑↑↑↑i state magnetization as it was explained inThis is an expected result as we do not need from fSWAP Section III. Since for the preparation of the initial stategates because the qubits connectivity. On the other hand, it is necessary to implement more gates, we only showRigetti’s device performs better than the ibmqx4, even the results for the ibmqx5 device, which is the one thatthough the number of gates is very similar. can afford this extra circuit depth. The simulation approaches better to the prediction for As expected from the previous result, points that rep-low λ. The explanation could come from how affect the resent higher magnetization have more error respect theexperimental error sources to the magnetization. As- theoretical values. However, it is remarkable that the re-suming that two-qubit gates implementation take several lations among the different points for different values ofhundreds of ns and single qubit gates hundreds of ns, er- transverse magnetic field are proportionally correct. Therors coming from decoherence are expected to be low, as oscillations take place for lower values of hσz i, have lowerthese times are around 50 µs. On the other hand, errors amplitudes and are a little bit shifted to the left: evencoming from the gate implementation are cumulative and though, they cross each other at the corresponding pointsprobably the most important error source. It is not neg- and increase and decrease proportionally to the exact re-ligible neither errors coming from qubits readout, which sult. That is a clear indicator that the error sources incan induce a bit flip. the quantum device are systematic, as the result does not The analysis of the results become more clear if we depend on the state preparation. 7

the fact that any error that can induce a qubit bit flip will produce a decrease in magnetization, as can be traced out from the ground state wave function of Eq.(26). How- ever, and taking into account this fact, the time evolution simulation is reasonably good since the expected oscilla- tions for different transverse magnetic field strengths are shifted to the left and have lower amplitude and magne- tization, but are also proportional each other as are the theoretical values. As a final remark, this circuit is also interesting from a point of view of condensed matter physics as specific methods to simulate exactly time and thermal evolutionFigure 6: Time evolution simulation of magnetization, hσz i, are provided. This can open the possibility of simulatefor the state | ↑↑↑↑i of a n = 4 Ising spin chain. Left plot other interesting models: integrable, like Kitaev Hon-compares the exact result with the experimental run in the eycomb model [19], or with an ansatz, like Heisenbergibmqx5 chip for different values of λ. Right plots detailed model.the results for each λ to compare them with the theoreticalvalues. Although the magnetization is lesser than expected,the oscillations follow the same theoretical pattern. Notes

The program used for this work for the IBM quantum VII. CONCLUSIONS devices was awarded with the IBM “Teach Me QISKit” award [28]. Recently, Rigetti computing changed the quantum de- In this work we have implemented the exact simulation vice to one of 8 qubits. The results shown in this workof a one-dimensional Ising spin chain with transverse field correspond to the previous device of 19 qubits.in some quantum computers. To do so, we programmedthe algorithm proposed in Ref.[18] in IBM and Rigettiquantum chips. We have simulated the expected value Acknowledgementsof ground state magnetization as well as the time evo-lution of the state of all spins aligned. We have alsoprovided two methods to compute thermal evolution of We acknowledge use of the IBM Q experience for thissome operator using the same circuit: exact simulation work. The views expressed are those of the authors andor sampling. do not reflect the official policy or position of IBM or the The circuit presented allows to compute all eigenstates IBM Q experience team. We also acknowledge use of theof the Ising Hamiltonian by just initializing the qubits in Rigetti computing device as well as the help and availabil-one of the states of the computational basis. It is then ity of Rigetti staff. This work has been possible with thea implementation of a Slater determinant with a quan- support of FIS2015-69167-C2-2-P and FIS2017-89860-Ptum computer. Since the one-dimensional Ising model (MINECO/AEI/FEDER,UE) grants. Finally, we wouldis an exactly solvable model, which means that we can like to thank the discussions with Quantic group mem-compute analytically all the states and energies for any bers, in particular with José Ignacio Latorre.number of spins, and the circuit is efficient, the numberof gates scales as n2 and the circuit depth as n log n, it Appendix: Gate decompositioncan represent a method to test quantum computing de-vices of any size. As has been shown, it is also a hard A. Fermionic-SWAPtest since this model is strongly correlated and both thesimulation of the phase transition surrounding and timeevolution require a high qubits control. The Jordan-Wigner transformation do not need from The best performance has been obtained with the ib- any quantum gate, but as it transforms the spin operatorsmqx5 chip, although the error respect to the theoreti- σ into fermionic modes c, any swap between qubits shouldcal prediction is large in the ferromagnetic phase of the obey the fermionic anticommutation relations, i.e. themodel. A possible reason why this chip shows better re- exchange between two occupied modes carries a minussults than the others comes from the number of gates sign. This is represented with the use of fermionic SWAPused in the quantum circuit, as the qubits connectivity gate (fSWAP), decomposed in basic gates in Figure 7.in that device allows us to save all the fSWAP gates. From the point of view of IBM’s implementation, atOn the other hand, Rigetti’s chip performs better than least one CNOT should be inverted to fit the circuit tothe ibmqx4 chip, even though both implemented circuits the qubits connectivity; this can be easily done using −−−−→ ←−−−−have the same gate depth. the identity (H1 ⊗ H2 )CNOT(H1 ⊗ H2 ) = CNOT. In The ferromagnetic phase is difficult to simulate due to addition, controlled-Z gate could be implemented using 8

two Hadamard gates and a CNOT, as it is also shown in C. Bogoliubov transformation

Figure 7. From Rigetti’s implementation point of view, Bogoliubov transformation is implemented using Bkncontrolled-Z gates are part of their basic gate set and, gates written in Eq. (14). The explicit decompositionalthough CNOT gate and H are not, they are included is shown in Figure 10, where the controlled-RX gatein pyquil language, so the quantum programmer should (shown in Figure 11 has been decomposed using thenot care about decompose them in terms of the other methods of Ref.[29]). Rotational gates are part of thegates (except to keep in mind the circuit depth will basic Rigetti gate set and are equivalent to IBM’s gatesincrease with the use of non-basic gates). RX ≡ U3 (φ = 0, λ = π), RY ≡ U3 (φ = λ = 0) and RZ ≡ U1 . × • • • • • × Z ≡ • H H Bkn ≡ X • RX (θk ) • X Figure 7: Fermionic SWAP gate.

Ph n • H • • D. Initial state preparation Fkn ≡ • Z The ground state of the n = 4 Ising model in the di- agonal basis is |0000i for λ > 1 and |0001i for λ < 1. Qubits are always initialized in the |0i state both in IBMFigure 8: Decomposition of the building block of Fouriertransform gate. The controlled-Hadamard gate is shown in and Rigetti devices. Then, to compute the ground state,Figure 9. we only need to perform a bit-flip gate (Pauli-X or X gate), on fourth qubit to initialize the circuit for λ < 1. The example given for time evolution simulation re- • • quires from the preparation as the initial state the one shown in Eq.(20). This can be done by applying a RY (φ) ≡ gate on the first qubit to introduce the φ angle, fol- H S† H T† T H S lowed√ by a phase gate to introduce the evolution phase 4it 1+λ2 e and a CNOT gate between first and second Figure 9: Controlled-Hadamard gate. qubits.