|q⟩ Bad Qubits

beginner · Programming · The Qubit State Vector & Dirac Notation

Probability from Amplitude

Quantum mechanics does not say which outcome a measurement will produce — it says how likely each outcome is. The rule that converts amplitudes into probabilities is called the Born rule.

Amplitudes and their squares

A single-qubit state is written as

ψ=α0+β1,|\psi\rangle = \alpha|0\rangle + \beta|1\rangle,

where α\alpha and β\beta are amplitudes — complex numbers that carry all the information about the state. On their own, amplitudes are not probabilities. To get a probability you must square the modulus of the amplitude:

P(0)=α2,P(1)=β2.P(0) = |\alpha|^2, \qquad P(1) = |\beta|^2.

The normalization condition α2+β2=1|\alpha|^2 + |\beta|^2 = 1 guarantees that these probabilities always add up to 1.

A worked example

Consider the state

ψ=350+451.|\psi\rangle = \frac{3}{5}|0\rangle + \frac{4}{5}|1\rangle.

Both coefficients are real and positive, so α=35|\alpha| = \tfrac{3}{5} and β=45|\beta| = \tfrac{4}{5}. Squaring gives

P(0)=(35) ⁣2=925=0.36,P(1)=(45) ⁣2=1625=0.64.P(0) = \left(\frac{3}{5}\right)^{\!2} = \frac{9}{25} = 0.36, \qquad P(1) = \left(\frac{4}{5}\right)^{\!2} = \frac{16}{25} = 0.64.

Check: 0.36+0.64=1.000.36 + 0.64 = 1.00 ✓. The state is normalized because 33, 44, and 55 form a Pythagorean triple (32+42=523^2 + 4^2 = 5^2), so dividing by 55 makes both coefficients valid.

Try it

A qubit is prepared in ψ=350+451|\psi\rangle = \tfrac{3}{5}|0\rangle + \tfrac{4}{5}|1\rangle. Apply the Born rule and return P(0)P(0), the probability of measuring outcome 00.

Run your code to see the quantum state.

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