DIY: Physical Random Number Generators & Double Slit Experiment

One of the benefits of Quantum Computing is their ability to generate truly random numbers.

Since classical computers are deterministic machines, governed by algorithms, they are inherently predictable. Therefor any number generated by a classical computer, even if it seems complex is actually based on a set of conditions or algorithm, which therefor makes it a “pseudo random number”, rather than truly random.

To generate truly random numbers you need to rely on a physical processor or phenomena that are unpredictable, examples of this include radioactive decay, electronic noise or even atmospheric noise.

Since QC is essentially based on a physical process and the probabilistic nature of quantum mechanics, its qubits can exist in a superposition state, this means they can represent a combination of 0 and 1 simultaneously, this state/property can be harnessed by QRNG (Quantum random number generators) to produce truly random numbers.

As a fun project, I decided to build a small physical QRNG using an Arduino, laser diode, beam splitter and two photo resistors. The basic premise is that you pulse the laser, it sends a wave/particle (both!) through the beam splitter, 50% of the time it should hit one of the two photo resistors, providing you with a random string of “1”s or “0”s.

While a very simple, basic and small example, it is a fun experiment. Check out OpenQbit.com if you would like to build your own. To make this a little easier, I laser cut a template/outline for the beam splitter for holding each of the components.

Enjoy Randomness? Check out these blog, sites, references: http://www.reallyreallyrandom.com

Non Quantum RNG generator using zener noise: http://www.reallyreallyrandom.com/zener/breadboard/

Nice video explaining the seed variables used and middle squares: https://www.khanacademy.org/computing/computer-science/cryptography/crypt/v/random-vs-pseudorandom-number-generators

Generating Random Numbers with QisKit & IBM Quantum Hardware

Generating true random strings using classical computers is not as easy as you may think. Unlike deterministic processes that follow specific algorithms and patterns, achieving true randomness poses a challenge in the realm of classical computing. Classical computers operate based on predetermined instructions and logical operations, which inherently lack the inherent unpredictability required for true randomness.

In contrast, true randomness involves an element of unpredictability that goes beyond the deterministic nature of classical computing. Attempts to generate random strings on classical computers often involve algorithms that simulate randomness, but these are ultimately constrained by the deterministic nature of the underlying hardware and software. read more

Generative Art Resources

During the NFT hype, generative art got a lot of attention due to its ability to programmatically, and algorithmically generate designs and art. These are a few resources I used and developed digging a little bit deeper into the subject.

Skill Share Course: https://www.skillshare.com/classes/Programming-Graphics-I-Introduction-to-Generative-Art/782118657

  • Coding Train by Daniel Shiffman — one of the authors of Processing. A talented and cheerful teacher who will change your perception of teaching.
  • Awesome Creative Coding on Github — most useful links on your way to becoming a generative artist
  • Openprocessing — place when you can find and share works using P5.js and Processing
  • Programming Graphics от Joshua Davis — the best motivating creative coding course in the web (in my humble opinion)
  • read more

    Have some time?

    This single list of link has fueled a lot of reading for me over the past few months … The most counterintuitive facts in all of mathematics, computer science, and physics:

    It is possible to compute over encrypted data without access to the secret key: https://en.wikipedia.org/wiki/Homomorphic_encryption It is possible to prove that you know a value x, without conveying any information apart from the fact that you know the value x: https://en.wikipedia.org/wiki/Zero-knowledge_proof It is possible to play poker by telephone in a trusted way which prevents cheating: http://math.stonybrook.edu/~scott/blair/How_play_poker.html If customers take on average 10 minutes to serve and they arrive randomly at a rate of 5.8 per hour then the waiting time for one teller is five hours while the waiting time for two tellers is 3 minutes: https://www.johndcook.com/blog/2008/10/21/what-happens-when-you-add-a-new-teller/ There exists a set of three dice, A, B, and C, with the property that A rolls higher than B more than half the time, and B rolls higher than C more than half the time, but it is not true that A rolls higher than C more than half the time: https://en.wikipedia.org/wiki/Nontransitive_dice Causation does not imply correlation: https://arxiv.org/abs/1505.03118 The Earth makes 366.25 rotations around its axis per year. (Related: 0% selected the right answer on this SAT question: Circle A has 1/3 the radius of circle B, and circle A rolls one trip around circle B. How many times will circle A revolve in total? youtube.com/watch?v=kN3AOMrnEUs) There is a surface that has only one side: https://en.wikipedia.org/wiki/Mobius_strip It is possible to travel downwind faster than the wind: 

    youtube.com/watch?v=jyQwgBAaBag read more

    Scripting in Think Or Swim #ToS

    Implementing EMA Clouds in ThinkScript

    #Multiple EMA Cloud input ema1low = 5; input ema1high = 13; input ema2low = 34; input ema2high = 50; input ema3low = 72; input ema3high = 89; def ema5 = ExpAverage(close, ema1low); def ema13 = ExpAverage(close, ema1high); AddCloud(ema5, ema13, Color.DARK_GREEN, Color.RED); def ema34 = ExpAverage(close, ema2low); def ema50 = ExpAverage(close, ema2high); AddCloud(ema34, ema50, Color.green, Color.light_gray); def ema72 = ExpAverage(close, ema3low); def ema89 = ExpAverage(close, ema3high); AddCloud(ema72, ema89, Color.blue, Color.yellow); def buycross = (ema5 > ema13) and (ema34 crosses above ema50); def buycrossAdditional = (ema72 crosses above ema89); AddOrder(OrderType.BUY_TO_OPEN, buycross, tickColor = GetColor(1), arrowColor = GetColor(1), name = "Buy", tradeSize = floor(10000 / close)); def sellcross = ema5 crosses below ema13 and (ema34 < ema50); AddOrder(OrderType.SELL_TO_CLOSE, sellcross, tickColor = GetColor(0), arrowColor = GetColor(0), name = "Sell"); AddLabel(yes, "EMA5 & EMA13 = Dark Green & Red", Color.DARK_GREEN); AddLabel(yes, "EMA34 & EMA50 = Green & Light Grey", Color.GREEN); AddLabel(yes, "EMA72 & EMA89 = Blue & Yellow", Color.BLUE); read more

    Enterprise Mobility @ SAP – Relay

    This is another blog post of a series around the enterprise mobility IT team at SAP. We are an internal IT team focused on managing mobile devices, applications, and developing custom apps for SAP’s 100,000 employees. I have been a part of this team for the past six years and believe we have some unique stories, software, tools, and insights to help others in the community considering, or currently undertaking, some of the challenges which surround mobility and its adoption in the enterprise.

    Introduction

    As mentioned in previous posts, apps are an essential cornerstone of mobility @ SAP. Whether they are employee initiated or driven by innovation, we adopt the underlying processes and do our best to deliver solutions that increase our end users’ productivity. This post will take a deep dive into the ideation, architecture, design, and lifecycle of an internal app called Relay. A real-time chat application initially developed in 2012 using the Business Technology Platform (Previously known as the SAP Cloud Platform). A variation of the application might be familiar to some of you SAP community users, as Messages. We recently retired the application internally due to the increased adoption of MS Teams and Slack. However, I believe that some of the concepts and premise behind the application are still relevant to share. read more

    Working with Bluetooth for iOS Applications

    I recently purchased a Concept2 rower and started doing some indoor rowing to change up my workout routines. I was considering developing a live rowing platform to compete with friends and make the workouts more interactive. It turned out there were already a few options on the market, so I shelved the idea.

    But, since the Concept2 allows 3rd party connectivity, I still was curious how integration, discovery, and notifications would work from an iOS device. I was able to find a nice SDK, but it was considerably outdated (5 years) so I decided to use that as a foundation and port the application to Swift 5 and get it working for anyone else interested in developing a rowing app for iOS. read more

    Side Project: qubit²

    Over the past couple of years I have had a keen interest in quantum computing and the optimism of its benefits over traditional computing methods. I have read countless papers, articles and spent a considerable amount of time deciding how I would explain it to a 5 year old.

    ELI5: A normal computer is like a light switch is either on or off. A quantum computer is more like a dimmer switch, it can be partially on, or partially off.

    It’s overly simplistic but gives a simple understanding of the potential states that the device can be in. I also wonder how I would explain QC to friends or technology friends. Trying to find the right words that quantify both its elementary simplicity and its quantitative complexity is difficult, especially when you yourself don’t fully grasp it. But like other technologies, the best way to learn is by doing … experimenting, researching and proofing. Leading to your own understanding and comprehension of existing anecdotes and theories or new ones. read more