Quantum measurement converts a quantum computation into one classical outcome. The outcome is nondeterministic, but it is selected from a defined probability distribution encoded by the quantum state. A result is commonly represented as a binary string, optionally interpreted as an integer. section 1.3.2 section 1.4.3
Figure 1.14 The steps of a quantum computation using three qubits. During the computation, we can change the probabilities by applying quantum computing instructions. When a measurement is performed, we get one outcome according to the encoded probabilities.
A computation first changes outcome probabilities, then measurement selects one outcome. Measurement is the only available data from the computation; afterward, the measured outcome has probability 1 and all others have probability 0. section 1.4.4
One execution produces one sample, not a complete view of the state. Repeating the same computation produces counts whose frequencies reflect the encoded outcome probabilities. This makes measurement useful when the goal is to sample a probability distribution or identify outcomes made more likely by earlier operations. section 1.5.1 section 2.2
For a qubit-based computation:
- A single qubit measures as 0 or 1; a system of n qubits measures as an n-bit string. section 1.4.3
- The initial all-zero state measures as 000…0 with 100% probability until operations change its state. section 1.4.3
- The probability of desired outcomes can be increased before measurement, so repeated runs favor useful selections. section 2.2 section 2.3.2
Simulating repeated single-qubit measurements
A simulated state assigns probability 0.71651 to outcome 0 and 0.28349 to outcome 1. Python's random.choices can draw samples using squared amplitude magnitudes as weights. Ten samples yield counts such as 0 → 7 and 1 → 3; 1,000 samples yield frequencies closer to the encoded probabilities. section 3.4
Measurement supports three reusable quantum-computing patterns: sampling from probability distributions, searching for desired outcomes after amplitude amplification, and estimating probabilities of selected outcomes. Its value depends on how the state was prepared and how the resulting counts are interpreted for the problem. section 1.6 section 12.1.2

