Quantum Random Number Generator

From Quantum Protocol Zoo
Jump to: navigation, search

Generating random number of the one of the most important goals of computer scientist because of its wide range of applications such as scientific simulations, lotteries, physics tests and of course CRYPTOGRAPHY. QRNGs use quantum mechanical effects to generate random numbers and have applications that range from simulation to cryptography. QRNGs are also used for quantum protocols such as BB84 Quantum Key Distribution and device independent quantum internet protocols. Random number are generated by classic computers are not secure enough even generating randomly. Because of this reason we need to generate quantum random numbers.

Randomness is a fundamental feature of quantum mechanics, therefore quantum processes can be used to manipulate randomness sources in ways that classical methods cannot. Moreover, quantum solutions exist to games that classically are not solvable. By combining these features, it is possible to amplify weak sources of randomness and expand strong sources of randomness in a manner which provides guarantees against hidden dishonesty and eavesdropping.

Tags: Building Blocks, Quantum Functionality, Specific Task, Entanglement Distribution


Aim of QRNG is producing unpredictable and securest number. It has three main steps.

  • State Prepaparation: Create a new qubit. This step similar to fishing a coin.
  • Apply a Hadamard gate for putting it into a superposition of equal probability of being 0 and 1. This step can be equal that tossing a coin in air.
  • Measurement: This is the final step and now we can learn now the coin's result like head or tail

Use Case[edit]

Randomness expansion is useful in the case where one already has access to a private source for true randomness, but whose use is prohibitively expensive or whose access is limited. This is not possible classically.

In a similar vein, it is only possible to extract uniform, private randomness by combining multiple weak sources together classically. Randomness amplification enables the extraction of such randomness from only a single weak source - useful in any situation where only some randomness has been provided but absolute security is required.



  • number of random numbers generated


  • Quantum random number generators are produced by measurement of quantum states and provide perfectly unpredictable and private random numbers.
  • For generating quantum random number, properties of quantum mechanics rules are used so they are resistant aganist unconventional environmental conditions

Protocol Description[edit]

Click here for SimulaQron code

Click here for Python code

  1. For i=1,...,n
    1. create a fresh qubit
    2. apply Hadamard gate
    3. measure qubit


  1. Collantes and Escartin (2016)
  2. Ma et al (2016)
contributed by Gözde Üstün and Neil Mcblane