QoalaRandom is a quantum powered random number generator.
Produced by Qoalas @ iQuHack 2023
Installation
The best way of installing qoalarandom is by using pip
$ pip install -i https://test.pypi.org/simple/ qoalarandom
Using Qoala Random
randint(start, stop, distribution=1)
Parameters:
-
start (int)
-
stop (int)
-
distribution (int, default=1 (uniform distribution))
distribution is the index of the distribution type desired. See more in distribution options.
Returns: A random integer between start and stop
randrange(start, stop, step=1, distribution=1)
Parameters:
-
start (int)
-
stop (int)
-
step (int, default=1)
-
distribution (int, default=1 (uniform distribution))
distribution is the index of the distribution type desired. See more in distribution options.
Returns: A random integer between start and stop incrementing by step
randfloat(start, stop, distribution=1)
Parameters:
-
start (int)
-
stop (int)
-
distribution (int, default=1 (uniform distribution))
distribution is the index of the distribution type desired. See more in distribution options.
Returns: A random float between start and stop
randchoice(user_list, distribution=1)
Parameters:
-
user_list (list)
-
distribution (int, default=1 (uniform distribution))
distribution is the index of the distribution type desired. See more in distribution options.
Returns: A random element of user_list
Distribution Options
0 = normal
To extract the random numbers from a normal distribution (centred at 0, variance = 1)
1 = uniform
To extract the random numbers from a uniform distribution
2 = porterthomas
To extract the random numbers from a Porter-Thomas distribution
3 = deeprandom
To fully take advantage of the quantum circuit, creating a circuit that exploit statistical propertier of dual-unitary circuits to generate a number extracted uniformly from the Haar distribution (approximated according to the amount of resources requested to the QPU)
Metadata
Release files for qoalarandom 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| qoalarandom-1.0.5.tar.gz | 6.6 kB | Without provenance | Details |
Release files / qoalarandom-1.0.5.tar.gz
| Download URL | qoalarandom-1.0.5.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc65944b3570fc54d4bb1514b3f59c67ba2e327fbb3628effc0ac89b63a250e3
|
|
BLAKE2b-256 checksum How to use checksums |
f50f4c22c84e3d9e2b68dee5bea991ffcde337dcdd538d6ea0434e5480e42f9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.7
|
Security for qoalarandom 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.