Giter Club home page Giter Club logo

quantis_rand's Introduction

Table of Contents

  1. Dependencies
  2. Setup
    1. Locally
  3. Use
  4. Limitations, TODOs:
  5. License:
  6. Acknowledgments

This is the description of quantis_rand, a Python module for the Quantis USB Legacy quantum random generator.

This package is a quick solution to use Quantis USB Legacy quantum random generator in my projects. It is a simple interface to the software libraries available for the device, enabling the call of the functions of the supplied API from Python.

It might be useful for others, but it is written to meet limited requirements of certain research projects. No warranty, use at your own risk.

Dependencies

The package has only been tested on an Ubuntu 18.04.6 LTS system.

It needs the libraries and includes from Quantis, which was kindly provided by IdQuantique upon request in a file named QuantisRNG-20.2.3-Linux-amd64.tar.bz2. This package had 3 subdirectories:

  • lib64: copy its contents to /usr/local/bin
  • include: copy its contents to /usr/local/include
  • bin: it is the supplied GUI application, not needed for this package.

The packages libusb-1.0-0-dev and libusb-1.0-0 are also needed; install these with apt.

Having completed these steps, the package can be installed.

Setup

Locally

./setup.py build
./setup.py install

Use

We assume that a single random generator is plugged in to the USB port of the computer and it has been set up properly. (Permissions are set, etc.; if the supplied GUI works then it is probably the case.)

After importing the package:

import quantis_rand

the following functions can be used:

  • quantis_rand.drandom
  • quantis_rand.random
  • quantis_rand.scaled_double
  • quantis_rand.scaled_int
  • quantis_rand.randint
  • quantis_rand.randshort
  • quantis_rand.scaled_float
  • quantis_rand.scaled_short

Most of them come from the device's official API (the present package just makes API calls and translates between C++ an Python). Their names are also self-explanatory. Help is available for each command in the standard way, e.g.

help(quantis_rand.scaled_float)

Limitations, TODOs:

The library works for a single USB device of the given kind. Could be extended to support various USB configs and other devices that can be used with the same package. It could be tested on more platforms.

License:

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Acknowledgments

This package has been developed as a part of a project financed by the National Research, Development, and Innovation Office of Hungary under project number K124351 and K133882, including the purchase of the random generator device.

quantis_rand's People

Contributors

kmatyas-wig avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.