A quantum circuit to generate random numbers within a specific interval
Informatics Department, University of Almería, Almería, Spain
2 Institute of Data Science and Digital Technologies, Vilnius University, Vilnius, Lithuania
Accepted: 17 May 2023
Published online: 25 May 2023
Random numbers are of vital importance in fields such as cyptography and scientific simulations. However, it is well known how difficult it is for classical computers to generate random numbers. This is not the case for quantum computers, which are able to genuinely generate random numbers thanks to the property of superposition and their counter-intuitive concept of measurement. However, despite the simplicity of designing a circuit that generates a random number between 0 and (being N the number of available qubits), designing a quantum circuit to generate a number within a specific interval is far from trivial. This paper proposes a customizable circuit design to generate random numbers. The circuit is non- hardware dependent, it allows fault-tolerance, and it can be used by current quantum devices. Therefore, it is a valuable tool for all those quantum applications and algorithms that need to work with random numbers. Moreover, a comparator circuit has also been designed as part of this work. This comparator is the best currently available in the literature in terms of qubits, T-count, and T-depth. It is therefore a useful tool for any other circuit or algorithm where this operation is needed.
Key words: Quantum random numbers / Random number generation / Quantum computing / Quantum circuit / Quantum comparator / Clifford + T gates
© The Author(s) 2023
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.