A Byte of PhysicsLogo

Measurement and probability

Quantum theory predicts probability distributions for measurement outcomes. One result is a sample, not a percentage. The distribution becomes testable only when you prepare comparable states many times and compare the long-run frequencies with the model.

Think like a programmer

Model measurement as a pure pipeline: complex amplitudes → non-negative weights → normalized probabilities → sampled legal outcome. Keep the deterministic sampler separate from the probability calculation. A fixed seed makes a lesson repeatable; it does not make an actual laboratory outcome predetermined.

Model checklist

Inputs
Complex amplitudes for each possible outcome, an outcome basis, a normalization policy, trial count, and a display-only random seed.
State
Normalized probability array and accumulated outcome counts.
Rule
Square amplitude magnitudes, divide by their sum, then sample one categorical outcome per trial.
Output
One legal result per trial, predicted probabilities, and ensemble frequencies.
Check
All probabilities are non-negative and sum to one; every sample is a listed outcome.

For mutually exclusive outcomes k, the Born rule is

\[P(k)=\frac{|a_k|^2}{\sum_j |a_j|^2}\]

The square is crucial. If outcome amplitudes have magnitudes 1 and 2, their weights are 1 and 4, so the normalized probabilities are 0.2 and 0.8—not 1/3 and 2/3. First normalize; then sample:

const probabilities = normalizeWeights(amplitudes.map((amplitude) => amplitudeMagnitudeSquared(amplitude)));
const outcome = sampleCategorical(probabilities, random);

sampleCategorical should return an index from the supplied outcomes, even at the top edge of its random interval. Its unit tests reject an all-zero distribution and verify that every seeded sample is legal. Those are contract tests, not a claim about the interpretation of quantum measurement.

Born-rule measurement experiment

Set two real amplitude magnitudes. The model squares and normalizes them, then makes 100 seeded measurement draws so the same inputs always give the same sample.

Outcome 0

48 observed / 100; prediction 50.0%

Outcome 1

52 observed / 100; prediction 50.0%

Observed seeded draws
Predicted probability marker

Predicted outcomes: 0 → 50.0%, 1 → 50.0%. This repeatable sample observed 48 zeros and 52 ones.

The status above gives both the predicted probabilities and the deterministic 100-draw sample.

The lab uses real amplitude magnitudes to keep the calculation visible. Relative phase matters whenever alternatives can interfere before measurement; this two-outcome display deliberately starts after the state has been expressed in a selected measurement basis. Its 100-draw frequency is allowed to differ from the probability. Run it conceptually with 10, 100, and 10,000 trials: larger ensembles normally make random fluctuations relatively smaller, but no finite run has to reproduce an exact percentage.

Try this experiment

Prediction: Doubling one amplitude magnitude does not double its probability; it quadruples its unnormalized weight.

Set both amplitude magnitudes to 1.0 and predict the result. Then change outcome 1 to 2.0, predict its probability before reading the status, and compare the 100-draw count with 80 expected draws. Explain why a different seed could give another valid count.

Where this model breaks

This is a finite categorical model with a chosen basis and display-only real magnitudes. It omits phase-dependent interference, continuous observables, imperfect state preparation, detector bias, decoherence, entanglement, and competing interpretations of measurement. The pseudorandom number generator is a reproducibility tool, not a physical explanation.

Summary

Measurement code should make each transformation visible: amplitudes produce squared weights, weights normalize to probabilities, and a sampler produces one permitted outcome. Test the normalization and legality contracts, then compare an ensemble—not one draw—with the predicted distribution.

Glossary

Self-check

  1. Why do amplitudes of 1 and 2 produce probabilities of 0.2 and 0.8?
  2. What can one sampled outcome tell you about a probability?
  3. Which two contracts should every categorical sampler satisfy?

Sources

Model contract

Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

For Measurement and Probability, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Quantum Beginnings, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.

Guided experiment

Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.

Where this model breaks

This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.

Summary

Treat Measurement and Probability as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Measurement and Probability into a test

Normalize quantum probabilities, sample with seeds, and compare ensembles with theoretical predictions.

  1. Name the inputs and units that the quantum beginnings model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: