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
Thus, all that remains is converting the term
(1 is not a prime number) into
. 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
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
, a prime number is obtained with probability
 . In this sense it can be said that the prime state
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
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
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  . 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
, 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  . The mean value of
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
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
. The difference between these two quantities
is known as the Chebyshev bias, and it is curiously positive for most values of N for which it has been calculated so far  (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
is known. For the state
created on the ibmqx 4, the experimental result for
while the theoretical expected value for
which gives a relative error of around 40% in the measurement. Other quantities that can be measured experimentally on the prime state are:
is the number of twin prime pairs
less or equal than N with p = 1 (mod 4) and
is the number of twin prime pairs
less or equal than N with p = 3 (mod 4). The sum
is equal to the number of twin prime pairs
. In analogy with the Chebyshev bias the twin prime bias is defined as
The experimental results of the measurements of operators (16) on
on the ibmqx 4 are:
while the theoretical expected values are:
which give relative errors of approximately 13% and 36% respectively.
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    , 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  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
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  ). 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.
 Nielsen, M.A. and Chuang, I.L. (2010) Quantum Computation and Quantum Information, Cambridge University Press, Cambridge. https://doi.org/10.1017/CBO9780511976667
 Mermin, N.D. (2007) Quantum Computer Science. Cambridge University Press, Cambridge. https://doi.org/10.1017/CBO9780511813870
 The IBM Quantum Experience. http://www.research.ibm.com/quantum http://www.research.ibm.com/quantum
 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. https://doi.org/10.1147/JRD.2011.2165678
 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. https://doi.org/10.1103/PhysRevA.94.012314
 Devitt, S.J. (2016) Performing Quantum Computing Experiments in the Cloud. Physical Review A, 94, arXiv:1605.05709v4.
 Berta, M., Wehner, S. and Wilde, M.M. (2016) Entropic Uncertainty and Measurement Reversibility. New Journal of Physics, 18, Article ID: 073004. https://doi.org/10.1088/1367-2630/18/7/073004
 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. https://doi.org/10.1103/PhysRevA.96.022117
 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. https://doi.org/10.1103/PhysRevA.95.052339
 Deffner, S. (2017) Demonstration of Entanglement Assisted Invariance on IBM’s Quantum Experience. Heliyon, 3, Article ID: e00444. https://doi.org/10.1016/j.heliyon.2017.e00444
 Wootton, J.R. (2017) Demonstrating Non-Abelian Braiding of Surface Code Defects in a Five Qubit Experiment. Quantum Science and Technology, 2, No. 1.
 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. https://doi.org/10.1007/s11128-017-1744-2
 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. https://doi.org/10.1016/j.physleta.2017.09.050
 Vuillot, C. (2017) Error Detection Is Already Helpful on the IBM 5Q Chip. arXiv:1705.08957.
 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. https://doi.org/10.1016/j.cpc.2017.06.011
 Behera, B.K., Banerjee, A. and Panigrahi, P.K. (2017) Experimental Realization of Quantum Cheque Using a Five-Qubit Quantum Computer. arXiv:1707.00182. https://doi.org/10.1007/s11128-017-1762-0
 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.
 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.
 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.
 Yalcinkaya, I. and Gedik, Z. (2017) Optimization and Experimental Realization of Quantum Permutation Algorithm. arXiv:1708.07900. https://doi.org/10.1103/PhysRevA.96.062339
 Wootton, J.R. and Loss, D. (2017) A Repetition Code of 15 Qubits. arXiv:1709.00990.
 Zhukov, A.A., Pogosov, W.V. and Lozovik, Y.E. (2017) Modeling Dynamics of Entangled Physical Systems with Superconducting Quantum Computer. arXiv:1710.09659.
 Roy, S., Behera, B.K. and Panigrahi, P.K. (2017) Demonstration of Entropic Noncontextual Inequality Using IBM Quantum Computer. arXiv:1710.10717.
 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. https://doi.org/10.1103/PhysRevLett.69.2881
 Mermin, N.D. (2002) Deconstructing Dense Coding. Physical Review A, 66, Article ID: 032308. https://doi.org/10.1103/PhysRevA.66.032308
 Bell, J.S. (1964) On the Einstein, Podolsky, Rosen Paradox. Physics, 1, 195-200. https://doi.org/10.1103/PhysicsPhysiqueFizika.1.195
 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.
 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. https://doi.org/10.1103/PhysRevLett.23.880
 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
 Mermin, N.D. (1990) Extreme Quantum Entanglement in a Superposition of Macroscopically Distinct States. Physical Review Letters, 65, 1838-1840. https://doi.org/10.1103/PhysRevLett.65.1838
 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 , and with the fact that no improvement has been obtained for the 3-qubit case.
 Latorre, J.I. and Sierra, G. (2014) Quantum Computation of Prime Number Functions. Quantum Information and Computation, 14, Article ID: 0577.
 Latorre, J.I. and Sierra, G. (2015) There Is Entanglement in the Primes. Quantum Information and Computation, 15, 622-676.
 The error has been calculated as in Bell’s inequality.
 Rubinstein, M. and Sarnak, P. (1994) Chebyshev’s Bias. Exp. Math., 3, 173-197. https://doi.org/10.1080/10586458.1994.10504289
 Preskill, J. (2013) Quantum Computing and the Entanglement Frontier. Bull. Am. Phys. Soc., 58, arXiv:1203.5813.