← Quantum Store · Guides · Lessons · Glossary · About · Türkçe
Preparation course: maths for quantum computing · Lesson 1 / 7 · 8 min
Probability: putting chance into numbers
Learn what probability is with coins and dice, why probabilities always add up to 1 and why independent events multiply. The first step to understanding quantum measurement.
A probability is a number between 0 and 1
We describe how likely something is with a number between 0 and 1. 0 means “never”, 1 means “certainly”. A fair coin lands heads with probability ½, that is 0.5 or 50%. A die shows a 6 with probability ⅙.
Add up the probabilities of all possible outcomes and you always get 1: heads ½ + tails ½ = 1, six times ⅙ = 1 for a die. One of the outcomes is bound to happen. On a quantum computer the probabilities of all measurement results also add up to 1.
Independent events multiply
Toss two coins together. There are four outcomes: heads-heads, heads-tails, tails-heads, tails-tails. The coins do not affect each other, so each outcome has probability ½ × ½ = ¼. With three coins there are eight outcomes, each with probability ⅛.
In quantum language we write heads as 0 and tails as 1, so two qubits give the results 00, 01, 10 and 11. Every extra qubit doubles the number of outcomes: n qubits have 2ⁿ different results.
Probability and frequency
A probability does not tell you the result of a single toss; it tells you what happens over many tosses. Toss a coin 1000 times and you expect about 500 heads, but exactly 500 is rare: 480 or 515 are perfectly normal.
Quantum computers work the same way. We run the same circuit thousands of times, count the results and estimate the probabilities from the counts. The “1000 kez ölç” (measure 1000 times) button in the playground does exactly that.
Try it yourself
Press “1000 kez ölç” (measure 1000 times) a few times: the counts of 0 and 1 hover around 500 but are rarely exactly 500. Then switch to the two independent coins example: each of the four results lands around 250.
Open the circuit in your browserThe circuit playground is in Turkish. Button guide: “1000 kez ölç” = measure 1000 times, “Durum vektörünü göster” = show the state vector, “Bu devrenin Qiskit kodu” = this circuit’s Qiskit code, “Geri al” = undo, “Temizle” = clear. Click a gate in the circuit to remove it.
Key points
- A probability is a number between 0 (never) and 1 (certain).
- The probabilities of all outcomes add up to 1.
- Probabilities of independent events multiply: ½ × ½ = ¼ for two coins.
- n qubits have 2ⁿ measurement results; we estimate their probabilities from many measurements.
Test yourself
If you apply an H gate to each of three qubits, what is the probability of measuring 101?
- ½
- ⅓
- ⅛
Show the answer
⅛. Each qubit is an independent coin toss. Three qubits have 8 outcomes, each with probability ½ × ½ × ½ = ⅛.