A probability distribution assigns probabilities to possible outcomes; the probabilities sum to one. In quantum computing, measurement samples one nondeterministic outcome from this distribution. section 3.4 section 1.3.2
Use a distribution to reason about repeated quantum computation runs:
- Represent outcomes as binary strings or integer values paired with their probabilities. section 1.3.2 section 1.3
- Prepare a quantum state whose amplitudes determine the desired outcome probabilities. section 4.1.2
- Measure repeatedly, collect outcome counts, and use frequencies to estimate the distribution. section 3.4 section 2.2
Sampling a single-qubit distribution
For probabilities 0.71651 and 0.28349, Python can draw samples with choices(range(len(s)), [abs(s[k])**2 for k in range(len(s))], k=10). Counting the samples might produce seven 0s and three 1s; increasing the run count to 1,000 gives approximately 726 zeros and 274 ones. section 3.4
Figure 1.4 A circle divided into equal sectors, where each sector represents a possible outcome of a certain quantum computation
A circle divided into equal sectors visualizes each possible outcome as a region whose size represents its probability. section 1.3.2


























