In this series, we review NeurIPS, ICLR, AAAI, ICML, and CVPR papers in an approachable way. Our main tool is NotebookLM, which is hacking into our human desire for narratives. To supplement, I provide commentary drawn from my experience as a Senior Research Scientist at Nvidia.

Today’s paper:

A 2018 PRX paper

Commentary

At first, I was very skeptical of the approach in this paper. It suggests an oracle-type approach as training data, which normally directly leads to generalization. However, this group specializes in putting physical guardrails on their machine learning, in this case, really actually targeting the 3-qubit guarantee, which is a theoretic guarantee on error correction.

The part where they designed the reward function resonates with me because it echoes the effort I had to spend in my paper on crafting a reward function. It boils to designing intermediate rewards while keeping physical guardrails for reality checks.

Related Post Will AI Help Physics Research? In this series, we review NeurIPS, ICLR, AAAI, ICML, and CVPR papers in an approachable way. Our main tool is NotebookLM, which is hacking into our human desire for narratives (improve recall and comprehension). To supplement, I provide brief commentary drawn from my experience as a Senior Research Scientist at Nvidia.

The payoff in this paper, however, is quite impactful in that it almost mimics a Star Trek computer being able to adapt it to an enemy error correction on the fly, dynamically. This type of dynamic control to enable quantum computing seems like a regime breaker, however, I don’t know if I’ve seen it more widely adopted in the industry.

If there’s one part I would have liked more, it would have been the negative results they had in designing the reward function, as it really seems this reward function leads to a lot of emergent properties. it may be they didn’t motivate the reward function well, instead acting from intuition

NotebookLM podcast and transcript (Google AI transcription)

NotebookLM Audio Overview 23:26
Read full AI transcript 23:26 listen · 147 turns

“Imagine building a machine that is so. I mean, so incredibly delicate, so unfathomably sensitive that just looking at it wrong causes it to completely break. Right.

And we don’t mean dropping it.

No, exactly. Not dropping it, not hitting it with a hammer, just measuring it, just looking at it. That is the actual everyday reality of quantum computing right now.

It’s wild. It really is a profound engineering paradox.

Welcome to the deep dive. Today we are exploring a scenario that honestly sounds like science fiction, but it’s happening right now and the most advanced physics labs in the world.

Yeah, because we’re trying to harness these fundamental building blocks of the universe, right? To perform calculations that would take a normal computer millions of years.

But the universe really does not want us to touch those building blocks.

No, it actively fights back.

It totally does. And our source material today takes us straight to the front lines of that fight. We are diving into a really groundbreaking paper from the Max Planck Institute. It’s titled reinforcement Learning with Neural Networks for quantum Feedback.

That’s the.

One. And our mission for this deep dive is to unpack how physicists are using artificial intelligence, specifically reinforcement learning, to autonomously discover ways to protect quantum information from destroying itself.

The overarching theme here, I think, is a transition of power. You know, historically, humans have had to manually engineer every single defense mechanism for these quantum systems, right? But now the machines are inventing the strategies entirely on their own. They’re discovering solutions that human physicists simply could not see.

Which is incredible. And for you listening, I want to establish our ground rules right up front. You do not need a PhD in quantum mechanics to grasp the magnitude of this. Definitely not. We’re going to bypass all the dense math today to reveal the underlying logic of how machines learn to invent their own science. But. But before we can appreciate the AI’s brilliant solution, we have to deeply understand the seemingly impossible physics problem it was actually built to solve.

We have to start with the fragile qubit.

Yes, let’s start there.

So a classical computer bit the kind running the device you’re using to listen to this right now is binary. It’s definitively either a zero or a one.

Like a coin sitting flat on a table.

Exactly. It’s either heads up or tails up. But a quantum bit or qubit can hold an arbitrary state. It exists in what we call a superposition.

Meaning it functions as a complex combination of zero and one simultaneously.

Right? If the classical bit is that coin flat on the table, the qubit is a coin spinning rapidly in the air.

I love that analogy.

And this ability to hold multiple possibilities at once is where the massive computational power of a quantum computer comes from.

But a spinning coin is incredibly easy to knock over. Which brings us to a little thing called decoherence.

Decoherence is essentially the ambient noise of the universe. Heat. Electromagnetic fluctuations, stray cosmic rays.

Or even just like the magnetic field from a piece of lab equipment nearby.

Oh, absolutely anything. And when this environmental noise interacts with the qubit, that fragile spinning coin is bumped, the superposition collapses.

And the quantum information you were trying to calculate is just irreversibly corrupted. It’s gone, it’s gone. So to prevent this, scientists use quantum error correction or qsc. Let’s contextualize what Qsc actually asks us to do. Trying to protect a qubit from decoherence is kind of like trying to carry a perfectly intact snowflake through a hurricane blindfolded.

That is painfully accurate, right?

You have to constantly adjust your hands to block the wind, but if you squeeze too hard, you melt it yourself. Qsc is the strategy physicists use to try and win that chaotic game.

That captures the sheer scale of the problem perfectly. Because in practice, Qsc involves a highly choreographed dance. You can’t just measure your main qubit to see if an error occurred.

Because measuring it collapses the superposition. You squeeze the snowflake.

Exactly. You melt it. So instead you have to apply specific logic gates to tangle your main qubit with extra disposable helper qubits. Okay, you then measure those helper qubits to detect if an error occurred on the main one. And finally, you apply corrective gates based on what you found.

And finding the perfect sequence of those gates and measurements from scratch is a literal combinatorial nightmare.

Oh, it’s mind boggling.

At every single microsecond, you have dozens of possible operations you could apply to dozens of different qubits. The branches of possibility just multiply exponentially. Okay. If you have, say, ten qubits and ten possible actions within a fraction of a second, the number of potential pathways outnumbers the atoms in the observable universe.

Which means a brute force search like having a computer test. Every possible combination of gates to find the best defense is mathematically impossible.

You just can’t do it. But wait, don’t physicists have traditional control methods. Like, uh. What is it, Jerry?

Yeah. Great. Ray. It stands for gradient descent pulse engineering. It exists, but it optimizes the smooth analog shape of a single microwave pulse. It’s a continuous control method.

Ah.

So it completely fails when confronted with the discrete adapt on the fly branching decision trees you need. When a measurement suddenly reveals a localized error.

You need a system that can react dynamically, something that can register a blip on detector three and instantly realize, oh, I need to flip qubit four, but only if detector one remains quiet.

Exactly. It requires an agent capable of learning from feedback adapted to measurement outcomes, and that specific requirement led the researchers at the Max Planck Institute directly to reinforcement learning.

The same underlying framework that famously mastered staggeringly complex games like Go and Chess.

Yes, the AI interacts with an environment, takes an action, and receives a reward or a penalty, and it gradually learns the optimal strategy.

So in a board game, the AI places a piece, observes the entire board, and calculates its next move to maximize the chance of winning. Applying that to quantum physics seems, I mean, incredibly logical on the surface.

On the surface, yes.

But reading through the methodology of this paper, we hit a massive paradox. Reinforcement learning inherently needs to see the environment to learn the rules. But as we just established in quantum mechanics, fully looking at the environment destroys the information.

This is the core tension they had to resolve in a fully observed environment. Reinforcement learning thrives. The AI agent knows the exact coordinates of every piece, right? But a real quantum experiment is a strictly partially observed environment. Because of the laws of physics, you just cannot continuously monitor the full state of the system.

You only get tiny, limited glimpses through those periodic measurements of the helper qubits.

Exactly.

So if you’re listening to this and wondering how on earth do you train a machine to master a game while blindfolded? You aren’t alone.

It’s a huge problem.

The researchers had to get incredibly creative here. They bypassed the paradox by inventing a two stage learning process a teacher student dynamic, right?

So the first stage happens entirely inside a computer simulation. And because it’s a simulation, the researchers can temporarily suspend the restrictions of quantum mechanics.

Oh that’s.

Clever. Yeah. They build a state aware teacher network and grant it godlike knowledge of the simulated quantum evolution.

Okay. Godlike knowledge. What does that actually look like?

This teacher receives a complex mathematical matrix representing the exact uncollapsed probability map of the entire quantum state at every single microsecond.

Wow. So the teacher gets the ultimate cheat code. It sees the whole board completely unhidden everything. And it uses standard reinforcement learning, playing millions of simulated games to figure out the perfect sequence of protective gates. But a teacher that relies on godlike data is completely useless in a real physical lab, right? Because a real lab can’t provide that hidden matrix.

Exactly. The teacher’s only purpose is to act as an instructor for the second stage, which is the student network. Okay. And this student is built differently. It’s a recurrent neural network specifically utilizing long short term memory or Lstm neurons. Got it. The student is trained via supervised learning. Its goal is simply to mimic the actions the teacher takes, but the critical constraint is that the student is only allowed to see what a real physical experiment would output.

Which is just the binary 0 or 1 results of the measurements. That’s it. Just tiny flashes of information, barely a fraction of the total picture.

But the student’s Lstm architecture is the key here. Unlike a standard neural network that only looks at the present moment, an Lstm maintains an internal memory of the past.

Oh, so it remembers the history of those tiny flashes.

Exactly over millions of training cycles. It learns to correlate a specific sequence of flashes with the exact corrective move the teacher makes. It slowly builds a mathematical intuition for what the invisible quantum state must look like, entirely based on the sparse clues it gathers over time.

Okay, I have to pause here because something fundamental about the setup felt, I don’t know, floored when I was reading the source material.

Oh? How so?

Well, if the teacher network has absolute godlike knowledge of the simulated state from the very beginning, why doesn’t it just cheat? I mean, we know AI always finds the laziest possible route to a reward. What is stopping the AI from just looking at the initial quantum state, committing it to memory, letting the noise completely destroy the simulated qubit, and then just completely rebuilding a fresh copy from its own memory right at the end to collect its points.

That is a phenomenal observation. And it highlights a known trap in machine learning, right? Because if the AI can simply memorize and reconstruct, it learns absolutely nothing about quantum error correction. It’s just performing a digital magic trick.

Yeah, exactly. So how did they stop that?

The researchers actually anticipated this exact lazy behavior. And their workaround is honestly one of the most brilliant parts of the paper. They forced the AI to evolve all possible starting states simultaneously.

Wait. All possible states. But conceptually, a qubit can hold an infinite number of superpositions. You can’t simulate infinity.

You don’t have to. You only have to simulate four specific foundational states. Okay. Think of all possible qubit states as locations on a globe. The pure zero seat is the North Pole, the pure one state is the South Pole.

And the other two.

The other two states are specific points on the equator, representing maximum superpositions. The underlying mathematics of quantum mechanics dictate that if a sequence of defensive gates successfully protects those four extreme points simultaneously, that same sequence will automatically protect any other location on the globe.

Oh, wow. So they trained the AI on all four extremes at once.

Exactly. The AI has no idea which specific state the qubit is actually holding during the simulation. It’s forced to invent a universal one size fits all sequence of defensive moves.

That is so smart it becomes physically impossible for the AI to cheat by memorizing a single starting point, because a move that rebuilds the North Pole would instantly destroy the South Pole.

Precisely. The AI is forced to engage with the actual physics of the noise rather than the identity of the data.

Amazing. Okay, so we now have a robust two stage brain, a teacher that sees everything and can’t cheat. Paired with a student that learns to operate in the dark using memory. But this architecture immediately collides with another massive hurdle, right? Designing the grading system. If you build a flawed reward system, the AI will simply refuse to learn.

It will just give up because a student only learns if they get a grade. That makes sense. Yeah, in a standard board game, The reward is binary. You win, you get a one, you lose, you get a zero. But if we try to apply that here, it completely falls apart.

Why is that?

Well, if you tell the AI, you only get a reward if the final quantum state flawlessly matches the initial state after 200 microsecond steps, it will never make any progress. The probability of an untrained randomized neural network accidentally guessing a flawless 200 step quantum correction sequence is less than 1 in 1,000,000,000,000.

Wow. So it’s literally statistically impossible.

Completely. The AI will output random gibberish, receive a score of zero, output different gibberish, receive another zero, and never receive the feedback necessary to know which direction leads to improvement.

Right? And the source material points out that a binary reward actually encourages what they call the trivial strategy.

Ah yes, the trivial strategy is the AI deciding to do absolutely nothing. It just leaves the qubit alone to slowly decay from the ambient noise.

Wait, really doing nothing is better.

To the A’s logic. Yes, doing nothing often yields a better score than a half finished attempt at error correction. Because if the AI applies a few entanglement gates to the helper qubits but doesn’t know the correct sequence to untangle them, it actively accelerates the destruction of the quantum information.

Oh, I see the AI does the math and goes, if I try to fix this and mess up the sequence, I destroy the data instantly and get a zero. If I just stand here with my hands in my pockets and let the universe slowly degrade it, the data survives a little longer and I get a 10% score. Okay, I’ll just stand here.

Exactly. It creates a massive, seemingly insurmountable barrier to learning.

So how did they get past it?

Overcoming this required inventing an entirely new metric to grade the AI, which the researchers called recoverable quantum information, or recursion.

Okay, let’s ground this for a second. So grading an AI with a binary win lose metric is like grading a student in a creative writing class by only giving an A for a published best selling novel and an F for literally everything else, including a brilliant first draft, right?

Student just quit writing.

Exactly. But Tricky Toddler is like grading that stewed on whether the core plot is still intact in their rough draft. As long as the narrative hasn’t been permanently deleted, they get points.

That’s a great way to put it. Yeah. What’s fascinating here is the underlying mechanism of how tricky toddler works. It relies on a concept called trace distance.

Trace distance.

Yeah. Trace distance measures the worst case distinguishability of two quantum states that started out as complete opposites.

Let’s translate trace distance really quick. Imagine you have two completely different colors of paint pure white and pure black. As environmental noise creeps in. They both start muddying, turning into shades of gray. Trace distance is essentially a mathematical tool that measures how much of the original black or white identity is left before the two puddles become the exact identical, indistinguishable shade of gray.

That perfectly illustrates the physics. Toki measures whether the original quantum information has been irreversibly lost to the environment, meaning states have blurred beyond recognition, or if that information is just temporarily scrambled right.

Temporarily hidden.

Yes, often in AI’s incomplete sequence will tangle the information up into a very complex, messy, many qubit state. It looks like garbage to a standard metric, but Tokugawa looks at the trace distance and realizes, wait, the distinct information is still in there. It’s just hidden. A perfect decoder could theoretically untangle this.

So even if the qubit looks like a total mess, if the AI hasn’t permanently lost the data to the ambient room temperature, the metric detects that hidden structural integrity and gives the AI slightly higher score. It leaves a trail of breadcrumbs.

Exactly. It transforms a cliff face into a gentle slope. The AI receives continuous incremental rewards for partially successful sequences, allowing it to climb the gradient of learning step by step, rather than needing to guess a 1 in 1,000,000,000,000 sequence on the first try.

Okay, so they have the teacher student architecture. They have the four state training to prevent cheating. They have the trait collect trace distance reward system to guide the learning. They finally hit the power button. What did this machine actually invent when they turned it loose on the simulated universe?

The outputs were extraordinary, initially without any human hints, without access to any preprogramed physics textbooks, the AI autonomously rediscovered the three qubit repetition code.

We need to explain what that actually is because it’s a foundational concept in the field, right?

So the three qubit repetition code is a strategy where the logical information of one qubit is distributed across three physical qubits. To check for errors without looking directly at the data, you perform parity measurements using extra helper qubits, which are called ancilla qubits.

So an ancilla qubit acts like a canary in a coal mine. You temporarily link the canary to your main data qubits. If a noise error has flipped one of your data qubits, the canary changes state. You then measure the canary. The canary tells you an error happen, but it doesn’t tell you what the actual underlying data is. Keeping the superposition safe.

Perfectly said. And the AI figured out the exact precise sequence of entanglement gates and parity measurements required to orchestrate that canary system entirely from scratch.

Unbelievable.

But rediscovering a textbook code was just the baseline. A textbook assumes an idealized, perfect laboratory. Yeah, real quantum hardware is messy and constrained.

And here’s where it gets really interesting. The AI truly flexes its muscles here. The researchers tested it on a highly restricted hardware simulation. Imagine the qubits aren’t sitting in a neat cluster, but are arranged in a single file line, like a chain only nearest neighbors can interact. To make it worse, only one specific spot on the entire chain has a measurement detector a human physicist would struggle immensely to design a fluid error correction sequence for such a clunky, restrictive setup.

But the AI adapted seamlessly. It invented a dynamic strategy that acted like a bucket brigade. It learned to continually swap the quantum information up and down the chain of qubits, ensuring the right pieces of data arrived at the single measurement detector at exactly the right time to check for errors.

And then it just shuffled the data back to apply the correction.

Exactly. It engineered its own logistics network. And when the researchers intentionally introduced faulty hardware into the simulation like detectors that occasionally lied about what they measured, the AI didn’t just fail.

It organically learned the concept of redundancy.

Yes, it stopped relying on a single measurement per cycle, spontaneously began taking up to six measurements per cycle, cross-referencing its own and silicon arrays to double check their work before committing to a corrective action.

That is blowing my mind. The researchers actually wanted to understand exactly how the student network was making these brilliant leaps in logic, right? To do this, they used a visualization technique called t e.

S t e.

Which stands for t distributed Stochastic neighbor embedding. That is a heavy piece of jargon, but essentially the student A’s brain has, what, 300 artificial neurons firing in complex patterns. Correct. Looking at that, raw data is just staring at visual static. So t-SNE is a mathematical algorithm that compresses that 300 dimensional cloud of thought into a flat 2D topographical map, so humans can actually read it, right.

And when they projected the AI’s neuron activations onto this 2D map, they could literally watch the AI’s thought process unfold.

What did it look like?

They observed distinct clusters of neuron activations forming tight loops. During a normal, relatively quiet cycle. The AI’s thoughts would circle reliably through a standard routine.

But the instant the AI detected an unexpected complex error from its measurements. The topographical map showed the neural activation spike violently out of its normal valley. The AI would jump out of its loop, execute a highly customized, dynamically generated sequence of corrective gates to fix that specific anomaly, and then seamlessly drop back into its standard routine.

It acts as an incredibly robust autonomous control system. However, if we connect this to the bigger picture, the most profound discovery detailed in the source material occurred when the researchers, through spatially correlated noise at the AI.

Correlated noise is a nightmare instead of a random heat fluctuation hitting one qubit. Imagine a fluctuating magnetic field that washes over the entire quantum chip, subtly altering the phase of multiple qubits at the exact same time.

It’s devastating, and traditional human design methods like dynamical decoupling often fail completely here, right? The math required to track a globally fluctuating environment across multiple qubits in counteract it simultaneously. It’s just staggering, right? To write the equations for that requires knowing the exact Hamiltonian, the master mathematical formula that describes the total energy and evolution of the system.

But the AI didn’t care about the Hamiltonian.

Not at.

All. It realized entirely through trial and error that it could use those extra ancillary bits. The Canaries not just for checking data errors, but as environmental probes.

Exactly. It started measuring the outer qubits to track the microscopic fluctuations of the magnetic field in real time. It then applied adaptive phase shifting corrections to the inner data qubits based on the history of those magnetic fluctuations. This perfectly illustrates the concept of a model free approach. The AI does not need a theoretical framework. It doesn’t need the master mathematical equation. It simply interacts empirically with the environment.

It learns that when sensor A reads a certain value, action B preserves the state exactly.

It outputs tailor made hardware instructions that perfectly counter the noise without ever actually understanding the physics behind it.

It is learning advanced physics entirely by feel.

Pretty.

Much. Let’s briefly synthesize this journey for you. Listening. We went from the immense fragility of quantum superpositions and the impossible combinatorial math of protecting them, to exploring how physicists built a clever two stage architecture, a simulated teacher training a memory based student. Right. And we saw how they guided it using the trace distance logic of the 4K reward system to prevent that lazy, trivial strategy.

Which resulted in an autonomous AI capable of inventing hardware specific quantum error corrections from scratch.

Outperforming textbook methods, and adapting to chaotic real world noise.

The implications for the industry are just massive, as companies build new idiosyncratic quantum chips with weird layouts and unique noise profiles. We no longer have to wait decades for human theorists to painstakingly handcraft error correction codes for each specific device.

We can simply plug the chip’s parameters into the AI, and the machine will figure out the optimal defense strategy itself.

Exactly. The machines can figure it out for themselves.

You are now officially well informed on the absolute cutting edge of how artificial intelligence is accelerating quantum computing. But this entire deep dive leads to a rather provocative question, something for you to mull over as we wrap up. Oh, if neural networks can autonomously discover quantum error correction strategies that are simply too mathematically complex for a human to brute force. What happens when we ask these same systems to design the quantum algorithms themselves?

Wow.

Right? Are we approaching an era of science where the most advanced physics in the world is running on machines, and humanity simply has to trust the results, because our own brains literally cannot comprehend the blueprints.

We are already using black box machines we barely understand to protect other black box machines that break if you so much as measure them. It is a fascinating frontier.

It’s a wild thought to end on. Thanks for diving deep with us. ”