|q⟩ Bad Qubits

beginner · Programming · Bits, Logic & Classical Computation

Probabilistic Bits

A deterministic bit is either 0 or 1. A probabilistic bit is described by a probability distribution: it is 0 with probability p0p_0 and 1 with probability p1p_1, where p0+p1=1p_0 + p_1 = 1 and both are non-negative. We can write it as a vector (p0p1)\begin{pmatrix} p_0 \\ p_1 \end{pmatrix}.

This is the closest classical idea to a qubit — and the contrast is the whole point. A qubit is also a two-entry vector, but its entries are complex amplitudes whose squared magnitudes give the probabilities. Amplitudes can be negative or complex, so they can interfere (cancel out), something probabilities can never do. Holding this picture now will make superposition click later.

Try it

A biased bit is 1 with probability 0.7. Return the probability that it is 0.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.