SciELO - Scientific Electronic Library Online

 
vol.68 número3Effect of the orientation distribution of thin highly conductive inhomogeneities on the overall electrical conductivity of heterogeneous materialEstudio sobre la situación laboral actual de egresados de las carreras de física e ingeniería física en México índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados

Revista

Articulo

Indicadores

Links relacionados

  • No hay artículos similaresSimilares en SciELO

Compartir


Revista mexicana de física

versión impresa ISSN 0035-001X

Rev. mex. fis. vol.68 no.3 México may./jun. 2022  Epub 14-Abr-2023

https://doi.org/10.31349/revmexfis.68.031402 

Research

Other areas in Physics

Characterizing errors for quantum Fourier transform on IBM quantum

C. Allendea 

A. Fonseca de Oliveiraa 

E. Buksmana 

a Facultad de Ingeniería, Universidad ORT Uruguay, Montevideo, Uruguay.


Abstrac

The performance of today’s quantum computers are affected by noise. This effect can be analyzed in the result of simple quantum algorithms in real quantum computers. The noise can be characterized as a decoherence error or a systematic error, the last could be corrected by a unitary rotation. In this article we propose two methods to model a systematic error, in the Quantum Fourier Transform algorithm (QFT). The first method uses the isotropic index presented in [1] and needs to reconstruct the density matrix of the experimental state, while the second method, although less general, only needs to reconstruct the reduced density matrices for each qubit. In both methods, a unitary transformation is proposed, which approximates the experimental result to the expected theoretical state. As an example, the QFT algorithm is analyzed for two qubit states, in quantum IBM Q computer ibmq_santiago.

Keywords: Quantum Fourier transform; quantum error correction; IBM quantum

1 Introduction

These days, circuit model-based quantum computers require some type of active error correction, because states in theoretically advantageous quantum algorithms acquire errors as they are prepared, manipulated by gates, and measured, reducing efficiency. For this reason, the characterization and correction of errors is of vital importance to obtain an acceptable result [2]. Although there are quantum error correction methods, as Fault-tolerant quantum error protocols [3], these are expensive from a computational point of view. In the current situation, i.e. a noisy intermediate-scale quantum era, it is important to characterize and analyze error models, for a possible future corrections.

The central idea of the article, is to use the isotropic index proposed in [1], that separates the model error into one part related to unitary deviation, due systematic errors, from another part which represents the loss of information. This last errors, due to decoherence, cannot be corrected without redundancy, while in principle systematic errors could be.

Two methods are proposed to model systematic errors. The first method determines the density matrix of the experimental output of a n qubit state, which requires about 4 n projective measurements (Quantum state tomography) and uses the isotropic index to find a unitary rotation, while the second method uses only 3n projective measurements. This last method is less general and works only for algorithms in which the output expected state, of each input basis state, is completely separable in all qubits.

With this intention, we analyze a particular algorithm: the Quantum Fourier Transform (QFT) [4], finding the unitary rotation that models the systematic error. The (QFT) is an important part of some quantum algorithms, such as the famous Shor’s factorization algorithm [5] and the quantum phase estimation algorithm [6]. However, the effect of noise on (QFT) is less studied. [7, 8].

This article is divided into three main sections. After the introduction, in Sec. 2, we present the Quantum Fourier Transform Algorithm (QFT), and its matrix model representation. In Sec. 3, we discuss both correction methods for general quantum algorithms. We explain how the unitary matrix model is determined for an n qubit state. Finally, in 4 we present, as an example, the experimental results of running the QFT algorithm for a two qubit system on IBM Q machine: ibmq_santiago, and some conclusions.

2 The quantum fourier transform algorithm

2.1 QFT Algorithm

The Fourier transform is used in a wide range of classical problems from signal processing to complexity theory. The QFT is the quantum generalization of the Discrete Fourier Transform (DFT) where the inputs are the amplitudes on a computational basis of a wave function. It is part of many quantum algorithms, most notably Shor’s factoring algorithm [5] which makes use of the QFT for period finding.

The classical DFT maps an input vector (x0,...,xN-1) to the output vector (y0,...,yN-1) according to Eq. (1):

yk=1Nj=0N-1xjωNjk, (1)

where

ωNjk=e2πiNjk. (2)

Meanwhile the QFT acts on an input pure n-qubit quantum state x

x=j=0N-1xjj, (3)

where N=2n, and {j} is the standard computational basis, and maps it to the output state y according to

y=UQFTx=1Nj=0N-1k=0N-1ωNjkxjk, (4)

where ωNjk is the same as the classical case, Eq. (2).

2.2 Circuit implementation

Experimental quantum computers nowadays generally use a small set of universal quantum gates in order to generate quantum circuits. The quantum IBM computer (IBM Q) is no exception and only works with certain quantum gates, which made translating the matrix in Eq. (4) to quantum gates an essential task.

As an example, for a two qubit state, the quantum gate representation of the algorithm requires a few basic gates: the Hadamard transform and a controlled rotation of angle π/2 around the z axis, Rz, whose matrix representations are shown in Eq. (5) and (6), respectively.

H=12111-1, (5)

CRz(π/2)=I00+Rz11, (6)

where Rz is

Rz=100eπi2, (7)

the QFT circuit UQFT=(IH).cRz.(HI) is shown in Fig. 1.

Figure 1 Two qubit QFT circuit for input state 00. Illustration given by [9]

3 Systematic error model

3.1 Error model using the density matrix and the isotropic index

In order to model the systematic error, the first step is to reconstruct the resulting density matrix ρexp, measuring the experimental projections from the data obtained from IBM Q, using Quantum State Tomography (QST) [4]. To recover the density matrix state, measurements must be made in the three basis (axes) of space, X,Y and Z whose matrices are defined:

X=0110,  Y=0-ii0,  Z=100-1. (8)

For example, for any 2 qubit state its matrix ρ is given by

ρ=14i=03j=03tr(ρσiσj)σiσj, (9)

where σ0=I, σ1=X, σ2=Y, σ3=Z and the values of tr(ρσiσj) are obtained, measuring the state several times in order to approach the expected value by the statistical average.

3.2 Isotropic index

The isotropic index is useful to separate the global loss of information, called weight ω, from the misalignment A with respect to a reference pure state. While nothing can be done about the loss of information, the misalignment (coming from systematic errors), could be corrected, hence the importance of separating these two type of errors.

Considering the pure reference state ψ, ρψ = ψψ and the decomposition of a state ρ after a noisy process,

ρ=ωI2n+(1-ω)ρ^, (10)

the double index is defined as:

  • • The isotropic weight

ω=2nλ, (11)

where λ is the smallest eigenvalue of ρ,

  • • and the isotropic alignment A,

A=Fid(ρ^,ρψ)-Fid(ρ^,ρψ), (12)

where Fid is the fidelity between states [4], and ρψ=I-ρψ/2n-1 is the isotropic mixed state orthogonal to ψ.

The misalignment takes values in the interval [-1,1], where 1 means the resulting state is completely aligned with the reference state ρψ and -1 means the resulting state is completely misaligned i.e. aligned with ρψ. Moreover, ω takes values in the interval [0,1]: when ρ is a pure state ω=0, and when the loss of information is total, ω=1.

Consider now the state ψ as the reference state of the resulting theoretical state from the application of QFT to some basis state, and ρexp the obtained experimental matrix state from the same input state. Decomposing the ρexp

ρexp=ωI2n+(1-ω)ρ^, (13)

it is always possible to obtain ω and ρ^.

In the particular case where ρ^ is a pure state, i.e., ρ^=ϕϕ, one could partially correct the error with a unitary matrix that takes ϕ to the state ψ.

Unfortunately, generally the state ρ^ is not a pure state, so it is necessary to find the pure state ϕ, closest to ρ^, and with maximal alignment with it, i.e., ϕ should satisfy Eq. (14)

ϕ/maximumofA(ρ^,ϕ), (14)

where A is the alignment index. These states can be graphically seen in Fig. 2.

Figure 2 Representations of the states in Bloch’s Sphere. 

In order to find ϕ that satisfied the requirement, optimization methods were used. Once ϕ was found, a rotation matrix U that takes ϕ to theoretical ψ, is easy to write out, for any basis initial state. It is a corresponding matrix U i and ϕi for each input canonical basis state i. Hence, the complete model is defined as a control unitary rotation Uc , and n ancillary qubits, that simultaneously correct the n basis states, and so any input state. An example of Uc for two qubits Hilbert space, is given in Sec. 4 (see Fig. 3). Although this method is more exact, it has a high computational cost since the resulting state needs to be measured in all 4n local projections, where n is the number of qubits. In Sec. 3.3 we will analyze another method that manages to estimate the necessary correction by measuring only 3n projections.

Figure 3 Unitary correction U c for any input state. 

3.3 Error model using only 3n projection’s

Since determining the density matrix ρexp using the QST method is computationally expensive, another method is proposed to avoid this step. The idea is to find the pure state ϕ, closest to the ρexp measuring only those projections relevant for the correct functioning of the algorithm. This is, those that maximally differentiate each of the states resulting from the application of the QFT, on each of the 2 n initial basis states.

Fortunately, in the case of the QFT algorithm, the theoretical output state for each input basis state is separable on all qubits. Although the mixed state ρexp is generally not, we assumed the hypothesis that the error is expected to affect in such a way that the resulting state stays close to the theoretical one, and we shall discuss if this assumption proved right experimentally. We assume that a good estimate in this case is to find the reduced density matrix of ρexp in each qubit i, ρexpi, i.e., measuring the projections X,Y,Z, of this qubit, in total 3n measurements.

Once we have obtained the reduced density matrices of each qubit i, the eigenvector with the highest eigenvalue is extracted ϕi without optimization. In the case of a one qubit matrix state, the decomposition in (13), ρ^ is a pure state and is always the most aligned.

Similarly to the previous method, the unitary rotation matrices are determined for each input basis state U=U1U2...Un, that takes the state ψ to ϕ. Finally the total U c matrix is defined similarly to previous method as in Fig. 3.

As an example, the resulting unitary matrix for two qubits on IBM Q computer ibm_santiago, are shown in the next section and the results are compared to those of the first method.

4 Analyzing experimental results

The procedure will be explained for one of the basis input state of the algorithm 01, the other basis state were treated similarly.

Running the QFT algorithm in IBM Q computer ibm_santiago, we estimate the resulting probabilities of measuring the projections in all basis. The mean values are obtained from 8192 shots for each projection, and shown in Tables I and II.

Table I Experimental results for the basis input state 01 in ibm_santiago, measuring a single qubit.  

Basis 0 1
IX 4103 4089
IY 7923 269
IZ 2230 1866
XI 162 3934
YI 2274 1822
ZI 4115 4077

Table II Experimental results for the basis input state 01 in ibm_santiago, measuring two qubits.  

Basis 00 01 10 11
XX 202 120 3981 3889
XY 231 182 7266 513
XZ 158 147 4272 3615
YX 2299 2166 1874 1853
YY 4350 101 3587 154
YZ 2433 2016 2023 1720
ZX 2213 2052 2039 1888
ZY 4078 111 3875 128
ZZ 2204 1996 2167 1825

4.1 Experimental results with the isotropic index

Performing the QST on this data we obtained the experimental reconstructed density matrix for ibmq_santiago, which was deemed too large to fit this article.

The theoretical output state corresponding to input 01 is ψ01=-+y, where +y=0+i1. For this state, the pure state ϕ01 with the maximum alignment with ρexp is found:

ϕ01=0.5240.003+0.484i-0.519+0.064i-0.057-0.463i. (15)

Finally the unitary rotation matrix U 01 is calculated which maps the state ϕ01 to the output theoretical state ψ01. Similarly, the pure states ϕij obtained for the other input basis states are presented in the Table III.

Table III Optimal pure state ϕ for ibm_santiago

ϕ00 ϕ10 ϕ11
.565 0.559 0.586
.450 + 0.031i -0.480 - 0.006i -0.026 - 0.453i
.485 - 0.010i 0.534 + 0.021i -0.498
.488 - 0.063i -0.414 + 0.015 0.015 + 0.450i

This procedure was performed for the four resulting states, obtaining the four unitary transformations. Using two ancillary qubits, a unitary transformation U c is defined that controls which element of the unitary set should be applied, so that the model works for any input state. This model is shown in Fig. 3.

In order to model the decoherence, a total Depolarizing Chanel is applied on the theoretical state ψ, and the resulting state

ρDch=ω'I4+(1+ω')ψψ, (16)

is compared with the transformation of the experimental state under U:ρ'=UρexpU. Although the decoherence error generated by the computer does not have to fit with a chosen Depolarizing Channel, this simple error model does not change the alignment of the states and can estimate the effect of decoherence.

Finally in Table IV and as shown in Fig. 4, the results are compared. This comparison is done by calculating the fidelity in each step F 1, F2, F3 defined as:

F1=Fid(ρexp,ψ),F2=Fid(ρ',ψ),F3=Fid(ρ',ρDch), (17)

where ψ is the expected theoretical state and ρ'=UρexpU.

Table IV Fidelities, Eq. (??) of the second method, using 4n projections, for ibm_santiago.  

Input state F1 F2 F3
|00〉 0.87940 0.88928 0.99213
|01〉 0.90030 0.90551 0.99236
|10〉 0.87870 0.88957 0.99553
|11〉 0.88217 0.89308 0.99589

Figure 4 Fidelities Ec. (??) for the method using the isotropic index. F1 in white bar, F2 in gray bar, and F3 in black bar.  

4.2 Experimental results Using only 3n projections

In contrast with the previous method, now we look for an estimate of the state ϕ, closer to the state ρexp without the explicit representation of the density matrix, using only 3n projective measurements. Those projections are chosen so that the unitary matrix brings the state ρexp closer to the particular basis state, and as far as possible from the other three basis states. The idea is to look for the pure state that is most aligned with each of the reduced one qubit matrices. With this purpose we measured the projections X,Y,Z in each of the qubits, and found the one qubit reduced matrices. To get the pure state with most alignment, no optimization is needed, because for one qubit matrices the principal eigenvector ϕi (the eigenvector with maximal eigenvalue) is the state with most alignment, getting ϕ=ϕ1ϕ2.

Finally the desired separable unitary rotation for each basis state U=U1U2 is found, and similarly to the previous method a Depolarizing Chanel is applied on the theoretical state ψ, and the resulting state ρDch=ϵ(ψ) is compared with the transformation of the experimental state under U: ρ'=UρexpU. The fidelity between ρDch and ρ' is shown for the four input states in Table V and shown in Fig. 5.

Table V Fidelities, Eq. (??) of second method, using 3n projections, for ibmq_santiago.  

Input state F2 F3
|00〉 0.88471 0.98792
|01〉 0.90541 0.99226
|10〉 0.88857 0.99460
|11〉 0.89133 0.99426

Figure 5 Fidelities Eq. (??) for the method using 3n projections. F 1 in gray bar, F 2 in white bar, and F 3 in black bar.  

5 Conclusions

In this paper we have managed to study the performance of the Quantum Fourier Transform algorithm in a real quantum computer. The loss of information due decoherence effects, could be corrected by adding redundancy as in quantum correcting codes, but in general could be computationally expensive.

We propose two methods to model systematic errors: the first method uses the isotropic index that separates the loss of information, by decoherence, from the systematic error, that potentially could be correctable determining a unitary transformation that could correct any input state. The method needs to reconstruct the density matrix from 4 n measurements, and uses the alignment to determine the unitary correction matrix for each input basis state. Meanwhile, in the second method it is only necessary to measure 3n projections, taking advantage of the fact that the theoretical output of the QFT algorithm of each basis state, is separable in all qubits. The first method, although very expensive from a computational point of view, is more general and can be used to model systematic errors of any algorithm, the second can be only used for algorithms with separable output states as the QFT. Even though the theoretical output state of the QFT algorithm is separable, experimental errors can introduce some entanglement. Nonetheless, the experimental result is expected to be reasonably close to being separable for minor errors. As can be seen in Figs. 4 and 5, the results are very similar which seems to support this assumption.

As can be seen in these same figures, in actual IBM Q computers, the unitary errors are much less relevant than the decoherence errors. Nevertheless, this method could be used as calibration via software, using the U c matrix, once it is determined experimentally, regardless other methods are needed to correct decoherence error.

Even though this analysis shows correcting systematic errors at the current state of the art IBM Q computers is of minor importance, this models could be used to visualize (5) the weight of the different types of errors that affect quantum computation and could prove especially useful in educational contexts.

Acknowledgements

We acknowledge the use of IBM Quantum Services for this work. The views expressed are those of the authors, and do not reflect the official policy or position of IBM or the IBM Quantum team.

References

[1] A. Fonseca de Oliveira, E. Buksman, I. Cohn and J. García Lopez de Lacalle, Characterizing error propagation in quantum circuits: the Isotropic Index, Quantum Inf. Process. 16 (2017) 48, https://doi.org/10.1007/s11128-016-1507-5. [ Links ]

[2] E. Magesan, D. Puzzuoli, C. E. Granade and D. G. Cory, Modeling quantum noise for efficient testing of fault-tolerant circuits, Phys. Rev. A 87 (2013) 012324, https://doi.org/10.1103/PhysRevA.87.012324. [ Links ]

[3] L. Lao and C. G. Almudever, Fault-tolerant quantum error correction on near-term quantum processors using ag and bridge qubits, Phys. Rev. A 101 (2020) 032333, https://doi.org/10.1103/PhysRevA.101.032333. [ Links ]

[4] M. Nielsen and I. Chuang, Quantum Computation and Quantum Information, Am. J. Phys. 70 (2002) 558, https://doi.org/10.1119/1.1463744. [ Links ]

[5] P. W. Shor, Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer, SIAM J. Comput. 26 (1997) 1484, https://doi.org/10.1137/S0097539795293172. [ Links ]

[6] K. Srinivasan, S. Satyajit, B. K. Behera and P. K. Panigrahi, Efficient quantum algorithm for solving travelling salesman problem: An IBM Quantum Experience (2018). [ Links ]

[7] A. Barenco, A. Ekert, K.-A. Suominen and P. Törmä, Approximate quantum Fourier transform and decoherence, Phys. Rev. A 54 (1996) 139, https://doi.org/10.1103/PhysRevA.54.139. [ Links ]

[8] A. Martin, L. Lamata, E. Solano and M. Sanz, Digital-analog quantum algorithm for the quantum Fourier transform, Phys. Rev. Research 2 (2020) 013012, https://doi.org/10.1103/PhysRevResearch.2.013012. [ Links ]

[9] IBM Quantum, Quantum Experience (2021). https://quantum-computinig.bm.com/. [ Links ]

Received: August 26, 2021; Accepted: September 23, 2021

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License