When matter is compressed to pressures of millions of atmospheres and heated to thousands of degrees, it is neither solid nor gas. This warm dense state is like the interiors of giant planets or the moment of a meteorite impact. You can't look inside directly, but you can shine X-rays and see how they scatter off electrons.
Usually, scattered light is recorded as a spectrum — a graph with energy on one axis. But the instrument is not perfect: it smears the picture and adds noise. To figure out what was really there, scientists fit models, which is slow and expensive. The new approach works differently. Instead of the whole spectrum, it simulates millions of individual events: an X-ray photon hits an electron, bounces off at a certain angle, loses a certain amount of energy. Each event is like a roll of the dice, but with probabilities from physics.
This method comes from particle physics, where collisions in accelerators are modeled this way. There, too, you don't compute everything at once but generate events one by one. Now this trick is being applied to X-ray diagnostics of warm dense matter. So far, it's a proof of concept on synthetic data, but it's already clear: the method is flexible, fast, and not tied to a specific model of matter.
This approach paves the way for more accurate measurements in experiments with powerful lasers, where matter is pushed to extreme states. And that means a better understanding of what happens inside distant planets.
Warm dense matter can be created on Earth only for fractions of a second using powerful lasers, but this is exactly the state of matter in Jupiter's interior.