What happens if the eraser polarization filter is moved with randomness generated by observation of particles in superposition in famous experiment? I was reading the book The outer limits of reason by Nosin S. Yanofsky and I stumbled upon this experiment. There's a wall with two holes (S1 and S2) with a polarization filter on the right of the holes and a light source on the left of the hole. One of the polarization filters is horizontal and the other is vertical. After them, there's at distance d, and then a diagonal (45 degrees) polarization filter.
This whole experiment gives the same result as if there were no polarization filters. The 45 degrees filter can be moved. This has the (mind-blowing for me) effect of making the photons go back in superposition if the filter is moved in. This, says the author, is the proof that the photon knows (sorry for my layman terms but I'm no expert at all) that the 45 degrees polarization filter will be there before it is moved in. The author says that this is basically the end of free will, because the photon will know before you even do it that you are going to put the polarization filter there.
I reasoned about this by myself for some time and I have some questions. If I attach a computer with a robotic arm that moves the 45 degrees filter in and out depending on the random generation of a binary number (0 or 1), I must conclude that the photon knows the random number that will be generated, and that's ok. But what if the random number is generated from the observation of the superposition of another particle (I know that this can be done)? How will the photon behave? There are these 2 possibilities from what I understand.

*

*The photon knows the superposition before it's measured, which goes against the principle that "there's no property until you measure it" and therefore quantum mechanics is wrong (I believe this to be unlikely)

*I misunderstood something (very likely) and I'd like for someone to explain me what I didn't understand.


 A: The trouble with interpreting the experiment as "the photon knows what will happen" is that it introduces the notion of time in a paradoxical context, from which one can derive paradoxes just like you did in your thought experiment.
The situation has indeed a non-local flavor that, if I wanted to give the photon some metaphorical cognition, I would frame as "the photon has a non-local awareness of the whole set-up". More soberly, we could just say "the photon behaves consistently with the set-up, and it is impossible to describe its evolution in a local way", which is just another way to say that there is no trajectory in QM.
So, yes indeed, attempting to describe a quantum superposition in classical terms leads to paradoxes. Nothing new here - welcome to quantum mechanics.
And one of its amazing aspects is that, although QM seems non-local, causality is somehow always preserved (you can see non-causal correlations, but have no way to abuse them in any practical way). When people explore this issue in detail, they do not conclude that causality is dead in the water, only that we cannot describe what is happening in a classical way - there has to be a quantum-specific causal structure, so to say; see Quantum Mischief Rewrites the Laws of Cause and Effect for an introduction.
So whatever paradox you may consider, it will never unambiguously lead to the conclusion that something is broken within physics itself. It is only our classical intuition that is badly shaken, again and again.
A: The photons know nothing and it has nothing to do with free will or observations. There is a simple and physical explanation as to what is happening.
(1) S1 and S2 produce coherent light sources, which are required to create an interference pattern.
(2) When you introduce the vertical and horizontal filters, the two sources become 180 degrees out of phase and are no longer coherent. this disrupts the interference pattern.
(3) when you introduce the large  diagonal  filter, the two incoherent sources become coherent again.
There is no mystery here.
