How to Roll a Fair 6 Sided Die With Qubits

Updated | 3 min read

Binary numbers from coins

Each quantum coin gives Heads (0) or Tails (1) when you look. Read three coins as three binary digits and you get a number from 0 to 7. Add one and you have a die with faces 1 to 8. The Quantum dice experiment does exactly this with one, two or three simulated coins.

CoinsFacesChance of each face
121 in 2
241 in 4
381 in 8
4161 in 16

Why every face is equally likely

After a Spin the coin step (the Hadamard gate), each coin gives Heads and Tails with probability one half, independently of the others. Three coins have 2 x 2 x 2 = 8 combinations, and each has probability one half times one half times one half, which is one eighth.

The problem with 6 faces

Six does not divide a power of two evenly. If you took the 8 face result and mapped 7 and 8 back onto 1 and 2, then faces 1 and 2 would come up twice as often as the others, which makes the die unfair. The fix is plain and old.

Roll again: rejection sampling

Roll the 8 face die. If the result is 1 to 6, keep it. If it is 7 or 8, throw it away and roll again. Every kept result is equally likely because each of faces 1 to 6 had the same chance on every attempt. An attempt succeeds with probability 6 in 8, which is 75%, so on average you need 4 over 3, about 1.33 rolls per result.

Why not just wrap the numbers around?

A tempting shortcut is to map the extra results back onto the start of the list, so 7 becomes 1 and 8 becomes 2. Count the chances: faces 1 and 2 would each come up with probability 2 in 8, which is 25%, while faces 3 to 6 would each come up with probability 1 in 8, which is 12.5%. The six chances still add to 100%, but the die is loaded. Any time the number of outcomes is not a multiple of the number of faces, wrapping around causes this kind of bias. Re-rolling does not.

Other dice sizes

DieCoins neededOutcomes you getRe-roll whenChance a roll is kept
4 sided24never100%
6 sided387 or 875%
10 sided41611 to 1662.5%
12 sided41613 to 1675%
20 sided53221 to 3262.5%

The rule is the same each time: use the smallest number of coins whose outcomes cover the faces, and re-roll the extra outcomes. The Lab only offers 2, 4 and 8 sided dice because three coins is the most it simulates, but the idea carries over.

Try it in the Lab

Pick 3 coins in the Lab and press Roll once a few times. When you see a 7 or 8, imagine rolling again. Then press Try it 100 times and note that each of the 8 faces gets a share near 12 or 13 rolls, never exactly the same, as explained in why 100 flips never give exactly 50/50.

Is this real quantum randomness?

In the Lab, no. It is a simulator that uses an ordinary pseudo random number generator. On real quantum hardware the randomness would come from physical measurement outcomes, although practical random number generators are built to check and clean their output. Read Quantum Random Number Generators for how those devices work.

Sources and further reading

Checked 2026-10-12. The probabilities and memory figures on this page were calculated directly from the formulas shown. This is education, not investment or security advice. QUANTUM (QNT) is an independent community token on Solana and is not affiliated with Quantinuum (Nasdaq: QNT) or Quant Network (QNT on Ethereum).

Frequently asked questions

How many qubits do I need for a 6 sided die?

Three qubits, which give 8 equal outcomes. Re-roll when you get one of the two extra results, so the remaining 6 stay equally likely.

Can a quantum computer make a loaded die?

Yes. A gate can set any odds for a coin, for example 70% Heads. The Lab's dice experiment only uses equal odds, because that is the fair die.

Next read

Quantum Random Number Generators: True Randomness You Can CheckHow quantum devices make unpredictable numbers, from phone chips to NIST's CURBy randomness beacon, and why randomness matters for security.Read next

Also useful: Why 100 Quantum Coin Flips Never Give Exactly 50/50 | Superposition Explained in Plain English | What Is a Qubit? Superposition and Measurement Explained

Educational content, not financial advice. QUANTUM (QNT) is independent of Quantinuum (Nasdaq: QNT) and Quant Network (QNT on Ethereum). Live chart | Token facts