https://github.com/pedrorrivero/qrand
A multiprotocol and multiplatform quantum random number generation framework
Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org, nature.com, zenodo.org -
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.9%) to scientific vocabulary
Keywords
Repository
A multiprotocol and multiplatform quantum random number generation framework
Basic Info
- Host: GitHub
- Owner: pedrorrivero
- License: apache-2.0
- Language: Python
- Default Branch: master
- Homepage: https://pypi.org/project/qrand/
- Size: 578 KB
Statistics
- Stars: 27
- Watchers: 4
- Forks: 14
- Open Issues: 17
- Releases: 0
Topics
Metadata Files
README.md
qrand
A multiprotocol and multiplatform quantum random number generation framework
Random numbers are everywhere.
Computer algorithms, data encryption, physical simulations, and even the arts use them all the time. There is one problem though: it turns out that they are actually very difficult to produce in large amounts. Classical computers can only implement mathematical tricks to emulate randomness, while measuring it out of physical processes turns out to be too slow. Luckily, the probabilistic nature of quantum computers makes these devices particularly useful for the task.
QRAND is a free and open-source framework for quantum random number generation. Thanks to its loosely coupled design, it offers seamlessly compatibility between different quantum computing platforms and QRNG protocols. Not only that, but it also enables the creation of custom cross-compatible protocols, and a wide range of output formats (e.g. bitstring, int, float, complex, hex, base64).
To boost its efficiency, QRAND makes use of a concurrent cache to reduce the number of internet connections needed for random number generation; and for quality checks, it incorporates a suite of classical entropy validation tests which can be easily plugged into any base protocol.
Additionally, QRAND introduces an interface layer for NumPy that enables the efficient production of quantum random numbers (QRN) adhering to a wide variety of probability distributions. This is ultimately accomplished by transforming uniform probability distributions produced in cloud-based real quantum hardware, through NumPy's random module.
```python3 from qrand import QuantumBitGenerator from qrand.platforms import QiskitPlatform from qrand.protocols import HadamardProtocol from numpy.random import Generator from qiskit import IBMQ
provider = IBMQ.load_account() platform = QiskitPlatform(provider) protocol = HadamardProtocol() bitgen = QuantumBitGenerator(platform, protocol) gen = Generator(bitgen)
print(f"Random Raw: {bitgen.randomraw()}") print(f"Random Bitstring: {bitgen.randombitstring()}") print(f"Random Unsigned Int: {bitgen.randomuint()}") print(f"Random Double: {bitgen.randomdouble()}")
print(f"Random Binomial: {gen.binomial(4, 1/4)}") print(f"Random Exponential: {gen.exponential()}") print(f"Random Logistic: {gen.logistic()}") print(f"Random Poisson: {gen.poisson()}") print(f"Random Std. Normal: {gen.standard_normal()}") print(f"Random Triangular: {gen.triangular(-1, 0, 1)}")
...
```
Supported quantum platforms
As of June 2021, QRAND supports Qiskit and Q#. However, support for Cirq is under active development.
Implemented QRNG protocols
As of June 2021, both the basic HadamardProtocol, and the more sophisticated EntanglementProtocol are available. We are also working on implementing a version of Google's Sycamore routine (patent permitting).
Authors and citation
QRAND is the work of many people who contribute to the project at different levels. If you use QRAND, please cite as per the included BibTeX file.
Contribution guidelines
If you'd like to contribute to QRAND, please take a look at the contribution guidelines. This project adheres to the following code of conduct. By participating, you are expected to uphold this code.
We use GitHub issues for tracking requests and bugs. Please use Unitary Fund's Discord for discussion and simple questions.
Acknowledgements
Parts of this software's source code have been inspired or borrowed from the qRNG project, which is licensed under the GNU GPLv3 license. Copyright notice and specific changes can be found as a docstring wherever this applies.
License
(c) Copyright 2021 Pedro Rivero
Owner
- Name: Pedro Rivero
- Login: pedrorrivero
- Kind: user
- Location: New York, USA / Madrid, Spain
- Company: IBM Research
- Website: www.linkedin.com/in/pedrorrivero/
- Repositories: 3
- Profile: https://github.com/pedrorrivero
Quantum Developer | Error mitigation
GitHub Events
Total
- Watch event: 4
Last Year
- Watch event: 4
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 278
- Total Committers: 3
- Avg Commits per committer: 92.667
- Development Distribution Score (DDS): 0.097
Top Committers
| Name | Commits | |
|---|---|---|
| Pedro Rivero | p****z@g****m | 251 |
| Avhijit Nair | a****0@v****n | 21 |
| vishnu | v****h@g****m | 6 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 22
- Total pull requests: 10
- Average time to close issues: 16 days
- Average time to close pull requests: 1 day
- Total issue authors: 6
- Total pull request authors: 4
- Average comments per issue: 2.77
- Average comments per pull request: 0.8
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- pedrorrivero (15)
- LaurentAjdnik (2)
- 1ucian0 (2)
- Avhijit-codeboy (1)
- praveentn (1)
- gatorwatt (1)
Pull Request Authors
- charmerDark (6)
- Avhijit-codeboy (2)
- harry-stark (1)
- LaurentAjdnik (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 32 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 15
- Total maintainers: 1
pypi.org: qrand
A multiprotocol and multiplatform quantum random number generation framework
- Homepage: https://github.com/pedrorrivero/qrand
- Documentation: https://qrand.readthedocs.io/
- License: Apache-2.0
-
Latest release: 0.4.0
published over 4 years ago
Rankings
Maintainers (1)
Dependencies
- 103 dependencies
- black ^20.8b1 develop
- cirq ^0.10.0 develop
- commitizen ^2.17.7 develop
- data-science-types ^0.2.20 develop
- isort ^5.6.4 develop
- mypy ^0.790 develop
- pre-commit ^2.7.1 develop
- pytest ^6.1.1 develop
- pytest-cov ^2.10.1 develop
- qiskit-aer ^0.8.2 develop
- qiskit-ibmq-provider 0.12.3 develop
- qiskit-terra ^0.17.2 develop
- qsharp ^0.15.2103 develop
- cirq ^0.10.0
- numpy ^1.19.4
- python ^3.9
- qiskit-aer ^0.8.2
- qiskit-ibmq-provider 0.12.3
- qiskit-terra ^0.17.2
- qsharp ^0.15.2103
- randomgen ^1.19.3