Quantum random numbers
Project description
Quantum random numbers in Python
This package brings the ANU quantum random numbers to Python.
The default pseudo-random generator in Python is replaced by calls to the ANU API that serves real quantum random numbers.
pip install quantum-random
Just import qrandom
and use it like you'd use the
standard Python random module. For example,
>>> import qrandom
>>> qrandom.random()
0.15357449726583722
>>> qrandom.sample(range(10), 2)
[6, 4]
>>> qrandom.gauss(0.0, 1.0)
-0.8370871276247828
Supports Python 3.6+.
To run the tests locally, you will need poetry and Python 3.6-3.9.
poetry install
poetry shell
tox
This notebook shows the distribution in [0.0, 1.0) obtained
by calling qrandom.random()
10,000 times and checks for uniformity
using a Kolmogorov-Smirnov test.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
quantum-random-0.1.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for quantum_random-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95c54dd62391a34622dfe352824d92685f60bde4c8a5d58a3af9e30268eec927 |
|
MD5 | 27f5b9ddab538664ba7601d4c23b6cd2 |
|
BLAKE2b-256 | c55c0cb68fb177fe723f02033ad6260c149b2abd4cec8fabdb14920cf87048f8 |