Digital-analog quantum algorithm for the quantum Fourier transform

Quantum computers will allow calculations beyond existing classical computers. However, current technology is still too noisy and imperfect to construct a universal digital quantum computer with quantum error correction. Inspired by the evolution of classical computation, an alternative paradigm merging the flexibility of digital quantum computation with the robustness of analog quantum simulation has emerged. This universal paradigm is known as digital-analog quantum computing. Here, we introduce an efficient digital-analog quantum algorithm to compute the quantum Fourier transform, a subroutine widely employed in several relevant quantum algorithms. We show that, under reasonable assumptions about noise models, the fidelity of the quantum Fourier transformation improves considerably using this approach when the number of qubits involved grows. This suggests that, in the Noisy Intermediate-Scale Quantum (NISQ) era, hybrid protocols combining digital and analog quantum computing could be a sensible approach to reach useful quantum supremacy.


I. INTRODUCTION
Almost four decades ago, a new paradigm, based on laws of quantum mechanics, has been put forward by Y. Manin [1] and R. Feynman [2]. The new paradigm employed quantum features to speed up calculations and it was called quantum simulation or quantum computation (QC). There exist several computational tasks for which QC offers exponential speedups over their classical counterparts [3,4]. If we had a fully functional, error corrected quantum computer, we would be able to solve problems that not even the largest classical supercomputers can. But nowadays we are far from this point. The first series of commercial digital quantum processors based on superconducting circuits have been introduced by companies such as IBM, Rigetti, Google and Alibaba. These devices belong to the so-called Noisy Intermediate-Scale Quantum (NISQ) era, in which their performance still faces multiple technical constraints. These constraints pose a great challenge when one tries to solve real-world problems, limiting its size to small-scale [5,6].
A possible approach to bypass the NISQ-era hardware limitations and solve relevant problems was introduced by A. Parra-Rodriguez et al. [7]. They proposed a universal paradigm to perform quantum computation, inspired in the evolution of classical computation, called digital-analog quantum computation (DAQC). This proposal merges the flexibility of digital quantum computation with the robustness of analog quantum simulators.
A natural question is whether quantum algorithms with possible speedup can be efficiently written using this paradigm. The quantum Fourier transform (QF T) is a key ingredient for several quantum algorithms such as Shor's algorithm for factorization [3] or the quantum phase estimation algorithm for the estimation of the eigenvalues of a unitary operator [8]. The latter additionally appears as a subroutine of other algorithms, such as the Harrow-Hassidim-Lloyd (HHL) algorithm for lin- * Corresponding authors: mikel.sanz@ehu.es , ana.martinf@ehu.eus ear systems of equations [9] or the quantum principal component analysis algorithm [10]. The quantum version of the discrete Fourier transform (DF T) has a exponential speed up over its classical counterpart. While on the classical version it is necessary to apply O(n2 n ) gates, where n refers to the number of bits, on the quantum approach only O(n 2 ) gates are needed, in this case n stands for the number of qubits.
In this article, we show how to efficiently write the QF T algorithm using the DAQC paradigm, and demonstrate that it achieves better results than the purely digital approach on a noisy hardware. For that purpose, we considered the homogeneous all-to-all (ATA) two-body Ising model as a resource for DAQC implementation, and we express the Hamiltonian of the QF T as an inhomogeneous ATA two-body Ising model. Afterwards, we simulate numerically the cases of a 3−, 5− and 6−qubit device, introducing reasonable noise models in the interactions. Additionally, we have performed the QF T of a certain family of states using both the purely digital and the DAQC approaches. The fidelity between the ideal transformation and the one achieved by the DAQC behaves qualitatively better with the number of qubits than the fidelity offered by the digital implementation. Although this new paradigm has its own noise sources, it eliminates the errors derived from the entangling two-qubit gates. Getting rid of these source of errors allows us to successfully implement relevant quantum algorithms in the NISQ era.

II. DIGITAL-ANALOG QUANTUM COMPUTING
There are two main approaches to implement QC, namely, the digital quantum computation (DQC) and the analog quantum simulation. A digital quantum computer, which is based on quantum circuits and the quantum gate model, is a physical platform, such as trapped ions [11,12] or superconducting circuits [13][14][15][16], which can be programmed to efficiently simulate another dynamics of interest. The drawback of this approach is that it consumes too many resources to implement useful applications beyond desired computation, so that it can hardly be considered a viable option with current technology. Some examples of this approach are in the simulation of quantum machine learning [17,18], finance [6,19], open quantum systems [20], quantum chemistry [21], or quantum field theories [22], among others. On the other hand, analog quantum computing uses a controllable quantum system whose dynamics is known to mimic the dynamics of another system of interest. There are multiple results following this approach simulating, for instance, the quantum Rabi model [23][24][25], fluid dynamics [26], or Casimir physics [27][28][29], among others.
Merging these two approaches, leads to a paradigm known as digital-analog quantum computation [7,[30][31][32]. A digitalanalog protocol, built combining analog blocks with digital steps, shows the flexibility of the digital gate model [33] and the robustness of the analog simulation model. A formal definition of these elements could be found in Ref. [7]. Here, we give a practical definition: a digital step is constituted by single-qubit unitary operations whereas an analog block is constituted by the time evolution of a known interaction Hamiltonian.
The most popular quantum processors are based on superconducting circuits where the role of the qubits is played by transmons. The interactions that appears in such physical systems are well described by the inhomogeneous ATA two-body Ising Hamiltonian. Something similar happens with spin-spin interaction in trapped ions. Therefore, from here on, we will use the unitary evolution generated by homogeneous ATA two-body Ising Hamiltonian as the elementary analog block where g is a fixed coupling strength and Z (i) is the Pauli matrix σ (i) z applied on the i-th qubit. For the digital steps, we will employ single-qubit unitary rotations around the X axis with continuous angle θ between 0 and 2π radians. As we will explain below, our goal is to generate an arbitrary ATA inhomogeneous Hamiltonian The problem reduces to find an appropriate map between t F g j,k and gt nm by slicing the homogeneous time evolution U zz (t) into N(N − 1)/2 analog blocks of different time lengths t nm , sandwiched by the local rotations X (n) X (m) , as explained in Ref. [7] and depicted in Fig. 1. This mapping yields Thus, the problem of finding the value of each time t nm is a matrix-inversion problem where α and β are introduced to vectorize each pair of indeces (n, m) and ( j, k) as and M is a sign matrix built up by the elements This sign matrix M is a non-singular matrix ∀N ∈ Z−{4}. This means that, for the case N = 4 qubits, we need a different set of single qubit rotations. This case is discussed in detail in Ref. [7]. The method aforementioned is called stepwise DAQC (sDAQC) and, under ideal circumstances, i.e. without taking into account noise sources or experimental errors, would lead to the same state as the DQC method. There is another variant of the DAQC method, called banged DAQC (bDAQC) protocol. In this case, the analog Hamiltonian is on during the whole simulation and the single-qubit rotations are preformed on top of it. Note that, in the previous case, the analog evolution is turned off before applying single-qubit rotations. The total amount of time in which the analog block is on in the bDAQC, is the sum of the different analog blocks in the sDAQC protocol, as shown in Fig. 1.
The bDAQC does not generate the same result as the sDAQC or the DQC method. There is an intrinsic error on the bDAQC which does not depend on either the experimental conditions or noise sources. This error is due to the superposition between the Hamiltonians of the single qubit rotations and the analog Hamiltonian. However, one could expect that, if single qubit rotations are performed in a time ∆t much smaller than the intrinsic time scale of the analog block, the error will be smaller than the one coming from switching on and off the analog Hamiltonian. Indeed, the additional error per single qubit rotation introduced by not turning off the evolution of the Hamiltonian is of the order O (∆t) 3 [7]. The reason why we aim at using the bDAQC protocol despite its intrinsic error is because it accumulates less experimental error. Experimentally switching on and off the Hamiltonian is not an exact step function, it takes some time to stabilize. Quantum control tries to suppress these errors, but it turns cumbersome when the system scales up and cannot be solved in a classical computer. If we keep the analog block on during the evolution, we will avoid these errors. This will be of great importance when we explore a more realistic implementation of the DAQC protocol in section IV. vector of length N, (x 0 , x 1 , ..., x N−1 ) and transforms it into another complex vector of the same length, (y 0 , y 1 , ...y n−1 ) whose k − th element is defined as x j e 2πi j .
QF T, its quantum counterpart, is a linear operator, F , with the following action on the basis states where N = 2 n and n is the number of qubits of the system. The quantum-circuit implementation of the QF T is depicted in Fig. 2. The only single-qubit gates applied are Hadamard gates H, whose unitary matrix and Hamiltonian expressions are respectively. The entangling two-qubit gates of the circuit implementation are the controlled-R k operations, with The swap gates at the end of the circuit needed to correctly read the transformed state are not shown.
They appear in (n − 1) different blocks of controlled rotations, all of them preceded by a Hadamard gate, as shown in Fig. 2.
In order to apply the DAQC protocol to implement the QF T, we express the unitary matrices defined in Eq. (10) in terms of an inhomogeneous ATA 2-body Ising Hamiltonian. Indeed, where and α c,k,m = δ c,m π 2 k−m+2 .
The superindices in brackets specify the qubit in which the unitary operation is performed. In Fig. 3, we depict the DQC implementation of the QF T using Eqs. (12)(13)(14). As one can see, each controlled-rotation block can be implemented by applying first a set of singlequbit gates, and then a set of two-qubit gates. This is why we decompose the complete unitary transformation into three different operations. The subindices SQG and TQG stand for single qubit gates and two qubit gates, respectively.
Every two-qubit gate is applied following the ATA DQC protocol and using a fixed π/4 phase In our case, µ = ν = Z and the phase ϕ µν jk correspond to the coefficient α c,k,m , given in Eq. (15), e iα c,k,m Z c Z k = e i π 4 Y c e i π 4 Z c Z k e iα c,k,m Y c X k e i π 4 Z c Z k X k e −i π 4 Y c .
FIG. 3. Implementation of the QF T for a 3− qubit system using three different protocols: DQC, sDAQC and bDAQC. Digital implementation: We show the transformation between the usual DQC implementation of the QF T (see Fig. 2) and the one that follows the Hamiltonian described by Eq. (13). Following Eq. (10), the controlled-rotation cR 2 and cR 3 correspond to the controlled-phase gate cS , and the controlled-π/8 gate cT , respectively. For the implementation that follows the Hamiltonian described by Eq. (13), each entangling two-qubit gate is applied according to the ATA DQC protocol, using a fixed π/4 phase (see Eq. 17). DAQC Implementation: The blue blocks U int (t) represent the analog blocks and each of them is applied during different times, t. The single-qubit gates X refer to the Pauli matrix σ x and act for a time ∆t. We apply the DAQC protocol for each block of controlled rotations of the DQC implementation, which is detailed by the red line over each of those blocks. The sDAQC switches on and off the analog evolution before applying the single-qubit rotations X. In contrast, in the bDAQC protocol, the single-qubit rotations are performed on top of the analog evolution. Since we are applying a Suzuki-Lie-Trotter decomposition to minimize the error, between the single-qubit rotations, each analog block acts for different times t i − ∆t, except for the first and the last block, which act for times t i − 3 2 ∆t.
The inhomogeneous ATA 2-body Ising Hamiltonian which we want to write in the DAQC framework (see Eq. 13) represents a complete block of controlled-rotations and it is different for each block. This means that we need to apply the DAQC protocol (n − 1) times, one time per controlled-rotation block, as depicted in Fig. 3.
In order to compare each protocol (DQC, sDAQC and bDAQC), we compute the QF T of the family of states |ψ 0 = sin β |W n +cos β |GHZ n , where β runs from 0 to π and n refers to the number of qubits of the system. We perform this for a 3−, 5− and 6−qubit system to grasp the behavior of the fidelity when the number of qubits scales up. As a figure of merit, we have calculated the fidelity between the states after the exact transformation and the ones obtained by the applied different methods, The results obtained are depicted in Fig. 4(a). According to the aforementioned arguments, the expected fidelity for both the digital case and the stepwise case is F DQC = F sDAQC = 1, since the implementation is exact and ideal. This holds independently of the number of qubits of the system. The fidelity obtained when applying the bDAQC is always F bDAQC < 1, due to the intrinsic error associated to this method. The fidelity decreases with the number of qubits, but F 3, 5, 6 bDAQC > 0.96 for n = 3, 5, 6 qubits.

IV. REALISTIC IMPLEMENTATION WITH EXPERIMENTAL ERRORS
Impurities in the materials comprising superconductive circuits and spurious interactions among superconducting qubits (cross-talk) and with two-level fluctuators modify the dynamics of the system, directly affecting the results of an experiment. Additionally, there are relevant control errors in the pulses when applying the gates. In order to make a fair comparison among different methods, we must introduce the effects of errors in the dynamics.
In single-qubit gates, we have introduced a magnetic field noise ∆B γ by adding to the Hamiltonian of the single-qubit gate a random variable taken from a uniform probability distribution centered in 1, i.e. U (1 − SQGN, 1 + SQGN). We have chosen SQGN = 0.0005. For the two-qubit gates, we add a Gaussian phase noise ∈ N(0, TQGN), with variance TQGN = 0.2000, to the π/4 phases in the DQC protocol. Finally, to model the experimental control error on the analog blocks, we include a Gaussian coherent noise to the time those blocks are applied, this is t → t + δ, where δ ∈ N(0, ABN). The value of the variance ABN depends on which DAQC protocol we are using. The value used on the sDAQC is double the value used for the bDAQC case. The values we have considered are ABN s = 0.0200 for the sDAQC case and ABN b = 0.0100 for the bDAQC case. Thus, each ideal gate transforms as To test how the fidelity behaves for each case, we have computed the QF T of the family of states |ψ 0 = sin β |W n + cos β |GHZ n . We repeated the simulation 1000 times and calculate the average for a 3−, 5− and 6−qubit system. Both the sDAQC and the bDAQC perform better than the DQC protocol under realistic conditions, as depicted in Fig. 4(b). The best result corresponds to the bDAQC, a completely different situation to the ideal case. The reason is that, turning on and off the interaction Hamiltonian, is much more prone to suffer from experimental errors than keeping it on until the end of the computation. Note that the fidelity of the DQC decreases faster than the fidelity of the DAQC protocols with the number of qubits of the system. This shows the convenience of this paradigm to foster near-term quantum computation.
Additionally we have studied how the fidelity behaves with different values for the errors. We have computed the QF T of the state |ψ 0 = sin π 4 |W n + cos π 4 |GHZ n for n = 3, 5 and 6 qubits employing the three protocols. Again, the fidelity obtained when we use the bDAQC protocol behaves better than the one obtained by using the DQC protocol. For the 3−qubit case, the fidelity is higher than 99%, for 5 qubits it stays above 85%, and for 6 qubits, it is greater than 70%. These results are depicted in Fig. 4(c). Similarly to the DQC case, in which the error of the two-qubit gates dominates in the total error, the fidelity in the DAQC is mainly affected by the errors in the analog blocks.

V. CONCLUSIONS AND PERSPECTIVES
We have shown that the DAQC paradigm can also be employed in quantum algorithm implementation. In particular, we have decomposed the QF T with a digital-analog approach. This is a ubiquitous quantum subroutine, which is a relevant part of several quantum algorithms. Improving the fidelity of the implementation of QF T consequently enhances applicability of other quantum algorithms, such as Shor's algorithm for prime number factorization or HHL algorithm for solving linear systems of equations.
The main problem of the digital approach for the QF T in a real NISQ chip is that its fidelity decays fast with the number of qubits. For QPCA and HHL algorithms, for instance, one would need as many qubits as possible to increase the size of the matrix and to reach a high precision when solving the problem. This situation dramatically constrains the achievable quantum volume of the algorithms, consequently restricting the original problem to a size in which DQC offers a reliable fidelity. Here, we have shown that DAQC could allow us to increase the volume of the algorithm while keeping the fidelity under control. Indeed, we have implemented the QF T for more than three qubits, keeping the fidelity of the algorithm above 80%. In a similar situation, the fidelity provided by the DQC protocol is between 50% and 65%.
As a future work, it would be useful to include other types of errors, such as decoherence, and study the behaviour of the fidelity with these errors. Taking into account the advantages that the DAQC paradigm offers, the next step is to study the implementation of quantum algorithms comprising the QF T as a subroutine. Additionally, it would also be interesting to implement other quantum algorithms such as Grover's algorithm. The successful implementation of these algorithms would pave the way for achieving quantum supremacy in the NISQ era.
The authors acknowledge support from Spanish MCIU/AEI/FEDER (PGC2018-095113-B-I00), Basque Government IT986-16, the projects QMiCS (820505) and OpenSuperQ (820363) of the EU Flagship on Quantum Technologies and the EU FET Open Grant Quromorphic. This work is supported by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research (ASCR) quantum algorithm teams program, under field work proposal number ERKJ333. FIG. 4. Fidelity of the transformation of the family of states |ψ 0 = sin β |W n + cos β |GHZ n using the three protocols. (a) Ideal implementation. Both the DQC and the sDAQC protocols perform the QF T with fidelity F DQC = F sDAQC = 1. The bDAQC has an intrinsic error due to the fact that the analog block is applied during the whole process. In this case the fidelity F bDAQC ∈ (0.96, 1). (b) Realistic noisy implementation. In this situation, the intrinsic error of the bDAQC is less significant than the experimental errors of the DQC and the sDAQC. The fidelity of the DQC decreases fast with the number of qubits. For a 6−qubit system, the fidelity is around the 50%, so the DQC protocol is no longer useful. The fidelity of both DAQC protocols behaves better than the one of the DQC with the number of qubits, and remains above 70% for the sDAQC and over 80% for the bDAQC. This shows that the bDAQC protocol is the best option if one wants to implement the QF T on a system built up from several qubits.(c) Fidelity evolution with growing errors. We want to show how the fidelity behaves if the errors we have estimated are slightly different. We have computed the QF T of the state |ψ 0 = sin π 4 |W n + cos π 4 |GHZ n for a system of 3, 5 and 6 qubits. The fidelity of the two DAQC protocols is better than the fidelity obtained with the DQC, no matter what the errors are. Note that, in the DQC protocol, the error of the two-qubit gates dominates in the total error. Similarly, the fidelity in the DAQC is mainly affected by the errors in the analog blocks.