Qrangen

所属分类:系统/网络安全
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2022-12-08 05:10:08
上 传 者sh-1993
说明:  Qiskit Hackathon量子随机数发生器项目,
(Quantum Random Number Generator project for Qiskit Hackathon,)

文件列表:
LICENSE (11357, 2019-05-26)
app.py (1590, 2019-05-26)
benchmark_app.py (1601, 2019-05-26)
example_key.json (36, 2019-05-26)
requirements.txt (1590, 2019-05-26)
src/ (0, 2019-05-26)
src/benchmark.py (1816, 2019-05-26)
src/executor.py (706, 2019-05-26)
src/generator.py (1007, 2019-05-26)
src/interpreter.py (373, 2019-05-26)
src/models/ (0, 2019-05-26)
src/models/circuit.py (323, 2019-05-26)
src/models/device.py (1469, 2019-05-26)
truerandom2 (7, 2019-05-26)
utils/ (0, 2019-05-26)
utils/graphics.py (1280, 2019-05-26)
utils/math.py (1166, 2019-05-26)

# Qrangen [Quantum Random Generator] This project aims to build an easy-to-use application for generation of random numbers using measurements over Quantum circuits. This measurements are requested to Q-IBM servers. ## Setting up In order to do your own simulations with IBM servers, you need to obtain a personal token (See Qiskit Documentation for more info). Once you have this key, it needs to be stored in a file named `key.json` with the following structure: ``` { "api_token": } ``` A sample of this structure can be found in `example_key.json`. ## Usage In order to run the generator, one should clone this repo, install the requirement packages in a Python environment, set a personal token and run `app.py`: ``` python app.py --mode 2 --number_amount 70 -bits 4 ``` where `mode` flag is set to 2 in order to run in IBM servers and not in local (0), `number_amount` is the amount of numbers one wants to get and `bits` refers to the number of qubits used in the simulation (output numbers range from 0 to 2^{bits-1}). There is also a benchmark feature, where some randomness comparaison is performed. By running ``` python benchmark_app.py --mode 2 --number_amount 70 -bits 4 ``` numpy pseudo-random number are generated as well. Different statistical moments of the distributions are compared. ## License [Apache License 2.0](https://github.com/esloho/Qrangen/blob/master/LICENSE)

近期下载者

相关文件


收藏者