Spoiler Alert: this post contains huge spoilers about the end of the TV show Devs.
Devs, starring Sonoya Mizuno, Nick Offerman, Alison Pill and other wonderful actors, is an amazing and aesthetically impeccable story that relies heavily on modern interpretations of quantum mechanics. You don't need to understand QM to enjoy the show, it's already fantastic even if you don't, but man does it have layers... An understanding of quantum mechanics certainly enhances the experience and allows you to understand the story in a much deeper fashion. I'll attempt to be your guide in this incredible journey.
There are a few interpretations of QM that don't make a difference in the predictions you can make, as far as we can tell so far, but that aim at explaining exactly what's really going on, and each leads to radically different views on what Reality™ is.
First, there is the old Copenhagen interpretation that a surprisingly large number of physicists still cling to, but they are WRONG and shouldn't be paid attention to. Copenhagen is basically saying that normally, if you don't poke it too hard, a quantum system will be ruled by the Schrödinger equation, but if you stare at it hard enough, poof! it goes, Schrödinger conveniently looks the other way while that happens, and God throws a D20 to determine the outcome of the measurement. So different laws of nature apply depending on what you do to the system. It's rather silly. But it works as well as the other interpretations, so we pretend it's not and use it. This interpretation is non-deterministic: measurements are truly random.
Then you have a bunch of interpretations such as de Broglie–Bohm pilot waves (this is Forest's preferred interpretation at first) that introduce an additional entity, a pilot wave, that has its own dynamics but that you can't observe directly. The pilot wave contains the hidden information that causes specific result in measurements. This interpretation is 100% deterministic, and only one outcome is real for any measurement, but you still can't predict the results of measurements, only probabilities, because only part of the information about the system is available. It's also non-local.
And you have Everett's Many-Worlds. In this interpretation, the Schrödinger equation is all you need. It relies on the fact that you can describe the interaction of a quantum system and its environment as an entangled system, where the outcomes of measurement can be cleanly separated (in the equations, using just math) into independent systems that each obey their own Schrödinger equation and stop interacting with each other. The interpretation of this is that each of those subsystems act as separate "worlds" branching out of each other. In this interpretation, the system as a whole is 100% deterministic, but all classical outcomes are in separate worlds where it looks like the local outcome was randomly selected. So locally it looks non-deterministic, but it remains globally deterministic. Those other worlds are out of our reach but they are just as real as ours. It's quite marvelous because it's just math, and Schrödinger's equation. No additional concept or entity is needed. This is of course The Correct Interpretation, and Forest is forced to admit that after he's been shown the errors of his ways by Lyndon and Katie.
So what's interesting in what you learn in the finale is that it sheds some light on some seemingly random events that happened earlier. The machine was hooked to a dead rat. The dead rat is the outcome of a Schrödinger's rat measurement, so it's symbolizing that what we see is a specific world, let's call it Dead Rat world. In this world, Forest's daughter and wife were killed. Forest wants guide waves to be true because it means that he had no choice and could not have prevented the death of his daughter.
When using this interpretation, extrapolations from the machine are fuzzy because there are many quantum pasts in the same way there are many quantum futures in many worlds, but only hidden data in pilot wave. Once you integrate that into the model, you can get a clear picture. This a shaky part of the story, but whatever, they're being consistent with it, so it works fine in the end. Forest understands that Lyndon and Katie are right and sees the opportunity in it. Probably mostly Katie and she convinces him. It's no random event that Katie pushes Lyndon to commit quantum suicide. This is an experiment, she has already done the simulations of the event and all its possible outcomes, and she knows that Lyndon survives in some worlds, and she knows the machine can simulate it all. Also important is that the knowledge of the future creates a feedback loop that a human brain can use to "break" determinism or at least make it go bonkers.
So they see the predicted breakage of the ability of the system to predict the future as the sign that something weird is going to happen, a unique opportunity. That weird thing is that because Lily will exercise her quantum freedom --which is that her still 100% deterministic brain will inevitably decide to do something different from what was predicted she would do-- in all worlds branching out from the moment they get into the horizontal elevator thing, she is entangled with the machine in a very interesting way. In the same way that two entangled photons can have opposite but undetermined spins and any measurement of one will determine the measurement of the other, what Lily decides in each world is entangled and opposite to what the machine predicted. So the machine's prediction does happen, but in a different world from the one where it does the prediction. In another world, the machine predicts Lily throws the gun away.
What Katie does in the background in those final episodes, if I'm right, is that she's preparing the Lily + Forest + machine quantum system to be entangled in such a way that the machine ends up in a quantum state that is different (because Lily forced it to by deciding against her own future) from the quantum state of the "real" world. So from that point on, the machine no longer simulates the Dead Rat World, but it simulates an Alive Amaya world. As Forest points out forcefully when describing virtual Amaya, she is just as real as the real world. There is no difference between the quantum state of the simulated world and the quantum state of the real world. They really are as real. This opens up the possibility of a real Forest living a happy life in real Alive Amaya world. But that world already existed all along. The difference here is that "real" Forest quantum state has been entangled into that world and has thus been allowed to keep his memories. This is the weakest part of the plot in my opinion, but it's fine and it works to bring a happy end.