This email is different from previous emails.
Thus far, I wrote a post once a week and shared it with you by email and in my Medium blog. Mostly, I write small tutorials. I explain a concept from quantum computing and implement it with Qiskit—IBM’s quantum development kit.
Some of the posts were taken directly from my book Hands-On Quantum Machine Learning With Python.
Don’t worry. I’ll continue sending these emails every Tuesday. I really enjoy solving problems with quantum algorithms and sharing my insights.
“Why do I keep all the fun to myself?” I thought. “Wouldn’t it be great if I shared it with you?”
So, here it is. It works as follows. I share a small challenge with you, today. I’d like you to post your solutions in the PyQML GitHub discussion section. There, I will also drop some hints and resources that help you solve the problem. Next week, I will post my solution to the challenge.
This week, we start fairly easy. If you read my book Hands-On Quantum Machine Learning With Python, you’ll solve this challenge in a blink of an eye.
The Bernoulli Challenge
The goal of machine learning is to train the machine to predict the value of an unknown variable. But before we predict the value of a variable, we usually aim to find its probability distribution. The probability distribution is a function that describes all the possible values and likelihoods that a variable can have.
For instance, let’s say we know that our variable can have only one of two values. It can be 0 or 1. Each value occurs with a certain probability.
The p denotes the probability of 0. Since there are only two possible values, we know that whenever the value is not 0 it must be 1 instead. And since all probabilities must add up to 1 (=100%), we know that the probability of 1 is 1-p.
The challenge is to create a quantum system that reproduces a Bernoulli distribution with a given p. p can be any real value between (including) 0 and 1.
For instance, if p=0.3, the quantum system should produce the following distribution.
Please, let me know your solution. If you have problems, don’t hesitate to add a comment here.
Furthermore, even if you don’t want to share your solution to this problem, please let me know what you think of the problem. How hard was it? Did you like the topic? Did you like the presentation? What would you need to solve it?