This project presents the development and deployment of a Quantum Random Number Generator (QRNG) API utilizing Qiskit, an open-source quantum computing software development framework by IBM. Random number generation is a critical component in various applications such as cryptography, simulations, and gaming. Traditional methods of generating random numbers rely on classical algorithms that can be predictable and lack true randomness. Quantum mechanics offers a fundamentally different approach to randomness, providing numbers that are truly random and secure.
- Quantum Random Number Generation: Leverage quantum mechanics to generate true random numbers.
- Qiskit Integration: Utilize IBM's Qiskit framework for creating and executing quantum circuits.
- Scalable Deployment: Deploy the API using Google Cloud Run for automatic scaling based on demand.
- Containerization: Ensure portability and ease of deployment with Docker.
- Simple RESTful Interface: Access the QRNG API via a straightforward RESTful interface.
- Quantum Computing: IBM Qiskit
- Containerization: Docker
- Cloud Platform: Google Cloud Run
- Programming Language: Python
- Serve locally:
- Python 3.10 or higher
- Pip v22 or higher
- requirements from requirements.txt
- Use congirued service:
- Browser
- Python 3.10 or higher
- Clone the repository
git clone https://github.com/farawaystars-sam/qrng-api.git cd qrng-api/test_scripts
- Run the test scripts
run the scripts to test the endpoints, locally and use the local host url. Modify the parameters to your preference.
python3.10 test*.py
Similar to running locally, clone and navigate to the test scripts, and simply uncomment the cloud url lines. Play around with the parameters to the end points.
or
Use bash command:
curl -X GET "https://qrng-api-v001-wmoc4p3wpa-uc.a.run.app/random_bit_string?n=<your-n-value>"
curl -X GET "https://qrng-api-v001-wmoc4p3wpa-uc.a.run.app/random_int?max=<your-max-value>&min=<your-min-value>"
or
Use browser to browse the link:
- https://qrng-api-v001-wmoc4p3wpa-uc.a.run.app/random_bit_string?n=
- https://qrng-api-v001-wmoc4p3wpa-uc.a.run.app/random_int?max=&min=
For further help required read Help/doc.md file.
- Literature:
- Partial Loopholes Free Device Independent Quantum Random Number Generator Using IBM’s Quantum Computers, [link] (https://arxiv.org/pdf/2309.05299)
- and others
- Youtube:
- Follow this link.
If you wish to contribute towards this project, Please feel free to fork the repository and initiate a pull request.
For any questions or inquiries, please reach out at [farawaystars-sam@github.com].