Code Monkey home page Code Monkey logo

randomsys's Introduction

randomsys

Join the chat at https://gitter.im/rsvp/randomsys

We study the behavior of random systems algorithmically.

Generating truly random numbers: randquantum

This notebook gives a DEMONSTRATION of the useful functions which yield true random numbers produced live from an experiment in quantum mechanics. They are contained in the randquantum Python module under the quantum directory.

Reliable and unbiased random numbers are needed for a range of applications from numerical modeling to cryptographic communications. While there are algorithms that can generate pseudo random numbers, they can never be perfectly random nor indeterministic. ANU researchers are generating true random numbers from a physical quantum source by splitting a beam of light into two beams and then measuring the power in each beam. Because light is quantised, the light intensity in each beam fluctuates about the mean. Those fluctuations, due ultimately to the quantum vacuum, can be converted into a source of random numbers.

The rate at which the live bits are streamed is limited by the bandwidth of your internet connection. Every number is randomly generated in real time and cannot be predicted beforehand. Most pseudo-random numbers have a finite period after which the sequence repeats. The output herein will not have such periodicity.

We develop a faster stochastic hybrid method which integrates authentic and pseudo generators to induce independence and eliminate predictable periodicity. This has PASSED Marsaglia Diehard, NIST STS, and RGB Dieharder tests.

Visualization of digits

For each digit, plot/plot_digitangle.py pushes the turtle (an arrow) directionally at a specific angle for a fixed distance. That push creates a plot where the colors are determined by the input digits. Thus the script visualizes any sequence of digits.

If circular angles are mapped on a random sequence of digits we will see a drunkard walk across the screen. Furthermore, if the sequence comes from a "normal" number, we can expect recurrent behavior, i.e. the drunk turtle will return to where it started its journey, though it may take a long time to do so theoretically.

Here is a plot of the first 10,000 digits of pi using pi-digits.txt:

pi-digits.jpg


Revision date : 2017-10-02

randomsys's People

Contributors

gitter-badger avatar rsvp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.