Chapter 4: The First Qubit

Everything you have learned so far - bits, logic gates, reversible circuits - has been building to this moment. In Part I, we saw that classical computation is powerful but ultimately limited: every bit is either 0 or 1, every gate maps definite inputs to definite outputs, and every computation proceeds along a single, predictable path. Now we cross the threshold into a fundamentally different kind of computing, one where a single bit of quantum information - a qubit - can do things no classical bit ever could.

This chapter is the pivot point of the entire textbook. By the end of it, you will understand the three ideas that make quantum computing possible: superposition, measurement, and interference. You will see these ideas first through a physical experiment with polarized light, then through the geometry of the Bloch sphere, and finally through the precise language of linear algebra and Dirac notation. Take your time here. The rest of the book builds directly on what you learn in the next few sections.

4.1 What Makes Quantum Different

If you had to explain quantum computing to a friend in sixty seconds, you would need exactly three ideas. Not one, not two - all three are required, and none of them alone is sufficient. They are:

  1. Superposition - A qubit can exist in a combination of 0 and 1 simultaneously.
  2. Measurement - When you observe a qubit, the superposition collapses to a single definite outcome.
  3. Interference - Quantum amplitudes can combine so that some outcomes reinforce each other and others cancel out.

Let us build intuition for each of these, starting with analogies from everyday experience and then sharpening them into precise concepts.

Superposition: Not Just Classical Uncertainty

Consider a coin spinning in the air. Before it lands, is it heads or tails? Neither - both possibilities are "alive" simultaneously. A qubit in superposition is something like this: it carries the potential for both 0 and 1, with each possibility having a specific weight (called an amplitude) that determines how likely each outcome is when we finally look.

But the analogy has a critical flaw, and getting this right matters enormously. A spinning coin is in some definite physical state at every instant - we just lack the information to predict which side will land up. Our uncertainty is about our knowledge, not about the coin itself. A qubit in superposition is genuinely different: it is not secretly in state 0 or secretly in state 1 with us merely ignorant of which. The superposition is a real, physical property of the system. We know this because quantum superpositions produce effects - specifically, interference - that classical uncertainty cannot.

Common Misconception.

"A qubit in superposition is in both states at the same time, like a coin that is heads AND tails." This is misleading. The qubit is not simultaneously 0 and 1 in the way you might picture two coins sitting on a table. Instead, the qubit is in a single, well-defined quantum state that happens to have components along both $|0\rangle$ and $|1\rangle$. Superposition is a property of the state, not a doubling of reality. The spinning coin analogy captures the "uncommitted" feeling of superposition, but fails to capture the fact that quantum uncommittedness can produce interference while classical uncertainty cannot.

Measurement: The Moment of Commitment

With a classical bit, you can read its value as many times as you like, and it remains unchanged. Measurement in the quantum world is radically different. When you measure a qubit in superposition, two things happen simultaneously: (1) you get a definite result, either 0 or 1, chosen randomly according to specific probabilities, and (2) the superposition is destroyed. The qubit snaps into whatever state you observed. If you measure it again immediately, you will get the same answer - but the original superposition is gone forever.

This is not a limitation of our instruments. No matter how carefully you design your measuring device, every measurement of a qubit in superposition disturbs it. This is a fundamental law of nature, not an engineering problem to be solved. It forces quantum algorithm designers to think very carefully about when and how they extract information from their qubits.

Interference: The Real Source of Quantum Power

If superposition were the whole story, quantum computing would be no more powerful than flipping coins. The real computational power comes from interference. Think of ripples on a pond. When two circular wave fronts meet, they can reinforce each other (constructive interference, making a taller wave) or cancel each other out (destructive interference, flattening the water). The height of a water wave can be positive (crest) or negative (trough), and when waves overlap, their heights add algebraically. A crest meeting a trough of equal size produces nothing.

Quantum amplitudes work the same way. Each amplitude is a number that can be positive, negative, or even complex-valued. When a quantum computation combines multiple paths to the same outcome, the amplitudes along those paths add up. Paths with amplitudes of opposite sign cancel; paths with amplitudes of the same sign reinforce. A quantum algorithm is essentially a choreography of interference: you set up a superposition over many possible answers, then apply operations that cause wrong answers to interfere destructively while correct answers interfere constructively. When you finally measure, the correct answer appears with high probability.

The Quantum Computing Trinity.

Superposition creates possibilities. Interference shapes them. Measurement reveals the answer. All three are essential. Superposition without interference is just randomness. Interference without measurement gives no output. And measurement without superposition gives you a classical bit.

Your First Quantum Experiment

Let us see these ideas in action. The exercise below runs a simple quantum program: it creates a qubit (which starts in state $|0\rangle$), applies a Hadamard gate (which creates an equal superposition - we will study it in detail soon), and measures the result 1024 times. Before you run it, make a prediction.

4.2 Polarized Light: Your First Quantum System

Before we dive into abstract mathematics, let us ground our intuition in a physical system you can actually see and touch: polarized light. This is not merely a teaching analogy. The polarization of a single photon is a genuine two-level quantum system - a real qubit, used in actual quantum cryptography systems. The experiments below demonstrate quantum superposition, measurement, and state transformation using nothing more than polarizing filters.

What Is Polarization?

Light is an electromagnetic wave. As it travels toward you, the electric field oscillates in a plane perpendicular to the direction of travel. The orientation of that oscillation is the light's polarization. If the electric field oscillates vertically, we call it vertically polarized. If it oscillates horizontally, we call it horizontally polarized. These two orthogonal polarization directions form a natural pair of basis states - just like $|0\rangle$ and $|1\rangle$ for a qubit:

  • Vertical polarization $\leftrightarrow$ $|0\rangle$
  • Horizontal polarization $\leftrightarrow$ $|1\rangle$

A photon can also be polarized at any angle between vertical and horizontal. A photon polarized at 45 degrees is in a superposition of vertical and horizontal - exactly analogous to a qubit in a superposition of $|0\rangle$ and $|1\rangle$.

Experiment 1: A Single Polarizing Filter

Take a polarizing filter - the same material used in polarized sunglasses - and hold it in front of an unpolarized light source. Roughly half the light passes through. The transmitted light is now polarized along the filter's transmission axis. Rotate the filter: the brightness stays the same, because unpolarized light has no preferred direction.

Here is the quantum interpretation: each incoming photon is in a random superposition of "pass" and "block" relative to the filter's axis. The filter acts as a measurement device. Each photon either passes through (outcome: polarized along the filter axis) or is absorbed (outcome: polarized perpendicular to the axis). For unpolarized light, the probability is 50/50 - exactly like measuring our Hadamard-prepared qubit.

Experiment 2: Two Crossed Filters

Now place two polarizing filters in sequence. Align them both vertically: all the light that passes the first filter also passes the second, because vertically polarized photons are already in the "pass" state for a vertical filter. Now rotate the second filter to be horizontal (90 degrees from the first): no light gets through.

In quantum language: the first filter prepares each photon in the state "vertically polarized" ($|0\rangle$). The second filter measures "are you horizontally polarized?" ($|1\rangle$). Since vertical and horizontal are orthogonal states, the probability of passing is zero. This is the quantum analogue of: if a qubit is definitely $|0\rangle$, measuring it will never yield $|1\rangle$.

More generally, when polarized light hits a filter at angle $\theta$ relative to its polarization, the probability of transmission is $\cos^2\theta$. This is Malus's law, discovered experimentally in 1809. In quantum language, it is just the Born rule applied to photon polarization.

Experiment 3: The Surprise - Three Filters

Here is where things get genuinely strange. Start with two crossed filters (vertical, then horizontal) so that no light passes through. Now insert a third filter between them, oriented at 45 degrees. Classically, adding an extra barrier should block even more light. But what actually happens?

Light comes through.

This result baffled physicists when it was first analyzed by Paul Dirac in his 1930 textbook The Principles of Quantum Mechanics. But it follows directly from superposition and the fact that measurement changes the state. Here is the chain of events, step by step:

  1. First filter (vertical): Transmits vertically polarized photons. State after: $|V\rangle$ (our $|0\rangle$).
  2. Second filter (45 degrees): A vertically polarized photon encountering a 45-degree filter is in a superposition relative to that filter's axis. By Malus's law, the probability of transmission is $\cos^2(45^\circ) = (1/\sqrt{2})^2 = 1/2$. So 50% of photons pass. The key point: photons that pass are now polarized at 45 degrees. The measurement changed the state.
  3. Third filter (horizontal): A 45-degree photon encountering a horizontal filter is again in a superposition. The probability of transmission is $\cos^2(45^\circ) = 1/2$. So 50% of the surviving photons make it through.

The final result: $1 \times \frac{1}{2} \times \frac{1}{2} = \frac{1}{4}$ of the original vertically polarized photons pass through all three filters. Inserting a filter between two crossed filters increased the amount of light getting through from 0% to 25%. Adding an absorber let more light through.

This is not a trick or an illusion. It is a direct consequence of the fact that quantum measurement changes the state. The 45-degree filter did not merely observe the photon's polarization - it transformed it into a new state (45-degree polarization) that now has a nonzero chance of passing the horizontal filter. No classical model of "the photon is secretly either vertical or horizontal and we just don't know which" can reproduce this result.

Key Concept.

The three-filter experiment demonstrates all three quantum ideas at once: superposition (the photon's polarization state relative to each filter), measurement (each filter collapses the state and transforms it), and interference (the way amplitudes combine through successive filters). Photon polarization is not just an analogy for a qubit - it is a qubit, used in real quantum key distribution systems.

Note.

If you have polarized sunglasses, you can try a version of this experiment at home. Hold two pairs of sunglasses at 90 degrees to each other (no light passes through). Then insert a third lens at 45 degrees between them. You should see the dark overlap region brighten. The effect is most dramatic with film polarizers, but works with any polarizing lenses.

Polarization Filter Simulator

Drag filter angles to simulate Malus's law. Start with two crossed filters, then add a third at 45 degrees to see the three-filter surprise.

4.3 The Qubit, Geometrically (The Bloch Sphere)

A classical bit has two states: 0 and 1. You could represent these as two points on a line. A qubit, by contrast, can exist in a continuous infinity of states - every possible superposition of $|0\rangle$ and $|1\rangle$, with every possible relative phase. What geometric shape captures all these possibilities?

The answer is a sphere: the Bloch sphere, named after the physicist Felix Bloch. Every single-qubit pure state corresponds to exactly one point on the surface of this unit sphere. It is one of the most important visualizations in all of quantum computing, and learning to read it will give you geometric intuition for everything that follows.

Reading the Bloch Sphere

The Bloch sphere uses two angles to specify any qubit state:

  • $\theta$ (theta) - the polar angle, measured from the north pole. Range: $0 \leq \theta \leq \pi$.
  • $\phi$ (phi) - the azimuthal angle, measured from the positive $x$-axis in the equatorial plane. Range: $0 \leq \phi < 2\pi$.

The key landmarks on the sphere:

  • North pole ($\theta = 0$): the state $|0\rangle$.
  • South pole ($\theta = \pi$): the state $|1\rangle$.
  • Positive $x$-axis ($\theta = \pi/2, \phi = 0$): the state $|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$.
  • Negative $x$-axis ($\theta = \pi/2, \phi = \pi$): the state $|-\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)$.
  • Positive $y$-axis ($\theta = \pi/2, \phi = \pi/2$): the state $|{+i}\rangle = \frac{1}{\sqrt{2}}(|0\rangle + i|1\rangle)$.
  • Negative $y$-axis ($\theta = \pi/2, \phi = 3\pi/2$): the state $|{-i}\rangle = \frac{1}{\sqrt{2}}(|0\rangle - i|1\rangle)$.

Two important patterns emerge from this map:

  • $\theta$ controls the measurement probabilities. At the north pole ($\theta = 0$), measuring always gives 0. At the south pole ($\theta = \pi$), measuring always gives 1. At the equator ($\theta = \pi/2$), you get a 50/50 split. Points in between give intermediate probabilities.
  • $\phi$ controls the relative phase. Moving around the equator changes the phase relationship between the $|0\rangle$ and $|1\rangle$ components without changing the measurement probabilities. The states $|+\rangle$ and $|-\rangle$ both give 50/50 outcomes in the computational basis, but they sit at opposite points on the equator and behave very differently under quantum gates.

The mathematical formula connecting the Bloch sphere angles to the qubit state vector is:

$$|\psi\rangle = \cos\frac{\theta}{2}\,|0\rangle + e^{i\phi}\sin\frac{\theta}{2}\,|1\rangle$$

Do not worry if the $e^{i\phi}$ factor looks mysterious - we will explain it in Section 4.4. For now, just note that $\theta$ appears as $\theta/2$ in the formula. This half-angle convention means that moving from the north pole to the south pole requires $\theta$ to go from 0 to $\pi$ (not $2\pi$), which is the natural range for a polar angle on a sphere.

Interactive Bloch Sphere Explorer

Use the sliders below to explore the Bloch sphere. Adjust $\theta$ to move between the north pole ($|0\rangle$) and the south pole ($|1\rangle$). Adjust $\phi$ to rotate around the equator. Watch how the measurement histogram changes as you vary $\theta$, and notice that $\phi$ has no effect on the measurement probabilities - it only changes the phase.

Exercises for Exploration.
  • $\theta = 0$, $\phi = 0$: The north pole ($|0\rangle$). You should see 100% outcome 0.
  • $\theta \approx 3.14$ ($\pi$), $\phi = 0$: The south pole ($|1\rangle$). You should see 100% outcome 1.
  • $\theta \approx 1.57$ ($\pi/2$), $\phi = 0$: The equator, specifically the $|+\rangle$ state. You should see a 50/50 split.
  • $\theta \approx 1.57$, $\phi \approx 3.14$ ($\pi$): The $|-\rangle$ state, on the opposite side of the equator. Still 50/50 - phase is invisible to this measurement.
  • $\theta \approx 1.05$ ($\pi/3$), $\phi = 0$: This state has $P(0) = \cos^2(\pi/6) = 3/4$ and $P(1) = 1/4$. You should see roughly 75% outcome 0 and 25% outcome 1.

The fact that $\phi$ does not change the measurement histogram is one of the most important subtleties in quantum mechanics. Phase is invisible when you measure in the computational basis ($|0\rangle$ vs. $|1\rangle$), but it is absolutely real. Phase determines how the qubit responds to subsequent quantum gates and how it interferes with other qubits. Phase is the hidden ingredient that makes quantum algorithms work, and we will see this vividly starting in Chapter 5.

Common Misconception.

"If phase doesn't affect measurement, then it doesn't matter." This is wrong. Phase does not affect measurement in the computational basis, but it profoundly affects what happens when you apply further gates before measuring. For example, the states $|+\rangle$ and $|-\rangle$ give identical 50/50 results when measured directly. But if you apply a Hadamard gate first, $|+\rangle$ becomes $|0\rangle$ (always measured as 0) while $|-\rangle$ becomes $|1\rangle$ (always measured as 1). The phase made all the difference. We will explore this further in the measurement section and in Chapter 5.

4.4 The Qubit, Mathematically

We have built intuition through polarizing filters and the Bloch sphere. Now it is time for the precise mathematical language. If the geometry of Section 4.3 was the map, this section is the coordinate system.

State Vectors

A qubit is a quantum system with two basis states, which we label $|0\rangle$ and $|1\rangle$. The general state of a qubit is a state vector:

$$|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle$$

where $\alpha$ and $\beta$ are complex numbers called amplitudes. If you have not encountered complex numbers before (or need a refresher), recall from Chapter 2 that a complex number has two parts, a real part and an imaginary part, written as $a + bi$ where $i = \sqrt{-1}$. Every complex number also has a magnitude (or absolute value), written $|a + bi| = \sqrt{a^2 + b^2}$.

The Normalization Condition

Not every pair of complex numbers $(\alpha, \beta)$ describes a valid qubit state. The amplitudes must satisfy the normalization condition:

$$|\alpha|^2 + |\beta|^2 = 1$$

This condition ensures that the total probability of all possible measurement outcomes sums to 1, as it must for any valid probability distribution. Geometrically, it means the state vector has unit length - it lives on the surface of a sphere, not inside it.

Some valid qubit states to verify:

  • $|0\rangle$: $\alpha = 1, \beta = 0$. Check: $|1|^2 + |0|^2 = 1$.
  • $|+\rangle = \frac{1}{\sqrt{2}}|0\rangle + \frac{1}{\sqrt{2}}|1\rangle$: Check: $\left(\frac{1}{\sqrt{2}}\right)^2 + \left(\frac{1}{\sqrt{2}}\right)^2 = \frac{1}{2} + \frac{1}{2} = 1$.
  • $\frac{\sqrt{3}}{2}|0\rangle + \frac{1}{2}|1\rangle$: Check: $\frac{3}{4} + \frac{1}{4} = 1$.
  • $\frac{1}{\sqrt{2}}|0\rangle + \frac{i}{\sqrt{2}}|1\rangle$: Check: $\left(\frac{1}{\sqrt{2}}\right)^2 + \left|\frac{i}{\sqrt{2}}\right|^2 = \frac{1}{2} + \frac{1}{2} = 1$. (Recall that $|i| = 1$.)

The Born Rule

When you measure a qubit in the state $|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle$, the outcomes and their probabilities are given by the Born rule:

$$P(0) = |\alpha|^2, \qquad P(1) = |\beta|^2$$

This rule, proposed by Max Born in 1926, is one of the foundational postulates of quantum mechanics: the probability of a measurement outcome equals the squared magnitude of the corresponding amplitude. It cannot be derived from anything more basic - it is where probability enters quantum mechanics.

Let us work through examples:

Example 1: The $|0\rangle$ state. Here $\alpha = 1$ and $\beta = 0$. Probabilities: $P(0) = 1$, $P(1) = 0$. Measuring always gives 0. This is a definite classical state - no superposition, no randomness.

Example 2: The $|+\rangle$ state. Here $\alpha = \beta = 1/\sqrt{2}$. Probabilities: $P(0) = 1/2$, $P(1) = 1/2$. This is the equal superposition we saw in our first sandbox experiment.

Example 3: An unequal superposition. Consider $|\psi\rangle = \frac{\sqrt{3}}{2}|0\rangle + \frac{1}{2}|1\rangle$. Probabilities: $P(0) = 3/4 = 75\%$, $P(1) = 1/4 = 25\%$. This qubit is biased toward $|0\rangle$ but has a 25% chance of being found in $|1\rangle$. On the Bloch sphere, this state sits at $\theta = \pi/3$ (60 degrees from the north pole).

Example 4: Complex amplitudes. Consider $|\psi\rangle = \frac{1}{\sqrt{2}}|0\rangle + \frac{i}{\sqrt{2}}|1\rangle$. Probabilities: $P(0) = |1/\sqrt{2}|^2 = 1/2$, $P(1) = |i/\sqrt{2}|^2 = 1/2$. The measurement statistics are identical to $|+\rangle$, even though the amplitudes are different. The factor of $i$ is a phase difference. On the Bloch sphere, this state sits on the equator at $\phi = \pi/2$ (the positive $y$-axis).

Born Rule Calculator

Enter complex amplitudes $\alpha$ and $\beta$. The calculator checks normalization and shows measurement probabilities.

The circuit above uses a $R_y(\pi/3)$ rotation to prepare the state $\cos(\pi/6)|0\rangle + \sin(\pi/6)|1\rangle = \frac{\sqrt{3}}{2}|0\rangle + \frac{1}{2}|1\rangle$. Run it and verify that you see approximately 75% outcome 0 and 25% outcome 1.

Column Vector Notation

It is often convenient to represent qubit states as column vectors. We define:

$$|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \qquad |1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$$

Then a general qubit state becomes:

$$|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle = \alpha\begin{pmatrix} 1 \\ 0 \end{pmatrix} + \beta\begin{pmatrix} 0 \\ 1 \end{pmatrix} = \begin{pmatrix} \alpha \\ \beta \end{pmatrix}$$

This representation makes it natural to describe quantum gates as matrices that multiply these vectors - a topic we take up in full detail in Chapter 5. As a preview, the Hadamard gate we have been using is the matrix:

$$H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}$$

Applying $H$ to $|0\rangle$:

$$H|0\rangle = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 \\ 1 \end{pmatrix} = \frac{1}{\sqrt{2}}|0\rangle + \frac{1}{\sqrt{2}}|1\rangle = |+\rangle$$

This confirms what we saw in the sandbox: applying the Hadamard gate to $|0\rangle$ produces the equal superposition state $|+\rangle$.

Global Phase vs. Relative Phase

Two state vectors that differ only by a global phase represent the same physical state. A global phase means multiplying the entire vector by some complex number $e^{i\gamma}$ of magnitude 1:

$$|\psi\rangle \quad \text{and} \quad e^{i\gamma}|\psi\rangle \quad \text{describe the same physical state.}$$

For example, $|0\rangle$, $-|0\rangle$, $i|0\rangle$, and $e^{i\pi/3}|0\rangle$ are all physically identical. No measurement of any kind can distinguish them. This is because the Born rule takes the squared magnitude $|e^{i\gamma}\alpha|^2 = |e^{i\gamma}|^2|\alpha|^2 = |\alpha|^2$, and the global phase factor drops out.

However, a relative phase between the $|0\rangle$ and $|1\rangle$ components is physically meaningful. The states:

$$|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) \qquad \text{and} \qquad |-\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)$$

have the same measurement probabilities in the computational basis (both give 50/50), but they are distinct physical states. They sit at opposite points on the Bloch sphere equator ($\phi = 0$ and $\phi = \pi$, respectively), and they respond differently to quantum gates. This is why global phase can be ignored but relative phase cannot.

Connecting to the Bloch Sphere

Thanks to the global phase freedom, we can always choose to write a qubit state with $\alpha$ being a non-negative real number. With this convention, the most general single-qubit state becomes:

$$|\psi\rangle = \cos\frac{\theta}{2}\,|0\rangle + e^{i\phi}\sin\frac{\theta}{2}\,|1\rangle$$

where $0 \leq \theta \leq \pi$ and $0 \leq \phi < 2\pi$. Let us verify this satisfies normalization:

$$\left|\cos\frac{\theta}{2}\right|^2 + \left|e^{i\phi}\sin\frac{\theta}{2}\right|^2 = \cos^2\frac{\theta}{2} + \sin^2\frac{\theta}{2} = 1$$

The factor $|e^{i\phi}|^2 = 1$ drops out, confirming the state is properly normalized for all values of $\theta$ and $\phi$. The Cartesian coordinates of the corresponding point on the Bloch sphere are:

$$(x, y, z) = (\sin\theta\cos\phi,\; \sin\theta\sin\phi,\; \cos\theta)$$

This is the standard spherical coordinate formula, confirming that $\theta$ and $\phi$ map every qubit state to a unique point on the unit sphere (up to global phase).

4.5 Dirac Notation: The Language of Quantum

You have already been reading expressions like $|0\rangle$ and $|\psi\rangle$ for several sections. It is time to learn the notation properly. Dirac notation, invented by the physicist Paul Dirac in 1939, is used universally in quantum computing and quantum physics. It is not merely a convention - it is engineered to make quantum calculations cleaner and less error-prone.

Kets

The symbol $|\cdot\rangle$ is called a ket (rhymes with "set"). A ket represents a quantum state - a column vector in our vector space. The label inside the ket is just a name for the state:

  • $|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$ - the basis state corresponding to outcome 0
  • $|1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}$ - the basis state corresponding to outcome 1
  • $|\psi\rangle$ - a general state (psi is a traditional label)
  • $|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$ - the "plus" state
  • $|-\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)$ - the "minus" state

The pair $\{|0\rangle, |1\rangle\}$ is called the computational basis (or standard basis, or $Z$-basis). The pair $\{|+\rangle, |-\rangle\}$ is the Hadamard basis (or $X$-basis). Both are valid choices of basis for describing a qubit, just as you can describe a direction in a room using north/south or using left/right - the underlying reality is the same, but the coordinate labels differ.

Bras

The bra $\langle\cdot|$ is the mirror image of the ket. Mathematically, it is the conjugate transpose (also called Hermitian conjugate or adjoint) of the corresponding ket. If $|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$, then $\langle 0| = \begin{pmatrix} 1 & 0 \end{pmatrix}$. If $|\psi\rangle = \begin{pmatrix} \alpha \\ \beta \end{pmatrix}$, then $\langle\psi| = \begin{pmatrix} \alpha^* & \beta^* \end{pmatrix}$, where $\alpha^*$ denotes the complex conjugate (change the sign of the imaginary part).

The naming is Dirac's pun: a "bra" and a "ket" together form a "bracket." This is deliberate and rather charming.

Inner Products (Bra-Kets)

When you combine a bra and a ket, you get the inner product (or bracket), written $\langle\phi|\psi\rangle$. This is a single complex number that measures the "overlap" between two quantum states. Compute it by multiplying the row vector (bra) by the column vector (ket):

$$\langle\phi|\psi\rangle = \begin{pmatrix} \phi_0^* & \phi_1^* \end{pmatrix} \begin{pmatrix} \psi_0 \\ \psi_1 \end{pmatrix} = \phi_0^*\psi_0 + \phi_1^*\psi_1$$

Key properties of the inner product:

  • Orthogonality: $\langle 0|1\rangle = 0$ and $\langle 1|0\rangle = 0$. The basis states have zero overlap - they are completely distinguishable by measurement.
  • Normalization: $\langle 0|0\rangle = 1$ and $\langle 1|1\rangle = 1$. Each basis state has unit overlap with itself.
  • Born rule, restated: The probability of measuring a state $|\psi\rangle$ and obtaining outcome $|k\rangle$ is $P(k) = |\langle k|\psi\rangle|^2$.

That last point is powerful. The Born rule, which we earlier stated as "square the amplitude," is equivalent to "take the inner product with the outcome state and square its magnitude." Let us verify:

$$P(0) = |\langle 0|\psi\rangle|^2 = \left|\begin{pmatrix} 1 & 0 \end{pmatrix}\begin{pmatrix} \alpha \\ \beta \end{pmatrix}\right|^2 = |\alpha|^2$$

Exactly as expected. And for the $|+\rangle$ and $|-\rangle$ states:

$$\langle +|-\rangle = \frac{1}{2}\begin{pmatrix} 1 & 1 \end{pmatrix}\begin{pmatrix} 1 \\ -1 \end{pmatrix} = \frac{1}{2}(1 + (-1)) = 0$$

So $|+\rangle$ and $|-\rangle$ are orthogonal - they form a basis, just like $|0\rangle$ and $|1\rangle$. This confirms what the Bloch sphere showed us: they sit at opposite poles of the $x$-axis.

Why Dirac Notation?

You might wonder why we need special notation when column vectors work fine. The reasons become clear as systems grow more complex:

  • Compactness: Writing $|01\rangle$ is much cleaner than writing out a 4-dimensional column vector.
  • Abstraction: Dirac notation works regardless of the specific representation. You can reason about states without committing to a particular basis.
  • Calculation: Expressions like $\langle\psi|H|\phi\rangle$ (apply a gate and take an inner product) are easy to read and manipulate algebraically.
  • Multi-qubit states: The tensor product notation $|0\rangle \otimes |1\rangle = |01\rangle$ (Chapter 6) scales naturally to any number of qubits.
Key Concept.

$|a\rangle$ = ket = column vector = quantum state. $\langle a|$ = bra = row vector = conjugate transpose. $\langle a|b\rangle$ = inner product = overlap = a complex number. $|\langle a|b\rangle|^2$ = probability that state $|b\rangle$ is found in state $|a\rangle$ upon measurement.

4.6 Measurement: Collapsing Possibilities

We have mentioned measurement several times, but now it is time to examine it with full mathematical precision. Measurement in quantum mechanics is not a passive act of reading a value - it is an active physical process that fundamentally and irreversibly changes the state of the system.

The Measurement Postulate

When you measure a qubit in the state $|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle$ in the computational basis:

  1. You obtain outcome 0 with probability $|\alpha|^2$, and the qubit's state becomes $|0\rangle$.
  2. You obtain outcome 1 with probability $|\beta|^2$, and the qubit's state becomes $|1\rangle$.

The crucial point is the second part of each statement: after measurement, the qubit is in the state corresponding to the outcome. The original superposition is destroyed. This is sometimes called "wavefunction collapse" or "state reduction." It is irreversible - once you have measured, there is no gate you can apply to recover the original amplitudes $\alpha$ and $\beta$.

Repeated Measurement

If you measure a qubit and obtain outcome 0, the state has collapsed to $|0\rangle$. Measuring again immediately will give 0 with certainty. The state $|0\rangle$ has $\alpha = 1$ and $\beta = 0$, so $P(0) = 1$. This is logically consistent: once the superposition has collapsed, the qubit behaves like a classical bit until you apply a gate to create a new superposition.

Measurement Is Irreversible

Recall from Chapter 3 that every quantum gate is reversible - it has an inverse that undoes its effect. But measurement breaks this reversibility. It is the one operation in quantum mechanics that is fundamentally irreversible. Mathematically, measurement is not a unitary transformation (it is not even a linear map on state vectors), which is why it stands apart from all quantum gates.

This has a practical consequence for algorithm design: you want to delay measurement as long as possible. The longer your qubits remain in superposition, the more you can exploit interference to shape the outcome probabilities. Once you measure, the quantum advantage is gone for that qubit.

Demonstrating Irreversibility

The next two sandboxes make the irreversibility concrete. In the first, we apply H, measure, apply H again, and measure again. If measurement did not collapse the state, the two Hadamard gates would cancel and we would always measure 0. But measurement destroys the superposition, so the second H operates on a definite state, and the final measurement gives random results.

Compare with this circuit, where we skip the intermediate measurement:

In the second circuit, the two Hadamard gates cancel each other: $HH = I$ (the identity). The qubit returns to $|0\rangle$, so you always measure 0. In the first circuit, the intermediate measurement collapses the superposition, preventing the cancellation. This is direct proof that measurement changes the quantum state - it is not a passive observation.

The Measurement Problem: One Copy Is Not Enough

Suppose someone hands you a single qubit in an unknown state $|\psi\rangle = \alpha\,|0\rangle + \beta\,|1\rangle$. Can you determine $\alpha$ and $\beta$? A single measurement gives you one bit of information (either 0 or 1) and destroys the state. You cannot go back and measure the same qubit again because it has already collapsed. And the no-cloning theorem (which we will prove in Chapter 6) says you cannot create exact copies of an unknown quantum state to build up statistics from many measurements.

A single unknown qubit state is therefore fundamentally unknowable from one copy. This is not a limitation of our technology - it is a law of nature. And it is not a bug: the no-cloning theorem is precisely what makes quantum cryptography secure. An eavesdropper cannot copy quantum information without disturbing it, so any interception is detectable.

Measurement Statistics and Shots

Because each individual measurement outcome is random, quantum computing relies on statistics. You run the same circuit many times (called "shots") and examine the distribution of outcomes. With enough shots, the relative frequencies converge to the true probabilities predicted by the Born rule.

How many shots do you need? With $N$ shots, the statistical uncertainty in an estimated probability $p$ is approximately $\sqrt{p(1-p)/N}$. For 1024 shots and $p = 0.5$, this gives an uncertainty of about $\pm 1.6\%$ - good enough for our demonstrations, but real quantum experiments often use tens of thousands of shots for higher precision.

Predict-Observe-Explain: Measurement Collapse

Predict
Observe
Explain

Predict

Circuit A applies H, then measures, then H again, then measures. Circuit B applies H, then H (no measurement in between), then measures. Will they produce the same results? What will each give?

Observe

Circuit A (H - measure - H - measure): The intermediate measurement collapses the superposition.

Circuit B (H - H - measure): No intermediate measurement.

Explain

Circuit B always gives $|0\rangle$ because $HH = I$ (the two Hadamards cancel). But Circuit A gives random results for the second measurement because the intermediate measurement collapsed the superposition. After collapse, the second H operates on a definite state ($|0\rangle$ or $|1\rangle$), creating a new 50/50 superposition. Measurement is irreversible - it destroys quantum information.

Predict-Observe-Explain: X Then H

Let us test your understanding with one more interactive exercise. This time, the circuit applies an X gate (which flips $|0\rangle$ to $|1\rangle$) followed by a Hadamard gate, then measures.

Chapter Summary.

A qubit is a two-level quantum system described by a state vector $|\psi\rangle = \alpha|0\rangle + \beta|1\rangle$ with $|\alpha|^2 + |\beta|^2 = 1$. The three pillars of quantum computing are superposition (qubits exist in combinations of basis states), measurement (which collapses the state and yields outcome $k$ with probability $|\langle k|\psi\rangle|^2$), and interference (which allows algorithms to amplify correct answers and suppress wrong ones). The Bloch sphere provides geometric intuition: $\theta$ controls measurement probabilities, $\phi$ controls relative phase. Dirac notation - kets $|a\rangle$, bras $\langle a|$, inner products $\langle a|b\rangle$ - is the standard language for expressing all of this concisely. Measurement is the one irreversible operation in quantum mechanics, and a single unknown quantum state cannot be determined from one copy.