A qubit's state is represented as a vector that can point anywhere on the Bloch sphere, embodying a probability distribution. Superposition enables a qubit to hold complex information during calculation. However, this information cannot be accessed directly. To extract an answer from a quantum computer, a measurement must be performed.Measurement is not a passive act in quantum mechanics. In classical computing, reading a bit does not change its value. If a hard drive stores a zero, you can read it a thousand times, and it remains a zero. In quantum computing, reading a qubit fundamentally alters its state.The Born Rule and ProbabilityWhen a qubit is in a superposition, it is described by the linear combination of the basis states $|0\rangle$ and $|1\rangle$. We express this state as:$$ |\psi\rangle = \alpha|0\rangle + \beta|1\rangle $$Here, $\alpha$ and $\beta$ are the probability amplitudes. These numbers tell us how much of $|0\rangle$ and how much of $|1\rangle$ exist in the superposition. However, $\alpha$ and $\beta$ are not the probabilities themselves. They are complex numbers that describe the quantum state.To find the probability of measuring a specific outcome, we use the Born rule. This rule states that the probability of measuring a specific state is the square of the absolute value (magnitude) of its amplitude.$$ P(0) = |\alpha|^2 $$$$ P(1) = |\beta|^2 $$Because the qubit must collapse to either 0 or 1, the sum of these probabilities must always equal 1 (or 100%). This is the normalization condition we discussed in the linear algebra chapter:$$ |\alpha|^2 + |\beta|^2 = 1 $$Consider a qubit after applying a Hadamard gate. The state vector is perfectly balanced between 0 and 1:$$ |+\rangle = \frac{1}{\sqrt{2}}|0\rangle + \frac{1}{\sqrt{2}}|1\rangle $$If we measure this qubit, the probability of finding it in the $|0\rangle$ state is:$$ P(0) = \left| \frac{1}{\sqrt{2}} \right|^2 = \frac{1}{2} = 0.5 $$The probability of finding it in the $|1\rangle$ state is identical. This means the outcome is entirely random, like flipping a fair coin. However, if we change the amplitudes, we bias the coin.{"layout": {"title": {"text": "Amplitudes vs. Probabilities (Uneven Superposition)", "font": {"size": 16, "color": "#495057"}}, "barmode": "group", "xaxis": {"title": "Basis State"}, "yaxis": {"title": "Value"}, "plot_bgcolor": "#ffffff", "paper_bgcolor": "#ffffff", "font": {"family": "Arial, sans-serif"}, "showlegend": true, "height": 400, "width": 600, "margin": {"l": 50, "r": 50, "t": 50, "b": 50}}, "data": [{"x": ["|0⟩", "|1⟩"], "y": [0.866, 0.5], "name": "Amplitude (α, β)", "type": "bar", "marker": {"color": "#4dabf7"}}, {"x": ["|0⟩", "|1⟩"], "y": [0.75, 0.25], "name": "Probability (|α|², |β|²)", "type": "bar", "marker": {"color": "#38d9a9"}}]}Comparing amplitudes and probabilities for a biased qubit. Here, the amplitude for $|0\rangle$ is approximately 0.866, resulting in a 75% probability of measuring 0.Wave Function CollapseThe most significant difference between classical and quantum measurement is the collapse of the state vector. Before measurement, the qubit exists in a superposition defined by $\alpha$ and $\beta$. After measurement, the superposition is destroyed.If you measure the qubit and the result is 0, the state of the qubit instantly becomes:$$ |\psi_{new}\rangle = 1|0\rangle + 0|1\rangle $$The coefficient $\alpha$ becomes 1, and $\beta$ becomes 0. If you were to measure the qubit a second time immediately after the first measurement, you would get 0 again with 100% probability. The randomness exists only during the first measurement of the superposition.This irreversible change is often referred to as the collapse of the wave function. It implies that we cannot measure a qubit to "peek" at its amplitudes. We cannot ask the qubit, "What is your value for $\alpha$?" We can only ask, "Are you 0 or 1?" and the qubit is forced to choose.The Measurement FlowTo determine the exact distribution of a superposition (the values of $\alpha$ and $\beta$), we cannot rely on a single qubit. Instead, we must repeat the experiment many times. This is often called "sampling" or running "shots."Initialize: Prepare a qubit in the state $|0\rangle$.Operate: Apply gates (like Hadamard) to create the target superposition.Measure: Record the result (0 or 1).Repeat: Do this 1,000 times.If you count 500 zeros and 500 ones, you can infer that the probabilities were 50/50, and therefore $|\alpha| \approx |\beta|$.digraph G { rankdir=TB; node [style=filled, fontname="Arial", shape=box, color="#dee2e6"]; edge [color="#868e96"]; start [label="Superposition State\n|ψ⟩ = α|0⟩ + β|1⟩", fillcolor="#d0bfff"]; measure [label="Measurement Operator", fillcolor="#96f2d7", shape=diamond]; outcome0 [label="Outcome: 0\nNew State: |0⟩", fillcolor="#ffc9c9"]; outcome1 [label="Outcome: 1\nNew State: |1⟩", fillcolor="#ffc9c9"]; start -> measure; measure -> outcome0 [label="Prob = |α|²", fontcolor="#495057"]; measure -> outcome1 [label="Prob = |β|²", fontcolor="#495057"]; }The process of state collapse. The input allows for multiple possibilities, but the output is singular and deterministic for future measurements.Measurement in the Z-BasisThroughout this course, when we say "measure," we specifically mean measuring in the Computational Basis (or Z-basis). This corresponds to checking if the state vector is pointing towards the North Pole ($|0\rangle$) or the South Pole ($|1\rangle$) of the Bloch sphere.Physically, this aligns with the Z-axis. While it is mathematically possible to measure along the X or Y axes, standard quantum hardware typically performs measurements along the Z-axis. If we want to measure a different property, we usually rotate the state first so that the information aligns with the Z-axis, and then perform the standard measurement.Understanding this limitation is essential for circuit design. You cannot simply observe the entire quantum state. You must design your algorithms so that the correct answer appears with high probability when the collapse occurs. In the next section, you will use Python to create these circuits, observing how the statistical nature of measurement plays out in actual code.