Hello folks and science creatives! Today, I’m gonna discuss the first case study of actual problem solving in the Luminous Quanta project. The problem entitled above is the inception of integrated key concerns regarding physics, math and programming combined… Here, I will start with discussions related with “The Double-Slit Experiment”, another experiment we will find useful to discuss, the background world behind every experiment in physics, the logic behind it as well as paradoxes related with the nature of being a scientist. All that for the purpose of an integrated presentation of “The Coin Toss Experiment As A Single-Qubit Metaphor” related with Python and pseudo-code.
Every Physicist who initiates an experiment has to decide on his experimental setup and conduct it by decomposing every tiny bit and interaction inside the experiment with a vast network of knowledge, experience and interpretational ability. That’s not easy, as Physicists who possess one skill don’t necessarily possess the other. It’s common fact that simple argumentations in an experiment many times require evidence even from Nobel Laureates and that demands empathy in terms of asking ourselves “who are we” and “why we are here”. Learning to play a game is more important than learning to impose your ego… But let’s start from the inception of today’s discussion!
When we try to determine the position of an electron we have 4 different values, these are principal number, orbital angular momentum, magnetic measurement and electron spin. Spin is an intrinsic notion of angular momentum. When we observe an electron into a superposition the whole system collapses into spin up or spin down. In fact, electrons do not spin as this is a property that takes place only after measurement. When we measure, we lose the information of before. There’s an analogy to this with the thought experiment of Schrodinger’s cat and we can find an analogy in quantum computing where the spin up is equivalent with the bit value of 1 and spin down with the bit value of 0. Superposition in other words collapses into classical bits. When 2 electrons interact with each other there is entanglement, meaning that their spins have some kind of correlation between them. If you measure one electron as spin up the other one immediately is spin down, it doesn’t even matter where they’re located, in a quantum computing technology or outer space…!
The Coin Toss Experiment As A Single-Qubit Metaphor is an attempt to show with coding samples, numerical graphs in Jupyter Notebooks and less interaction with the actual code, the logic behind the pseudocode and what do these things mean in terms of the nature of the experiment. The coin-toss experiment in statistics follows the pattern of the binomial or in other words, the Bernoulli distribution. The single-qubit metaphor in quantum computing works with quantum states of ket 0 and ket 1. To understand the parallelization, we draw concepts from what Python knows as tuples of probability amplitudes. I’m gonna write a pseudocode and I’m gonna write a Python code, so this sample can work as a vector space algebra, whereas the first time the variables denote we live in the universe of the luck experiment to be known as coin-toss and the second time the laws of the luck experiment assigned to Bernoulli are being transformed into the laws of a single qubit. The fantastic question is, what if we could use hundreds or hundreds of thousands of coin tosses to simulate a universe or a quantum computer with different laws than what we know today? But that’s a different story…
- Pseudocode
Repeat the following experiment 100 times:
1.) Toss a coin 10 times
2.) For each toss multiply the result of the toss with the corresponding part of the tuple of probability amplitudes (f)
3.) Create a list of tosses for the 10 tosses so to know each time the result of the tosses cumulatively up until the end – of 10 tosses (tails)
4.) Create a list with the results of the tuple of probability amplitudes after the tosses (Toss)
5.) For every ten of tosses create a list with the final sum of heads or tails. (final_tails)
6.) Print final_tails and Toss
Every Physicist who initiates an experiment has to decide on his experimental setup and conduct it by decomposing every tiny bit and interaction inside the experiment with a vast network of knowledge, experience and interpretational ability. That’s not easy, as Physicists who possess one skill don’t necessarily possess the other. It’s common fact that simple argumentations in an experiment many times require evidence even from Nobel Laureates and that demands empathy in terms of asking ourselves “who are we” and “why we are here”. Learning to play a game is more important than learning to impose your ego… But let’s start from the inception of today’s discussion!
When we try to determine the position of an electron we have 4 different values, these are principal number, orbital angular momentum, magnetic measurement and electron spin. Spin is an intrinsic notion of angular momentum. When we observe an electron into a superposition the whole system collapses into spin up or spin down. In fact, electrons do not spin as this is a property that takes place only after measurement. When we measure, we lose the information of before. There’s an analogy to this with the thought experiment of Schrodinger’s cat and we can find an analogy in quantum computing where the spin up is equivalent with the bit value of 1 and spin down with the bit value of 0. Superposition in other words collapses into classical bits. When 2 electrons interact with each other there is entanglement, meaning that their spins have some kind of correlation between them. If you measure one electron as spin up the other one immediately is spin down, it doesn’t even matter where they’re located, in a quantum computing technology or outer space…!
The Coin Toss Experiment As A Single-Qubit Metaphor is an attempt to show with coding samples, numerical graphs in Jupyter Notebooks and less interaction with the actual code, the logic behind the pseudocode and what do these things mean in terms of the nature of the experiment. The coin-toss experiment in statistics follows the pattern of the binomial or in other words, the Bernoulli distribution. The single-qubit metaphor in quantum computing works with quantum states of ket 0 and ket 1. To understand the parallelization, we draw concepts from what Python knows as tuples of probability amplitudes. I’m gonna write a pseudocode and I’m gonna write a Python code, so this sample can work as a vector space algebra, whereas the first time the variables denote we live in the universe of the luck experiment to be known as coin-toss and the second time the laws of the luck experiment assigned to Bernoulli are being transformed into the laws of a single qubit. The fantastic question is, what if we could use hundreds or hundreds of thousands of coin tosses to simulate a universe or a quantum computer with different laws than what we know today? But that’s a different story…
- Pseudocode
Repeat the following experiment 100 times:
1.) Toss a coin 10 times
2.) For each toss multiply the result of the toss with the corresponding part of the tuple of probability amplitudes (f)
3.) Create a list of tosses for the 10 tosses so to know each time the result of the tosses cumulatively up until the end – of 10 tosses (tails)
4.) Create a list with the results of the tuple of probability amplitudes after the tosses (Toss)
5.) For every ten of tosses create a list with the final sum of heads or tails. (final_tails)
6.) Print final_tails and Toss
(Click at the picture to enlarge)
Bear in mind folks viewing the above code that here, for a coin-toss we use a random number generator the way it is constructed by the inventors and creators of the programming language Python, meaning the result of a simple toss obeys the rules of the random number generator machine. Nevertheless, we multiply the result of the coin toss with 0.48 the first time and 0.52 the second time, as we know from the academic real world, the coin is not absolutely clean and the Bernoulli distribution gives the results of 0.48 and 0.52 for each side of the coin, that here have been configured with a tuple of probability amplitudes as a constant outside the second and third loops. The nature of this tuple multiplied with the coin results can simulate with a different analogy – that is the random number generator – the quantum state of a single qubit!
Below is a graph of the above:
Below is a graph of the above:
(Click at the picture to enlarge)
To move from a quantum universe into a universe of a game of luck, we could possibly use a transformation not on the 2 engines but on the final output data. Meaning, not the complex numbers of the quantum computer nor the random number generator but in terms of what they communicate at the level of metadata…! This concern is also relevant with a concept from cryptography where we actually substitute physical locks and use ciphers instead, but we mean nothing related to physics when we say physical locks, but actually the encryption and decryption metadata that could indeed, simulate physics!
Below we can see the cumulative results after the end of the total experiment:
To move from a quantum universe into a universe of a game of luck, we could possibly use a transformation not on the 2 engines but on the final output data. Meaning, not the complex numbers of the quantum computer nor the random number generator but in terms of what they communicate at the level of metadata…! This concern is also relevant with a concept from cryptography where we actually substitute physical locks and use ciphers instead, but we mean nothing related to physics when we say physical locks, but actually the encryption and decryption metadata that could indeed, simulate physics!
Below we can see the cumulative results after the end of the total experiment:
(Click at the picture to enlarge)
We observe a slightly negative skew at the above distribution. As we progress with processing the data of this experiment, I’d like to discuss about further real-world impacts related with the quantum probabilities of the physical system of the coin toss connected with the classical Bernoulli probabilities in statistics. The priming to recreate and correlate the problems will rise if we could somehow design the real-world simulation. Meaning, the force we exercise to the coin with our hand, the speed of the coin, the height it acquires, its spin, the height at which we catch the coin, etc, integrated into a coin toss of a quantum physical system defined by a superposition of spins, up until we can measure it and the system collapses, hence verifying by repetitions aligned with the laws of big numbers, the distribution of Bernoulli…!
Can you now understand how this leading example actually entangles a physical system of spins and quantum probabilities, with the classical probability in statistics? This is a powerful example of uniting two different worlds, the way we wanted to unite our quantum universe with a universe obeying on the laws of a game of luck, that is the coin toss. But we’ll always need to be extremely cautious with the analogies and the meters with which we unite one world with another, a case omnipresent in business, factories, and different experimental setups than the coin toss or the double slit experiment.
Below we can view the total outcomes of the experiment as a dictionary in Python:
We observe a slightly negative skew at the above distribution. As we progress with processing the data of this experiment, I’d like to discuss about further real-world impacts related with the quantum probabilities of the physical system of the coin toss connected with the classical Bernoulli probabilities in statistics. The priming to recreate and correlate the problems will rise if we could somehow design the real-world simulation. Meaning, the force we exercise to the coin with our hand, the speed of the coin, the height it acquires, its spin, the height at which we catch the coin, etc, integrated into a coin toss of a quantum physical system defined by a superposition of spins, up until we can measure it and the system collapses, hence verifying by repetitions aligned with the laws of big numbers, the distribution of Bernoulli…!
Can you now understand how this leading example actually entangles a physical system of spins and quantum probabilities, with the classical probability in statistics? This is a powerful example of uniting two different worlds, the way we wanted to unite our quantum universe with a universe obeying on the laws of a game of luck, that is the coin toss. But we’ll always need to be extremely cautious with the analogies and the meters with which we unite one world with another, a case omnipresent in business, factories, and different experimental setups than the coin toss or the double slit experiment.
Below we can view the total outcomes of the experiment as a dictionary in Python:
(Click at the picture to enlarge)
Note here that the verification of Bernoulli coincides not with the results, 521, 479, these are defined by the random number generator engine, but with the assigned probabilities as before.
I truly hope this experiment and the process of analyzing it actually sheds powerful light on conclusions and the actual joy of science! Have a great time folks!