Chapter 2 Overview¶
This chapter answers one big question: what is a qubit, physically and mathematically?
We’ll build the idea in a few steps:
Interference: amplitudes add, then we square to get what we observe
Complex numbers and phase: phase acts like a rotation, and complex numbers keep track of it cleanly
The qubit picture: a qubit is a 2D complex vector, often visualized on the Bloch sphere
Real examples: photon polarization and spin-½ are our two main physical qubits
Operations: single-qubit gates are rotations (and interference is how they show up in experiments)
By the end of the chapter, “qubit” should feel like a concrete wave/interference object—not a slogan.
Today’s Focus¶
Today we focus on the mathematical foundations:
The wave equation and its solutions
Complex exponentials as a powerful tool for wave physics
Interference — what happens when waves combine
Why does this matter for quantum computing? Quantum algorithms work by manipulating amplitudes so that wrong answers interfere destructively and right answers interfere constructively. Understanding interference is understanding how quantum computers compute.
Let’s start with waves.
The Wave Equation¶
Waves are everywhere in physics—light, sound, water, quantum mechanics. They all share a common mathematical structure.
Waves in Space¶
Consider a wave that varies in space at a fixed moment in time. The simplest wave equation is:
This says: “the second derivative of is proportional to itself.” Functions that equal (minus) their own second derivative are oscillatory—exactly what we expect for waves.
This is a second-order ordinary differential equation (ODE). From ODE theory, we know there must be two linearly independent solutions. Any solution can be written as a linear combination of these two.
One natural choice are the sines and cosines. The general real solution is:
Verify for yourself that both of these are valid solutions. We say these are two linearly independent solutions because there are no constants and such that for all , except for .
The constant is called the wavenumber:
where is the wavelength. The wave repeats every time increases by :
However, another equally valid choice are the complex exponentials:
Verify for yourself that these are also linearly independent. Both forms are correct. They’re connected by Euler’s formula:
From this we can derive:
And solving these two for the trig functions gives:
So and span the same solution space—they’re just different bases. We’ll use whichever is more convenient.
Waves in Time¶
Now consider oscillation in time at a fixed position. The equation has the same form:
Same math, different physical meaning. Solutions include , , and .
The constants:
Period : time for one complete oscillation
Frequency : oscillations per second (Hz)
Angular frequency : radians per second
Traveling Waves: Space and Time Together¶
For light and other propagating waves, we need both space and time. If we look at the field at a fixed time it will look like . If we look at it at a fixed position it will look like .
The full wave equation is:
where is the wave speed. This is a partial differential equation. It contains derivatives with respect to both position and time, which is why we write instead of .
The traveling wave solution:
describes a sinusoidal pattern moving to the right. To see this, rewrite it:
This has the form —a shape that shifts to the right with speed . Similarly, has the form and travels to the left.
For electromagnetic waves:
The two linearly independent real solutions are and (or equivalently, right-traveling and left-traveling waves).
Just like before, there is also a complex form of the traveling wave: and . Verify for yourself that satisfies the wave equation. In classical electromagnetism, the electric field is real. But calculations are often easier using complex exponentials. Why?
Derivatives are simpler. They just bring down a factor of or —no sign changes or switching between sin and cos.
Adding waves is easier. Suppose we want to add two waves with different phases:
Using trig identities, this requires expanding and collecting terms. Tedious.
Using complex exponentials:
We just factor out the common piece. The phases combine by multiplication, which is much simpler than trig identities.
When we talk about waves, we will generally assume the complex form:
If we need the physical (real) field, we take the real part:
Often, we only need the intensity , and we never need to take the real part at all.
Intensity: What Detectors Measure¶
Detectors (your eye, a camera, a photodiode) don’t measure the electric field directly. They measure intensity, which is proportional to the square of the field:
Why squared? Energy in electromagnetic waves goes as (and ), and detectors respond to energy.
Time Averaging for Real Waves¶
The field oscillates rapidly—hundreds of THz for visible light. That’s oscillations per second. No detector can follow oscillations that fast; even the fastest photodetectors have response times of picoseconds (10-12 s), which is still thousands of optical cycles.
So detectors respond to the time-averaged intensity.
At a fixed position, let . Then:
The average of over one period is :
The Complex Shortcut¶
Here’s the beautiful part: the complex representation gives us intensity without time averaging. For the complex field :
We used the key fact:
The time dependence cancels! The magnitude squared of the complex amplitude directly gives us something proportional to intensity, with no integral required.
Interference¶
Now the payoff: what happens when two waves combine?
Setup: Two Sources¶
Imagine two point sources emitting waves. At a detector, the waves have traveled different distances and .
Each source contributes a complex amplitude at the detector:
The total field is the sum of the amplitudes:
The Cross Term: Where Interference Lives¶
Before doing the full calculation, let’s see the structure. For any two complex amplitudes:
The last term is the cross term (or interference term). It depends on the relative phase between and .
The Intensity Calculation¶
Now let’s work it out explicitly. The intensity is:
Step 1: Factor out common terms.
Since :
Step 2: Factor out .
where is the path difference.
Step 3: Expand the magnitude squared.
The Interference Formula¶
Using the identity , we can also write this as:
This form makes the oscillation between 0 and 4 more explicit. The intensity depends only on the path difference .
Global Phase Doesn’t Matter¶
Notice what happened in Step 1: the overall time-dependent phase dropped out completely. And in Step 2, the overall spatial phase also dropped out.
Only the relative phase matters.
This is a general principle: if we multiply all amplitudes by the same phase factor , the intensity doesn’t change:
Global phase is unobservable. Only relative phases between different paths or components affect measurements. This will be important throughout quantum mechanics.
Constructive and Destructive Interference¶
| Condition | Phase | Intensity | |
|---|---|---|---|
| Constructive | +1 | (max) | |
| Destructive | -1 | (min) |
Constructive interference (): The waves arrive “in step”—peak meets peak, trough meets trough. They reinforce.
Destructive interference (): The waves arrive “out of step”—peak meets trough. They cancel.
The key insight: we add amplitudes first, then square. This creates the cross term that depends on the relative phase.
Summary¶
Wave equation: has two linearly independent solutions; we can use or
Euler’s formula: connects the two bases
Traveling waves: moves right with speed
Complex representation: Use —derivatives and addition are simpler
Intensity: (magnitude squared of complex amplitude)
Interference: When two waves combine:
The cross term is where interference lives
Constructive when
Destructive when
Global phase is unobservable: Only relative phases affect measurements
Looking Ahead¶
Next lecture: We’ll see interference in action with the Mach-Zehnder interferometer—and discover that it’s mathematically identical to a quantum computing circuit. The interferometer will be our first concrete example of a qubit.
Homework 2.1¶
Problem 1: Separation of Variables for the Wave Equation¶
The wave equation in one dimension is:
Solve this equation using separation of variables. Use the complex exponential form for your solutions. (Feel free to use the form if you are a maniac.)
(a) Assume a solution of the form . Substitute this into the wave equation and show that you can separate it into:
Hint: After substituting, divide both sides by .
(b) The left side depends only on , and the right side depends only on . For these to be equal for all and , both sides must equal the same constant. Call it (we choose negative so we get oscillatory solutions). Write the two ordinary differential equations for and .
(c) Solve each ODE. What is the general solution ?
(d) Show that the separation constant and the resulting frequency in are related by . This is the dispersion relation for waves.
Problem 2: Visualizing Traveling Waves¶
Plot the traveling wave with and , where and .
(a) Plot vs over several wavelengths so you can see many oscillations. Change and watch the wave travel. Feel free to make an animation if you want to watch a video. There are many ways to do this in python.
(b) Now change to (i.e., flip the sign of the term). What’s the difference?
Problem 3: Complex Exponential Conversion¶
The general real solution to the wave equation can be written as:
or equivalently as:
Find and in terms of and .
Problem 4: Intensity and Time Averaging¶
(a) Show that by computing the integral:
Hint: Use the identity .
(b) Similarly, show that .
(c) What is ? This “cross term” will be important for interference.
(d) For a complex wave , compute and show it’s constant in time.