1 2 ( | 010 + | 011 + | 101 + | 111 ) ,

can be created with the circuit shown in Figure 14.

The X gate acting on the first qubit ensures that all number states in the superposition created with the two Hadamard gates are odd: after these three gates have acted, the system is in the state

| ψ = 1 2 ( | 001 + | 011 + | 101 + | 111 ) .

Thus, all that remains is converting the term | 001 (1 is not a prime number) into | 010 . This is achieved with the help of a Toffoli gate and a cNOT.

After implementing the circuit of Figure 14 for creating the prime state | p 3 on the ibmqx4, a joint measurement of the three qubits in the computational basis was carried out in order to assess the overall performance of the circuit. The results are shown in Figure 15.

The results show that, upon measurement of the purported prime state | p 3 , a prime number is obtained with probability 72.5 ± 0.7 % [34] . In this sense it can be said that the prime state | p 3 has been constructed with an approximated accuracy of 73%.

The interest in constructing prime states (something that can in principle be done efficiently using Grover’s algorithm with a primality test as oracle) is that

Figure 14. Circuit that creates the prime state | p 3 on the three uppermost qubits using an ancilla.

Figure 15. Mean probability outcomes of joint measurements in the computational basis of the three qubits of the purported prime state | p 3 after 5 runs of 8192 shots on the 5-qubit IBM quantum computer (ibmqx4), using qubits 2, 1, 0 (standard deviations are not shown for the sake of clarity).

they would allow to experimentally test, for instance, Riemann hypothesis?one of the mathematical problems of the millennium [33] . But in order to falsify Riemann hypothesis (or extend the limits of its validity) it is necessary to build superposition states of billions of prime numbers. Constructing the state | p 3 , even if this is not done by a general method for creating prime states, thus seems a modest first step.

Moreover, there exist a number of quantities in Number Theory that can surprisingly be measured experimentally on prime states [32] . The mean value of σ z 1 is:

σ z 1 = π 4 , 1 ( N ) π 4 , 3 ( N ) 1 π ( N ) , (13)

where π 4 , 1 ( N ) is the number of primes less or equal than N that can be written as 4 m + 1 with m a positive integer (i.e. that are equal to 1 (mod 4)) and π 4 , 1 ( N ) is the number of primes less or equal than N that can be written as 4m + 3 with m a non-negative integer (i.e. that are equal to 3 (mod 4)). Thus π ( N ) = π 4 , 1 ( N ) + π 4 , 3 ( N ) + 1 . The difference between these two quantities Δ ( N ) π 4 , 3 ( N ) π 4 , 1 ( N ) is known as the Chebyshev bias, and it is curiously positive for most values of N for which it has been calculated so far [35] (the name is due to Pafnuty Chebyshev, who first noticed that the remainder upon dividing the primes by 4 gives 3 more often than 1).

Therefore, measuring the second qubit in the computational basis, and taking an outcome 0 as a 1 and an outcome 1 as a −1 when computing the mean value, give the Chebyshev bias, provided that π ( N ) is known. For the state | p 3 created on the ibmqx 4, the experimental result for σ z 1 obtained is:

σ z 1 e x p = 0.301 ± 0.007, (14)

while the theoretical expected value for σ z 1 is:

σ z 1 t h = 0.500, (15)

which gives a relative error of around 40% in the measurement. Other quantities that can be measured experimentally on the prime state are:

σ x 1 = 2 π 2 ( 1 ) ( N ) π ( N ) , σ x 1 σ x 2 + σ y 1 σ y 2 = 4 π 2 ( 3 ) ( N ) π ( N ) , (16)

where π 2 ( 1 ) ( N ) is the number of twin prime pairs ( p , p + 2 ) less or equal than N with p = 1 (mod 4) and π 2 ( 3 ) ( N ) is the number of twin prime pairs ( p , p + 2 ) less or equal than N with p = 3 (mod 4). The sum π 2 ( 1 ) ( N ) + π 2 ( 3 ) ( N ) is equal to the number of twin prime pairs π 2 ( N ) . In analogy with the Chebyshev bias the twin prime bias is defined as Δ 2 ( N ) = π 2 ( 3 ) ( N ) π 2 ( 1 ) ( N ) .

The experimental results of the measurements of operators (16) on | p 3 on the ibmqx 4 are:

σ x 1 e x p = 0.435 ± 0.006, σ x 1 σ x 2 + σ y 1 σ y 2 e x p = 0.641 ± 0.022, (17)

while the theoretical expected values are:

σ x 1 t h = 0.500, σ x 1 σ x 2 + σ y 1 σ y 2 t h = 1.000 , (18)

which give relative errors of approximately 13% and 36% respectively.

3. Conclusions

The time of Quantum Computation has come. Quantum-computer prototypes have already been constructed and some of them are even available on the cloud, thanks to the IBM Quantum Experience. This allows performing experiments and assessing the functioning of these first quantum computers. In the present work, the protocol of dense coding was completed using superconducting qubits for the first time, with efficiencies around 74% in the worst case. Quantum Fourier transforms have also been implemented; although QFTs were used in [6] [15] [20] , they were not performed on states of more than two qubits due to previous limitations of the IBM Quantum Experience. Moreover, the performance of QFTs on the IBM 5Q has never been assessed explicitly before. The original Bell’s inequality and Mermin’s inequalities up to n = 5 were checked and shown to violate Local Realism, with an improvement with respect to the results found in [5] that we interpret as a reflection of the improvements of the IBM quantum computers during the last months. Finally, the construction of the prime state | p 3 has been carried out, which constitutes the first experimental realization of a prime state. Overall, the results obtained in these experiments, although moderately good in most cases, are still far from optimum.

Therefore, in light of these results, it is clear that there is still a lot of work to be done before a quantum computer can actually be useful for solving mathematical problems, simulating efficiently quantum systems, breaking classical encryption systems, etc. (in other words, fully achieve so-called quantum supremacy [36] ). But given the astounding pace at which technological developments are being push forward, it seems that the dream of building a functional universal quantum computer within the next twenty years is close. Even more when one takes into account that it is likely (or at least plausible) that the full power of IBM quantum computers has not been shown yet for commercial reasons and thus it is not exhibited by the chips of the IBM Quantum Experience.

With no known fundamental obstacles on the way, quantum computers will surely end up being a reality in research centres all around the world. And, as it happens every time a new regime of Nature becomes experimentally available, a plethora of new discoveries will certainly accompany this “Second Quantum Revolution”. Meanwhile, proofs of principle like the ones presented here for several quantum circuits will be useful to help improving the systems.


We thank J.I. Latorre and D. Alsina for useful conversations. We also thank the IBM Quantum Experience for the use of the ibmqx2 and ibmqx4. G.S. acknowledges the grants FIS2015-69167-C2-1-P from the Spanish government, QUITEMAD+S2013/ICE-2801 from the Madrid regional government and SEV-2016-0597 of the Centro de Excelencia Severo Ochoa Programme.

Cite this paper
García-Martín, D. and Sierra, G. (2018) Five Experimental Tests on the 5-Qubit IBM Quantum Computer. Journal of Applied Mathematics and Physics, 6, 1460-1475. doi: 10.4236/jamp.2018.67123.
[1]   Nielsen, M.A. and Chuang, I.L. (2010) Quantum Computation and Quantum Information, Cambridge University Press, Cambridge.

[2]   Mermin, N.D. (2007) Quantum Computer Science. Cambridge University Press, Cambridge.

[3]   The IBM Quantum Experience.

[4]   Steffen, M., DiVincenzo, D.P., Chow, J.M., Theis, T.N. and Ketchen, M.B. (2011) Quantum Computing: An IBM Perspective. Ibm Journal of Research and Development, 55, Paper 13.

[5]   Alsina, D. and Latorre, J.I. (2016) Experimental Test of Mermin Inequalities on a Five Qubit Quantum Computer. Physical Review A, 94, Article ID: 012314.

[6]   Devitt, S.J. (2016) Performing Quantum Computing Experiments in the Cloud. Physical Review A, 94, arXiv:1605.05709v4.

[7]   Berta, M., Wehner, S. and Wilde, M.M. (2016) Entropic Uncertainty and Measurement Reversibility. New Journal of Physics, 18, Article ID: 073004.

[8]   Rundle, R.P., Mills, P.W., Tilma, T., Samson, J.H. and Everitt, M.J. (2017) Quantum Phase Space Measurement and Entanglement Validation Made Easy. Physical Review A, 96, Article ID: 022117.

[9]   Hebenstreit, M., Alsina, D., Latorre, J.I. and Kraus, B. (2017) Compressed Quantum Computation Using a Remote Five-Qubit Quantum Computer. Physical Review A, 95, Article ID: 052339.

[10]   Deffner, S. (2017) Demonstration of Entanglement Assisted Invariance on IBM’s Quantum Experience. Heliyon, 3, Article ID: e00444.

[11]   Wootton, J.R. (2017) Demonstrating Non-Abelian Braiding of Surface Code Defects in a Five Qubit Experiment. Quantum Science and Technology, 2, No. 1.

[12]   Sisodia, M., Shukla, A., Thapliyal, K. and Pathak, A. (2017) Design and Experimental Realization of an Optimal Scheme for Teleportation of an n-Qubit Quantum State. Quantum Information Processing, 16, 292.

[13]   Sisodia, M., Shukla, A. and Pathak, A. (2017) Experimental Realization of Nondestructive Discrimination of Bell States Using a Five-Qubit Quantum Computer. Physics Letters A, 381, 3860-3874.

[14]   Vuillot, C. (2017) Error Detection Is Already Helpful on the IBM 5Q Chip. arXiv:1705.08957.

[15]   Michielsen, K., Nocon, M., Willsch, D., Jin, F., Lippert, T. and De Raedt, H. (2017) Benchmarking Gate-Based Quantum Computers. Computer Physics Communications, 220, 44-55.

[16]   Behera, B.K., Banerjee, A. and Panigrahi, P.K. (2017) Experimental Realization of Quantum Cheque Using a Five-Qubit Quantum Computer. arXiv:1707.00182.

[17]   Kalra, A.R., Prakash, S., Behera, B.K. and Panigrahi, P.K. (2017) Experimental Demonstration of the No Hiding Theorem Using a 5 Qubit Quantum Computer. arXiv:1707.09462.

[18]   Ghosh, D., Agarwal, P., Pandey, P., Behera, B.K. and Panigrahi, P.K. (2017) Automated Error Correction in IBM Quantum Computer and Explicit Generalization. arXiv:1708.02297.

[19]   Manabputra, G.S., Behera, B.K. and Panigrahi, P.K. (2017) Generalization and Partial Demonstration of an Entanglement Based Deutsch-Jozsa Like Algorithm Using a 5-Qubit Quantum Computer. arXiv:1708.06375.

[20]   Yalcinkaya, I. and Gedik, Z. (2017) Optimization and Experimental Realization of Quantum Permutation Algorithm. arXiv:1708.07900.

[21]   Wootton, J.R. and Loss, D. (2017) A Repetition Code of 15 Qubits. arXiv:1709.00990.

[22]   Zhukov, A.A., Pogosov, W.V. and Lozovik, Y.E. (2017) Modeling Dynamics of Entangled Physical Systems with Superconducting Quantum Computer. arXiv:1710.09659.

[23]   Roy, S., Behera, B.K. and Panigrahi, P.K. (2017) Demonstration of Entropic Noncontextual Inequality Using IBM Quantum Computer. arXiv:1710.10717.

[24]   Bennett, C.H. and Wiesner, S.J. (1992) Communication via One- and Two-Particle Operators on Einstein-Podolsky-Rosen States. Physical Review Letters, 69, 2881-2884.

[25]   Mermin, N.D. (2002) Deconstructing Dense Coding. Physical Review A, 66, Article ID: 032308.

[26]   Bell, J.S. (1964) On the Einstein, Podolsky, Rosen Paradox. Physics, 1, 195-200.

[27]   The errors have been calculated assuming the statistical independence of the variables summed: therefore, the variances have been added and then the square root was taken to obtain the standard deviation of the sum.

[28]   Clauser, J.F., Horne, M.A., Shimony, A. and Holt, R.A. (1969) Proposed Experiment to Test Loal Hidden-Variable Theories. Physical Review Letters, 23, 880-884.

[29]   The IBM Quantum Experience.
https://quantumexperience.ng.bluemix.net/qx/tutorial?sectionId=full-user-guide&page=003-Multiple_Qubits_Gates_and_Entangled_States2F050-Entanglement_and_Bell_TestsFull User’s Guide/Entanglement and Bell Tests

[30]   Mermin, N.D. (1990) Extreme Quantum Entanglement in a Superposition of Macroscopically Distinct States. Physical Review Letters, 65, 1838-1840.

[31]   In particular, we believe that the improvements in the violation of Mermin’s inequalities are due to the availability of cNOTs among qubits 1,0 and 3,4, which were not present at the time Alsina and Latorre obtained their results. This interpretation is consistent with the fact that gate errors, readout errors, and decoherence and relaxation times were similar in the present work and in [5], and with the fact that no improvement has been obtained for the 3-qubit case.

[32]   Latorre, J.I. and Sierra, G. (2014) Quantum Computation of Prime Number Functions. Quantum Information and Computation, 14, Article ID: 0577.

[33]   Latorre, J.I. and Sierra, G. (2015) There Is Entanglement in the Primes. Quantum Information and Computation, 15, 622-676.

[34]   The error has been calculated as in Bell’s inequality.

[35]   Rubinstein, M. and Sarnak, P. (1994) Chebyshev’s Bias. Exp. Math., 3, 173-197.

[36]   Preskill, J. (2013) Quantum Computing and the Entanglement Frontier. Bull. Am. Phys. Soc., 58, arXiv:1203.5813.