# Playing dice with the Universe: Polarization revisited

Einstein himself said that God doesn’t roll dice. But he was wrong. And in fact, anyone who has ever played role-playing games knows that God probably had to roll quite a few dice to come up with a character like Einstein.
—Larry Wall, creator of the Perl programming language

Last week, I introduced the idea of quantum states in terms of the polarization of light, which is one of the simplest quantum systems. Despite the length of the post, I could only begin to explain the mechanics of quantum mechanics, either conceptually or mathematically, so today I’m going to fill in a few details — and elaborate a bit more on randomness and indeterminacy.

A common misconception is that randomness means complete unpredictability, when nothing could be farther from the truth. If you flip a coin, it will come up heads about half the time, and tails every other time (Discworld aside). That’s incredibly predictable! Sure, any particular toss can’t be absolutely predicted in advance, but the probability of any single toss is unchanged.

Polarization is a little trickier, because we can’t know the probability of an individual photon getting through a polarizing filter. To recap: if you shine unpolarized light, such as might be emitted from a light bulb, onto a polarizing filter, only about half the photons get through. However, it’s not the same thing as a coin flip: if you send a single photon at the filter at a time, there’s no way to know what the probability was, only whether it got through or not. However, as with coin-flipping, if you repeat the experiment enough times, you’ll see that half get through.

So, how does this work?

### Why only half of photons get through a filter

Again referring back to last week’s post, we considered the case of a stream of unpolarized photons approaching a filter oriented vertically with respect to the lab we’re working in. (Yes, we’re in a lab! Hadn’t you noticed?) We’ll consider each photon to be randomly polarized: the angle of its spin could be horizontal, vertical, or anywhere in between, and we won’t know.

The probability of it getting through the filter is $p(\varphi) = \sin^2 (\varphi)$
where $\varphi$ is the angle of the polarization compared to a horizontal line. (I’ll explain the details below, for those interested.) The sine function runs between -1 and 1, so when you square it, you get a number between 0 and 1. That implies the probability is between 0 and 100%, depending on the photon’s angle of polarization. By contrast, the probability of a perfect coin coming up tails is always 0.5, which means a 50% chance.

Now let’s assume we have more knowledge than we can ever actually have, and we know what the polarization angle of each photon is before it hits the filter. With that godlike information, we can calculate whether it gets through or not. Here’s how it works:

1. Take your favorite random-number generator and produce a number between 0 and 360. That’s the random angle of a single photon. I have several random-number generators I use for programs, but there’s also a good one online at Random.org.
2. Calculate the sine of that angle (make sure your calculator is set for degrees!), and square it. That’ll give you a number between 0 and 1, which is the probability of that photon getting through.
3. Now use your random number generator again to produce a decimal number between 0 and 1. If this number is less than the probability you found in step 2, the photon gets through. If it’s greater than the probability, it doesn’t.
4. Repeat this process many, many times, keeping track of how many total photons vs. how many actually get through. The ratio of the number that successfully passed through the filter to the total number of photons is your average probability. (You can do this by hand, of course, but it’s going to be easier and less error-prone if you can program it into a computer or programmable calculator.)

The number you get in step 4 should be pretty close to 0.5, though unless you run for a very large number of photons, it probably won’t be exactly half.

The video above shows my implementation of the steps above for 200 photons, with about 5 photons added per second. The horizontal axis is the polarization angle, while the vertical represents the probability. The solid blue line is the probability function $\sin^2 (\varphi)$, while the green dots and red x’s represent the photons. Their horizontal position is the random angle produced in step 1, while their vertical position is the random number between 0 and 1 from step 3. If the photon gets through, I used a green dot; if it didn’t, I used a red x.

As you can see, the number didn’t end up being precisely 0.5, but once you’ve accumulated enough photons it stays pretty close to that value. The figure below shows the results of running 1000 photons, and you can see I got much closer to 0.5 — close enough that the difference is less than a hundredth of a percent. If you increase the number of photons to ever-higher amounts, it becomes even more clear that half of them get through the filter. Here I’ve used 1000 photons, and you can see the area both above and below the curve are getting filled in. [Credit: moi]So what did we do here? We showed that a very predictable result — half of photons from an unpolarized source get through a polarizing filter — can arise from random processes. In the real experiment, we don’t know the angle or the probability: we only know the outcome. However, this set of steps produces exactly what we see in the lab. Quantum physics works.

The method we used above, by the way, is known as Monte Carlo integration, because we’re actually doing calculus, but we’re using random numbers (which is where the name “Monte Carlo” comes in, for the famous casino) instead of the stuff you might have learned in high school or college. Monte Carlo methods are very useful when you’re trying to accomplish complicated tasks without a clear answer in advance. In this case, we didn’t really need to do it this way, but I like how we can illustrate the principle of randomness in quantum physics.

I began the post with a quote about Einstein; let’s end the non-mathematical part with a quote from the late great paleontologist Stephen Jay Gould.

If you wish to understand patterns of long historical sequences, pray for randomness. Ironically nothing works so powerfully against resolution as conventional forms of determinism. If each event in a sequence has as definite cause, then, in a world of such complexity, we are lost….

The beauty (and simplicity) of randomness lies in the absence of these maximally confusing properties. Coin flipping permits no distinctive personality to any time or moment; each toss can be treated in exactly the same way, whenever it occurs. We can date geological time with precision by radioactive decay because each atom has an equal probability of decaying each instant. If causal individuality intervened—if 10:00 A.M. on Sunday differed from 5:00 P.M. on Wednesday, or if Joe the uranium atom, by dint of moral fiber, resisted decay better than his brother Tom, then randomness would fail and the method would not work.
—Stephen Jay Gould, Eight Little Piggies

### The mathy details

Now let’s step back and look at the math a little more. From the previous post, we noted that $|\psi\rangle = a |h\rangle + b |v\rangle$
is the quantum state for a single photon from an unpolarized source, where $a$ and $b$ are complex numbers. The individual pieces are the horizontal $|h\rangle$ and vertical $|v\rangle$ polarization states.

As above, we say that each photon has a random polarization angle $\varphi$ measured with respect to a horizontal line, so that the angles of 0° and 180° both are horizontal, while 90° and 270° are vertical.  We can write the quantum state “ket” as $|\psi\rangle = \cos (\varphi) |h\rangle + \sin (\varphi) |v\rangle$
(Technically we should also include a phase angle $\xi$ in the form $e^{i\xi}$, but it won’t have any effect on the outcome.) The corresponding “bra” is $\langle\psi| = \cos(\varphi)\langle h| + \sin(\varphi)\langle v|$
Since the polarization states are orthogonal (you can’t have a photon that’s simultaneously vertically and horizontally polarized), $\langle h| v \rangle = \langle v | h \rangle = 0$ $\langle h| h \rangle = \langle v | v \rangle = 1$

Now if we pass the random photon through a vertical polarizing filter, the act of measurement is represented by the projection operator $\hat{P}(v) = |v\rangle \langle v|$
as in the previous post. Acting on our quantum state, $\hat{P}(v) |\psi\rangle = \cos(\varphi) |v\rangle\langle v| h \rangle + \sin(\varphi) |v\rangle\langle v|v\rangle = \sin(\varphi) |v\rangle$
The probability of finding our photon in the vertically polarized state requires multiplying by the bra state: $p(\varphi) = \langle \psi | \hat{P}(v) | \psi\rangle = \sin^2(\varphi)$
This is the probability of a single photon getting through, but recall we don’t actually know its angle of polarization: we can’t go any farther with one particle.

However, we now have the tools to figure out how many photons will get through if we fire a large number at the filter. At this point, we can go two directions: we can use the Monte Carlo method as above, or we can finish using calculus. Since I already went through the Monte Carlo process, let’s see the calculus.

If we have a lot of photons each with a random polarization angle, we can reasonably assume over time that every angle will eventually be represented in our sample. That lets us average over all the angles to get the total fraction of photons getting through. This average is an integral: $f = \int_0^{2\pi} p(\varphi) d\varphi = \int_0^{2\pi} \sin^2(\varphi) d\varphi = \frac{1}{2}$
where I’ve switched to radians for $\varphi$ instead of degrees, since they are easier to use. (If you don’t know how to perform this integral, that’s another lesson!)

Arguably the Monte Carlo method is more correct, since integration effectively assumes we have an infinite number of photons representing every angle equally. However, we get the same answer both ways, so it’s hard to get too upset about it. The philosophical implications of the different kinds of math are fascinating, though, and include the question of whether quantum physics is truly compatible with the kinds of mathematical abstraction we use to describe it, or whether it just works well enough that we don’t need to worry our pretty little heads.

### Notes

1. If this idea bugs you (e.g. if you’re a physicist who knows how much I’m cheating by letting us know the polarization angle in advance), try this instead: send light through a randomly oriented polarizing filter, so that each photon has a different random polarization. That will act more or less like unpolarized light, but will keep us from needing an impossible degree of knowledge.

### 4 responses to “Playing dice with the Universe: Polarization revisited”

1. There is something that still ‘bugs’ me about this: Starting with a light source that produces randomly polarized light, (vertical, horizontal, and everything in between), a vertically polarized filter removes 50% of the light… Really?? Then why does placing a horizontal filter, following the vertical filter block all the light? Shouldn’t it block 50% of the remaining light? When I do the physical experiment it looks like things get truly black! Has the first filter, the vertical filter, ‘forced’ half the light to be vertically polarized? Has the vertical filter simply absorbed all the light and reemitted half of it as vertically polarized light?

1. In the previous post (https://galileospendulum.org/2014/01/23/quantum-mechanics-a-polarizing-topic/), I pointed out that light passing through the polarizing filter is now polarized along that axis. So, if unpolarized light passes through a vertical filter, the light coming through the other side is now vertically polarized. A filter selects just the part of the quantum state aligned with it, so if you have vertically polarized light reaching a horizontal polarizer, all of those photons will get absorbed.

Unpolarized light, though, is a superposition of horizontal and vertical polarization states, so half of it can get through a filter on average, because the filter will select just the state aligned with it. Does that make sense?

2. Does quantum mechanics speak to a mechanism by which this transformation from random polarization to vertical polarization happens? e.g. absorption/re-emission?

1. Yes it does. I left out those details because they depend on the particular material, but many polarizing filters involve long polymer molecules. Light passes through parallel to those molecules, and is absorbed if it’s polarized in the perpendicular direction. Again, there are a lot of details I’m skipping (not least because the science of matter isn’t my area, so I don’t have all the information in my head), but that’s the basic idea.

Similarly, liquid crystal displays (LCDs) produce polarized light because of the shape of the crystals.