Skip to content

An open-source package designed to generate random numbers using quantum entropy sources. This library leverages the principles of quantum mechanics to generate truly random numbers, which are fundamental to many areas of science and technology, including cryptography, simulation, and modeling.

License

Notifications You must be signed in to change notification settings

Constantine-Quantum-Tech/cqt_rng

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CQTech

cqt_rng

Version License License

cqt_rng is an open-source package designed to generate random numbers using quantum entropy sources. This library leverages the principles of quantum mechanics to generate truly random numbers, which are fundamental to many areas of science and technology, including cryptography, simulation, and modeling.

Installation

You can install cqt_rng from pip using

pip install --upgrade cqt_rng

Usage

To start generating random numbers, you need to pick an entropy source and a post-processor. There are 3 simulated quantum entropy sources:

  • BosonSampler
  • UniversalQCSampler
  • ShiSFSampler

And 2 real quantum entropy sources:

  • BorealisSampler
  • IBMQSampler

We also implemented three postprocessors:

  • VonNeumannPP
  • CQTPP
  • NoPostProcess

Once you have chosen you entropy source and post-processor, you just need 2 lines of code (without counting the imports 😅) to generate random numbers:

from cqt_rng import RNG
from cqt_rng.post_processors import VonNeumannPP
from cqt_rng.entropy_sources import BosonSampler

rng = RNG(BosonSampler(), VonNeumannPP())
rng.generate(length = 1024)

You can also use your custom entropy sources by implementing them as subclasses of the abstract class EntropySource, and also implement your own postprocessors as subclasses of the abstract class PostProcessor.

For more example, please refer to the documentation.

License

Copyright © 2022-2023, Constantine Quantum Technologies. Released under the Apache License 2.0.

About

An open-source package designed to generate random numbers using quantum entropy sources. This library leverages the principles of quantum mechanics to generate truly random numbers, which are fundamental to many areas of science and technology, including cryptography, simulation, and modeling.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages