# Machine Learning Aids Classical Modeling of Quantum Systems

## Introduction

Understanding the quantum universe is not an easy thing. Intuitive notions of space and time break down in the tiny realm of subatomic physics, allowing for behavior that seems, to our macro sensibilities, downright weird.

Quantum computers should allow us to harness this strangeness. Such machines could theoretically explore molecular interactions to create new drugs and materials. But perhaps most important, the world itself is built upon this quantum universe — if we want to understand how it works, we probably need quantum tools.

However, current near-term quantum devices are still far from fulfilling that promise, since they can’t reliably execute a large number of quantum interactions. Until researchers can overcome this issue, classical computers remain the best way to solve real-world problems, however inefficiently they do so.

But maybe there’s a workaround, a kind of quantum compromise. A spate of recent papers suggests that it may be possible to take the quantum system you’d like to understand, input its properties into classical machines, and use those machines to predict the quantum system’s behavior. By combining a new way of modeling quantum systems with increasingly sophisticated machine learning algorithms, researchers have established a method for classical machines to model and predict quantum behavior.

“I think the work is very significant,” said Yi-Zhuang You, a physicist at the University of California, San Diego who is unaffiliated with the studies. “It fundamentally changes the field in the sense that it’s the right way to combine quantum computation and machine learning.”

**What We Learn From the Shadows**

Researchers have been trying to use classical computers to predict quantum states since at least 1989. Typically, a quantum system with *n* qubits — the quantum equivalent of a bit — can be represented by a classical array of 2* ^{n }*numbers. The size of this array increases exponentially with the number of qubits, meaning that the required computing power quickly becomes prohibitive.

In late 2017, the computer scientist Scott Aaronson suggested that it’s not necessary to know the full classical representation of a quantum system. Instead, you might be able to learn about a given quantum state and predict its properties using only a subset of the representation.

Then in 2020, the physicists Hsin Yuan (Robert) Huang and Richard Kueng pioneered a practical approach to Aaronson’s method. Their technique allowed them to predict many characteristics of the quantum state of a system from very few measurements using classical methods. The process involved constructing a “classical shadow” from these measurements: a succinct classical representation of the quantum system, akin to an actual shadow, which conveys a lot of information — but not everything — about the object casting it.

“You have to lower your sights and only try to predict certain quantum observables,” said John Preskill, a theoretical physicist at the California Institute of Technology who worked with Huang and Kueng on the project.

With this model, if you want to predict a certain number of properties of the system, you need just enough measurements — specifically, a number of measurements that scales as the logarithm of the number of properties. “Robert’s idea is brilliant,” said Xie Chen, a colleague of Preskill’s at Caltech who was not associated with the study. “That is going to give us a big advantage to learn the system by doing some random sampling.”

The approach has already seen some success. Scientists have already used these classical shadows to conduct the largest simulation of quantum chemistry ever undertaken, using a classical algorithm with a noisy, error-prone quantum computer to study the forces experienced by atoms in a diamond crystal.

But perhaps it could do more. Huang and others wanted to study a quantum system not just at one static moment — as in a crystal — but as it changed over time. That would give researchers far more insight into how these systems behave, at the cost of far more data to process. Luckily, by this time another tool had become popular for such a task: machine learning.

**Training the Models**

In the last few years, classical machine learning models have made revolutionary strides in improving automated predictions. But when researchers tried using them to solve quantum problems, Preskill said, the models often got things right, but their accuracy was not guaranteed. Machine learning typically progresses via trial and error, so you’d need just the right kind of data — and a lot of it — to get useful information.

A paper by Huang and collaborators at Google Quantum AI underscored that intuition: Classical machine learning algorithms trained with enough quantum data can be computationally powerful enough to model quantum systems.

But there was still a problem. These machine learning models were still fundamentally classical, meaning that it’s impossible for them to process truly quantum data and output quantum states. To get around this, Huang and colleagues showed in a *Science* paper last year how to use classical shadows to convert quantum information into classical data. They could then train a machine learning model to predict properties of new quantum systems.

“The advantage they create is a quantum map between [quantum] inputs and [quantum] outputs, both of which are classical shadows — since you are never going to succeed if it blows up to the full quantum state,” said Jarrod McClean, a computer scientist at Google Quantum AI.

This seemed doable in practice, since the model only needed a polynomial number of data points to achieve accurate predictions. Unfortunately, it still wasn’t ideal. “The polynomial was super large,” Huang said. Basically, it was too difficult ever to obtain that much training data.

The final piece of the puzzle came in a workshop in July this year at the Simons Institute for the Theory of Computing at the University of California, Berkeley. There, an undergraduate in Preskill’s group named Laura Lewis demonstrated a way around the obstacle.

While the previous models were agnostic about the geometry of the quantum system under study, Lewis’ work wasn’t. Rather than trying to keep track of the interactions between every combination of qubits in the system, her algorithm focused on the local interaction between qubits located next to each other. This approach now needed less training data — just a logarithmic function of the number of qubits — to accurately predict properties of the quantum system, making it finally practically feasible.

**Beyond Shadows**

With these models, researchers can explore the composition and behavior of increasingly complicated quantum systems. But Lewis’ result could also help improve this line of research itself: We now have better ways to understand how to reduce the scaling requirements for future predictions about other quantum systems.

Lewis’ work reveals “how much data [must] be collected from a physical system to make reliable predictions,” McClean said.

Meanwhile, Huang has explored further. Building upon his work on classical shadows and machine learning, he recently used an improved algorithm to study active quantum systems (such as the transformation of a quantum state to another) with a smaller amount of data. Preskill suspects it’s just the start. “What I expect over the next five to 10 years, the main impact of quantum computing will not be applications that are commercially important,” he said. “It’s going to be scientific exploration.”

For now, the new methods developed by Huang and Lewis still need to be rigorously tested in laboratory experiments. Experimental systems come with extra baggage including measurement errors and inaccuracies, Chen said, which these models still can’t handle.

But even though this work is still in progress, these classical shadows should allow researchers to improve their understanding of the quantum theoretical realm in new ways. Are classical shadows enough to capture quantum complexity, or do we need a fully quantum approach? Are there quantum properties or dynamics that will forever be out of reach? “Their work has been pioneering to start thinking about these questions,” said Soonwon Choi, a physicist at the Massachusetts Institute of Technology.

And maybe one day, Preskill said, researchers will collect enough experimental data to be able to predict system features that have never been encountered in the lab. “This is one of the big-picture goals of applying machine learning to quantum physics,” he said. “And we were able to show that at least in some settings, you can make accurate predictions.”

*Editor’s note: Scott Aaronson is a member of *Quanta Magazine*’s **advisory board**.*