Quantum physicist Mario Krenn remembers sitting in a café in Vienna in early 2016, poring over computer printouts, trying to make sense of what MELVIN had found. MELVIN was a machine-learning algorithm Krenn had built, a kind of artificial intelligence. Its job was to mix and match the building blocks of standard quantum experiments and find solutions to new problems. And it did find many interesting ones. But there was one that made no sense.

“The first thing I thought was, ‘My program has a bug, because the solution cannot exist,’” Krenn says. MELVIN had seemingly solved the problem of creating highly complex entangled states involving multiple photons (entangled states being those that once made Albert Einstein invoke the specter of “spooky action at a distance”). Krenn, Anton Zeilinger of the University of Vienna and their colleagues had not explicitly provided MELVIN the rules needed to generate such complex states, yet it had found a way. Eventually, he realized that the algorithm had rediscovered a type of experimental arrangement that had been devised in the early 1990s. But those experiments had been much simpler. MELVIN had cracked a far more complex puzzle.

“When we understood what was going on, we were immediately able to generalize [the solution],” says Krenn, who is now at the University of Toronto. Since then, other teams have started performing the experiments identified by MELVIN, allowing them to test the conceptual underpinnings of quantum mechanics in new ways. Meanwhile Krenn, working with colleagues in Toronto, has refined their machine-learning algorithms. Their latest effort, an AI called THESEUS, has upped the ante: it is orders of magnitude faster than MELVIN, and humans can readily parse its output. While it would take Krenn and his colleagues days or even weeks to understand MELVIN’s meanderings, they can almost immediately figure out what THESEUS is saying.“It is amazing work,” says theoretical quantum physicist Renato Renner of the Institute for Theoretical Physics at the Swiss Federal Institute of Technology Zurich, who reviewed a 2020 study about THESEUS but was not directly involved in these efforts.

Krenn stumbled on this entire research program somewhat by accident when he and his colleagues were trying to figure out how to experimentally create quantum states of photons entangled in a very particular manner: When two photons interact, they become entangled, and both can only be mathematically described using a single shared quantum state. If you measure the state of one photon, the measurement instantly fixes the state of the other even if the two are kilometers apart (hence Einstein’s derisive comments on entanglement being “spooky”).

In 1989 three physicists—Daniel Greenberger, the late Michael Horne and Zeilinger—described an entangled state that came to be known as “GHZ” (after their initials). It involved four photons, each of which could be in a quantum superposition of, say, two states, 0 and 1 (a quantum state called a qubit). In their paper, the GHZ state involved entangling four qubits such that the entire system was in a two-dimensional quantum superposition of states 0000 and 1111. If you measured one of the photons and found it in state 0, the superposition would collapse, and the other photons would also be in state 0. The same went for state 1. In the late 1990s Zeilinger and his colleagues experimentally observed GHZ states using three qubits for the first time.