This page is a blog article in progress, written by John Baez. To see the final polished article, go to the Azimuth Blog.
Now for the fun part. Let’s see how quantum theory ideas can be used to understand random processes. I’ll try to make this post completely self-contained, except at the very end. So, even if you skipped a bunch of the previous ones, this should make sense.
You also don’t need to know quantum theory, though you’ll have more fun if you do. What we’re doing here is very similar, but also strangely different—for reasons I explained last time.
Suppose we have a population of rabbits in a cage and we’d like to describe its growth in a stochastic way, using probability theory. Let be the probability of having rabbits. We can borrow a trick from quantum theory, and summarize all these probabilities in a formal power series like this:
The variable doesn’t mean anything in particular, and we don’t care if the power series converges. See, in math ‘formal’ means “it’s only symbols on the page, just follow the rules”. It’s like when someone says a party is ‘formal’, so you need to wear a white tie: you’re not supposed to ask what the tie means.
However, there’s a good reason for this trick. We can define two operators on formal power series, called the annihilation operator:
and the creation operator:
They’re just differentiation and multiplication by , respectively. So, for example, suppose we start out being 100% sure we have rabbits for some particular number . Then , while all the other probabilities are 0, so:
If we then apply the creation operator, we obtain
Voilà! One more rabbit!
The annihilation operator is more subtle. If we start out with rabbits:
and then apply the annihilation operator, we obtain
What does this mean? The means we have one fewer rabbit than before. But what about the factor of ? It means there were different ways we could pick a rabbit and make it disappear! This should seem a bit mysterious, for various reasons… but we’ll see how it works soon enough.
The creation and annihilation operators don’t commute:
so for short we say:
or even shorter:
where the commutator of two operators is .
The noncommutativity of operators is often claimed to be a special feature of quantum physics, and the creation and annihilation operators are fundamental to understanding the quantum harmonic oscillator. There, instead of rabbits, we’re studying quanta of energy, which are peculiarly abstract entities obeying rather counterintuitive laws. So, it’s cool that the same math applies to purely classical entities, like rabbits!
Here’s how it works. We want to describe how the probabilities change with time, so we write
Then, we write down an equation describing the rate of change of :
Here is an operator called the Hamiltonian, and the equation is called the master equation. The details of the Hamiltonian depend on our problem! But we can often write it down using creation and annihilation operators. Let’s do some examples, and then I’ll tell you the general rule.
Last time I told you what happens when we stand in a river and catch fish as they randomly swim past. Today we’re doing rabbits. This works almost the same way. But there’s a fundamental difference: rabbits don’t swim.
So, suppose an inexhaustible supply of rabbits are randomly roaming around a huge field, and each time a rabbit enters a certain area, we catch it and add it to our population of caged rabbits. Suppose that on average we catch one rabbit per unit time. Suppose the chance of catching a rabbit during any interval of time is independent of what happens before or afterwards. What is the Hamiltonian describing the probability distribution of caged rabbits, as a function of time?
There’s an obvious dumb guess: the creation operator! However, we saw last time that this doesn’t work, and we saw how to fix it. The right answer is
To see why, suppose for example that at some time we have rabbits, so:
Then the master equation says that at this moment,
Since , this implies that the coefficients of our formal power series are changing like this:
while all the rest have zero derivative at this moment. And that’s exactly right! See, is the probability of having one more rabbit, and this is going up at rate 1. Meanwhile, is the probability of having rabbits, and this is going down at the same rate.
Puzzle 1. Show that with this Hamiltonian, the master equation predicts that the expected number of rabbits grows linearly.
Don’t worry: no rabbits are actually injured in the research that Jacob Biamonte is doing here at the Centre for Quantum Technologies. He’s keeping them well cared for in a big room on the 6th floor. This is just a thought experiment.
Suppose a mean nasty guy had a population of rabbits in a cage and didn’t feed them at all. Suppose that each rabbit has a unit probability of dying per unit time. And as always, suppose the probability of this happening in any interval of time is independent of what happens before or after that time.
What is the Hamiltonian? Again there’s a dumb guess: the annihilation operator! And again this guess is wrong, but it’s not far off. As before, the right answer includes a ‘correction term’:
This time the correction term is famous in its own right. It’s called the number operator:
The reason is that if we start with rabbits, and apply this operator, it amounts to multiplication by :
Let’s see why this guess is right. Again, suppose that at some particular time we have rabbits, so
Then the master equation says that at this time
So, our probabilities are changing like this:
while the rest have zero derivative. And this is good! We’re starting with rabbits, and each has a unit probability per unit time of dying. So, the chance of having one less should be going up at rate . And the chance of having the same number we started with should be going down at the same rate.
Puzzle 2. Show that with this Hamiltonian, the master equation predicts that the expected number of rabbits decays exponentially.
Suppose we have a strange breed of rabbits that reproduce asexually. Suppose that each rabbit has a unit probability per unit time of having a baby rabbit, thus effectively duplicating itself.
As you can see from the cryptic picture above, this ‘duplication’ process takes one rabbit as input and has two rabbits as output. So, if you’ve been paying attention, you should be ready with a dumb guess for the Hamiltonian: . This operator annihilates one rabbit and then creates two!
But you should also suspect that this dumb guess will need a ‘correction term’. And you’re right! As always, the correction terms makes the probability of things staying the same go down at exactly the rate that the probability of things changing goes up.
You should guess the correction term… but I’ll just tell you:
We can check this in the usual way, by seeing what it does when we have rabbits:
That’s good: since there are rabbits, the rate of rabbit duplication is . This is the rate at which the probability of having one more rabbit goes up… and also the rate at which the probability of having rabbits goes down.
Puzzle 3. Show that with this Hamiltonian, the master equation predicts that the expected number of rabbits grows exponentially.
Let’s do some stranger examples, just so you can see the general pattern.
Here each pair of rabbits has a unit probability per unit time of fighting a duel with only one survivor. You might guess the Hamiltonian , but in fact:
Let’s see why this is right! Let’s see what it does when we have rabbits:
That’s good: since there are ordered pairs of rabbits, the rate at which duels take place is . This is the rate at which the probability of having one less rabbit goes up… and also the rate at which the probability of having rabbits goes down.
(If you prefer unordered pairs of rabbits, just divide the Hamiltonian by 2. We should talk about this more, but not now.)
Now each triple of rabbits has a unit probability per unit time of getting into a fight with only one survivor! I don’t know the technical term for a three-way fight, but perhaps it counts as a small ‘brawl’ or ‘melee’. In fact the Wikipedia article for ‘melee’ shows three rabbits in suits of armor, fighting it out:
Now the Hamiltonian is:
You can check that:
and this is good, because is the number of ordered triples of rabbits. You can see how this number shows up from the math, too:
Suppose we have a process taking rabbits as input and having rabbits as output:
I hope you can guess the Hamiltonian I’ll use for this:
This works because
so that if we apply our Hamiltonian to rabbits, we get
See? As the probability of having rabbits goes up, the probability of having rabbits goes down, at an equal rate. This sort of balance is necessary for to be a sensible Hamiltonian in this sort of stochastic theory (an ‘infinitesimal stochastic operator’, to be precise). And the rate is exactly the number of ordered -tuples taken from a collection of rabbits. This is called the th falling power of , and written as follows:
Since we can apply functions to operators as well as numbers, we can write our Hamiltonian as:
Let’s do one more example just to test our understanding. This time each pair of rabbits has a unit probability per unit time of bumping into one another, exchanging a friendly kiss and walking off. This shouldn’t affect the rabbit population at all! But let’s follow the rules and see what they say.
According to our rules, the Hamiltonian should be:
However,
and since form a ‘basis’ for the formal power series, we see that:
so in fact:
That’s good: if the Hamiltonian is zero, the master equation will say
so the population, or more precisely the probability of having any given number of rabbits, will be constant.
There’s another nice little lesson here. Copying the calculation we just did, it’s easy to see that:
This is a cute formula for falling powers of the number operator in terms of annihilation and creation operators. It means that for the general transition we saw before:
we can write the Hamiltonian in two equivalent ways:
Okay, that’s it for now! We can, and will, generalize all this stuff to stochastic Petri nets where there are things of many different kinds—not just rabbits. And we’ll see that the master equation we get matches the answer to the puzzle in Part 4. That’s pretty easy. But first, we’ll have a guest post by Jacob Biamonte, who will explain an example from population biology.