File Exchange

image thumbnail

Quantum random number generator

version 1.0.0 (2.75 KB) by gorka zubia
This code returns the chosen "n" amount of random numbers, which are obtained in real time from the ANU Quantum Random Numbers Server


Updated 23 Sep 2019

View License

This function returns an array with "n" REAL RANDOM NUMBERS with values between [1-"n"] and NO REPETITION.
These random numbers are generated in real time (Internet connection is needed) from the Australian National University's Quantum Random Numbers Server.
The returned numbers can be "uint8" (0 to 255) or "uint16" (0 to 65,535) type of intergers. For example, in order to get 200 random numbers, "uint8" data type option (quantumRandomGenerator(200,'uint8')) will retrieve the random numbers faster than the "uint16" option (quantumRandomGenerator(200,'uint16')).

The function needs a random time to retrieve the asked array of numbers. As an illustration, approximatly it needs 1 minute to return 4216 true random numbers with no repetiton.

Cite As

gorka zubia (2020). Quantum random number generator (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux