📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Simulating the Stern-Gerlach Experiment with Qiskit and IBM Quantum

Evan Thacker8:11

Transcription

So, here's a wild thought. What if I told you that a basic physics experiment from the 1920s, we're talking a furnace, some silver atoms, a couple of magnets, is actually the conceptual key to pretty much everything next-gen? Quantum computers, unhackable communication, you name it. It sounds like sci-fi, but it's the true story of the Stern-Gerlach experiment. So, how did this ridiculously simple setup change, well, everything? Let's get into it.

Okay, so picture this. It's the early 1920s, and physics is having a major identity crisis. The big question was, if you shoot a beam of atoms through a magnetic field, what happens? The old-school classical physics predicted you'd see a continuous smear, right? Because the little atomic magnets could be pointing in any random direction. But this new kind of wacky quantum theory made a bizarre prediction. It said, "No, the atom should split into just a couple of distinct beams." Two theories, two totally different versions of reality.

And you know, the quantum idea was so out there, so against all common sense, that even one of the guys who set out to test it, Otto Stern, was a huge skeptic. He famously said he would literally quit physics if this "space quantization" thing turned out to be real. The stakes could not have been higher. This wasn't just another lab test. It was a bet on the very fabric of reality. So, let's take a look at exactly how these two physicists, Otto Stern and Walther Gerlach, decided to settle this massive bet once and for all.

The experiment itself was, you know, just beautiful in its simplicity. First, they heated up some silver in a furnace to get a nice, clean beam of individual atoms. They picked silver because its magnetic stuff is mostly down to just one electron on the outside, which made things nice and simple. Second, they shot this beam through a specially shaped magnetic field. And third, they just watched to see where the atoms landed on a detector plate. Was it going to be the classical smear or those weird quantum spots?

And here we have it, the moment of truth. When they finally looked at that detector plate, there was no smear. Not at all. Instead, there were two distinct, perfectly defined spots. And Otto Stern, well, despite his big talk, he didn't quit physics. I mean, how could he? He had just helped prove that on a fundamental level, reality isn't a smooth, continuous thing. It's quantized. Some things can only exist in specific, discrete amounts. The fact that they saw just two spots wasn't just a surprising outcome. It was an absolute revolution that completely flipped our understanding of the universe on its head.

And you can really see that revolution when you break it down point by point. Classically, everyone thought things like angular momentum could just point anywhere. But the experiment showed, nope. It's quantized. It's restricted to specific directions. That smooth smear everyone expected, it turned into a binary up or down choice. Every single classical prediction just completely failed. And this new quantum reality stepped in to take its place.

What this experiment really discovered was a totally new property of matter, something that has no classical equivalent at all. We call it spin. Think of it like a tiny built-in compass needle that particles like electrons just have. And the key thing is, it's quantized. For an electron, it can only be spin up or spin down. Those are the two spots Stern and Gerlach saw.

So, this is the crucial leap. This discovery of a simple two-state system, spin up and spin down, became the physical foundation, the actual alphabet for the language of modern quantum computing. And this is where that 100-year-old physics connects directly to today's computers. Spin up gets mapped straight onto the computational state we call zero, and spin down becomes our one. In the language of quantum mechanics, you'll see these written with these little bracket symbols, but that's all it is. A silver atom from that 1922 experiment is basically the original physical version of a quantum bit, or what we call a qubit.

And because it's a quantum system, a qubit can do something really strange. It can exist in a superposition, that's a mix of both zero and one at the exact same time. You know those atoms flying out of Stern and Gerlach's furnace? They were all in a random superposition of spin states. It was only the act of passing them through the magnet, the measurement, that forced each atom to pick a side and become either up or down.

Which brings us right up to today. We don't need a physical furnace and giant magnets to play with these ideas anymore. We can now run a digital twin of the Stern-Gerlach experiment right on a quantum computer, just using code. And the analogy here is just, it's shockingly direct. The old silver furnace creating a beam of atoms? Well, now we just initialize a qubit into a superposition. The big physical magnets that did the measuring? We replace those with quantum logic gates. And the two spots on the detector plate? Those just become the binary zeros and ones that we save in a regular computer register.

Okay, but here's where the digital version really shows its power. Back in 1922, if you wanted to measure spin on a different axis, say left-right, instead of up-down, you'd have had to physically rotate this massive, heavy apparatus. In our quantum circuit today, we just apply a special logic gate like the Hadamard gate right before we measure. It's that simple. We just change the basis with a line of code.

And this ability to just easily switch up our measurement basis in code lets us explore one of the deepest and, frankly, weirdest aspects of quantum mechanics. The fact that just observing something changes it. So, this leads to a really fascinating question, right? What happens if we measure a qubit's spin, say up and down, get a result, and then immediately measure it again, but this time side to side? Let's walk through what the simulation shows us.

Step one, we measure in that Z-basis, the up-down direction, and let's say we find the qubit is definitively up. Great, we know its state. Step two, we immediately measure it in the X-basis, left-right. Suddenly, the result is completely random, a 50/50 shot of being left or right. But here's the real kicker. Step three, we go back and measure in the Z-basis again. And that definite up information we had a second ago, it's gone. The result is now a 50/50 random chance of being up or down.

I mean, let that sink in for a second. The very act of measuring the spin in the X-direction actively erased the information we had about its spin in the Z-direction. The measurement didn't just passively reveal something that was already there. It actively, fundamentally changed the system. And what we've just seen, this is a perfect demonstration of one of the cornerstones of all of quantum mechanics: the uncertainty principle. This isn't about our tools not being good enough. It's a fundamental rule of the universe. You simply cannot know a particle's spin along two different axes at the same time with perfect precision. Why? Because the very act of measuring one messes up the other.

Now, at first glance, this sounds like a massive problem, right? Like a fundamental limitation, having your measurements just delete previous information. It sounds like a bug in the universe's operating system. But what if it's not a bug? What if it's actually a feature? Well, it turns out it's an incredibly powerful feature. This is the whole principle behind something called quantum key distribution, or QKD. Think about it. If someone tries to eavesdrop on a quantum communication, they have to measure the qubits to read them. But if they measure using the wrong basis, they will inevitably disturb the state of those qubits. And that disturbance is something the intended recipients can detect. The bug of uncertainty actually creates a fundamentally secure way to communicate.

So, it's just an incredible journey, isn't it? What started as two little mysterious spots on a detector plate in 1922 revealed the quantized nature of spin. That simple two-state system gave us the qubit, the absolute building block of quantum computers. And the weird rules of how we measure that qubit, like the uncertainty principle, are now being used to build the future of secure communication.

And that leaves us with one last, really profound thought to chew on. The Stern-Gerlach experiment, it doesn't just teach us about quantum computing. It forces us to ask some really big questions about reality itself. You know, if the quantum world is fundamentally changed every single time we look at it, what does that say about what it's like when we're not looking?