Quantum Game with Photons
play.quantumgame.io
play.quantumgame.io
Just in case, project repo is here: https://github.com/stared/quantum-game
For more on learning (and teaching) quantum mechanics, see: http://p.migdal.pl/2016/08/15/quantum-mechanics-for-high-sch...
And BTW: a question to you (as I guess there are many JavaScript whizz kids): how to make it more reactive?
My original intention was to do many-photon QM game (and wrote game engine for that). But in development I discovered that even wave mechanics offer quite a lot interesting, and counterintuitive, puzzles.
With one photon there the only thing that does not have a classical analogues is https://en.wikipedia.org/wiki/Elitzur%E2%80%93Vaidman_bomb_t..., which can be easily assembled from the blocks (well, the idea for using a light-sensitive bomb comes from there!).
Thanks again for building it, it was the first time I could actually bring my mind to embracing quantum mechanics :-)
In the end all I did was learning some standard configurations of optical instruments. That and ray optics made me pass. Of course i forgot almost everything almost instantly.
I really love the idea to get a better intuition for what is going on by a game.
By level 30 I thought I understood how the Faraday rotator works in this game. In level 32 I feel like my solution should work, but it doesn't. It behaves completely different that I think it should. The help page don't help me at all.
I'd like to see some "debug" mode where I can freeze time and inspect the quanta.
Also I feel that the simulation sometimes "gives up" too early, and i can't see why something isn't working because it ends too early.
I, too, found that annoying.
I'll make an attempt here, though. I think the effect on level 4 is totally classical so it shouldn't take too much background.
1. The solution to a problem involving light is called a wavefunction, which is just a name assigned to functions that map position and time onto what the wave is doing at that position and time. I.E. for a sound wave, W(x: position, t: time) => p: air pressure.
2. The meat of a "wave equation" is essentially also a function, but it's higher-order. It maps wavefunctions onto wavefunctions, I.E. consider high-order function L, such that L(W: wavefunction) => X: wavefunction. The name for this map is an "operator," by the way.
3. We can set up operators L(W) so that they map all "true and physical" wavefunctions on to the zero-function, f(x,t) = 0. This contrivance is the job of physicists to design; so for our discussion let's just take it that for every physically possible W(x,t), it is the case that L(W(x,t)) = 0. (And vice-versa, every solution to that equation is physically possible.) The equation L(W) = 0 is called the "wave equation," by the way.
3. It is a property of L that L(W + Q) = L(W) + L(Q) for wavefunctions W and Q. This implies that if L(W) = 0 and L(Q) = 0, then L(W + Q) = L(W) + L(Q) = 0+0 = 0. Therefore, since physical possibility <-> L(W) = 0, then we may conclude that the sum of any two physically possible wavefunctions W and Q is another physically possible wavefunction, W+Q.
4. Ignore time and look at my nice graph[0]. This illustrates adding two functions (there A(x) and B(x) ) which also happen to be solutions to the wave equation. Play around with the parameter p, (whose purpose is to let you select A to be one of many horizontally offset versions of itself) and see if you can make A + B do anything noteworthy.
[0] https://www.desmos.com/calculator/iwa3auxvuz
5. Hopefully in looking at my graph, you have noticed that for some values of p, A+B became flat everywhere. Now, I can finally explain what's going on with level 4. When the beamsplitter produces two beams from one, the two functions it shoots out have two different values of p, the dynamics detailed in [1]. If two beams are incident on the splitter, four beams will shoot out, and since some of them are overlapping in space they will add and you'll see the superposition effects. See my drawing [2]. (By the way, the parameter p is called phase, and the verb for the thing the waves to under superposition is called interference.)
[1] https://en.wikipedia.org/wiki/Beam_splitter#Phase_shift
[2] I've drawn it here. Please don't over-interpret it, I just sketched it in paint without a lot of attention to detail. https://imgur.com/a/7YLMa
Hopefully this is helpful and sheds some light on the underlying physics!
(I'm also curious why mapping to the zero function ends up being the central criterion for physical possibility—but I'm guessing that's a rather deep subject ;))
Edit: NVM I see what's going on with 'L(W(x,t)) = 0' now: the equation is equating the full evaluation of the nested functions on the left (using the x,t params) with zero. When written like 'L(W) = 0' it looks like it's equating the function returned by L(W) with zero.
There is a deeper point to be made here that I'm glad you brought up. Functions form a vector space (because they satisfy the axioms of vector behavior, basically because they can be added to each other and scaled by constant multiples). In linear algebra the symbol 0 often does double-duty as the zero vector, which is defined as the vector that doesn't change other vectors when it's added to them. So, here, when I write L(W) = 0 I'm implicitly invoking 0 = f_zero(x,t) = 0.
As for why "mapping to zero" has a physical basis, well, it's really more of a thing we're always guaranteed to be able to do. You can always subtract everything from the right-hand side of an equation! For example, Wikipedia introduces the one-dimensional wave equation as D_t^2 u = a^2 D_x^2 u. I can also write that as L[u] = D_t^2 u - q^2 * D_x^2 u = 0, so L[u] = 0. (In my notation, D_x is the derivative with respect to x, and D_x^2 is the second derivative with respect to x.)
The real question is why the addition thing works; if I had to try explaining it I would just say it's just fundamental that Maxwell's equations are linear, and when dealing with things that aren't, we usually approximate them with linear functions anyways[0]. That's how gravitational waves emerge from GR, by the way: at low energies the nonlinear equations behave nearly linear, and in that approximation the familiar wave equation falls out.
[0] If you zoom in to a small enough range in the graph of all but the most esoteric functions, the thing on your screen will look like a line. Try it, it's a good intuition to have.
> The real question is why the addition thing works
Unfortunately I'm still at the point where I can't see why it should be surprising that it works. I'm assuming that by the 'addition thing' you are referring to the fact that adding two wave functions always produces another wave function—or maybe it's something about the characteristics of the wave function produced through adding? I'm not sure how linearity plays into things here. Maybe it's surprising that it's possible to form a linear operator (I'm assuming the "operator" you mentioned is this: https://en.wikipedia.org/wiki/Linear_map) for wave functions? I guess not though since it's probably just using the structure of those functions as vectors and it doesn't matter what they're 'about'. Nope, not sure :)
I found an article on Wikipedia that, from the pictures, seems to be describe the process... I assume this is the simulated effect?
https://en.wikipedia.org/wiki/Hong%E2%80%93Ou%E2%80%93Mandel...
I wonder if some polarization arrow can be drawn somehow, like: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTAlDUU...
Any ideas are welcome here (as long they work for every possible orientation and are 2D).
In any case:
Reflection changes "left-right". So effectively, a sugar solution (rotating polarization) before mirror rotates it in the opposite direction (vs a sugar solution after a mirror). Actually it is a tricky thing I realised while testing this game. I thought it was an error in code. But nope - it was how does physics work. :)
[1] http://store.steampowered.com/app/348300/Chips_Challenge_2/
[2] https://drive.google.com/file/d/0B0klXLq7HW8sTzNhWTY3clo5Xzg...
Actually it is a tricky thing I realised while testing this game. I thought it was an error in code. But nope - it was how does physics work. :)
https://play.google.com/store/apps/details?id=com.bananadeve...
If this was available as a mobile app, I would totally play it - nice little time waster.
25.3-25.5: Photons don't care about the direction of time. Fire one backwards in time from the detector to the emitter.
31.1-31.2: To avoid the bomb, the light must be polarized horizontal ASAP.
31.3-31.4: A sugar and a rotator in series, or a rotator and a mirror will preserve polarization going one way and rotate 90 degrees the other way. You may have to flip the rotator over by clicking on it.
31.5-31.9: Go backwards from the detector to figure out where the polarization has to be horizontal, and where it has to be vertical. You never need to consider interference.
34.1: Without rotating the polarization somehow, you'll never get enough photons through the filter.
34.2-34.3: Avoid hitting the rock and the top bomb.
34.4-34.5: You only have one option left for reflecting away from the bottom bomb. And you'll need vertical polarization to use it.
34.6-34.8: You can only absorb 25%, and it should be obvious by now which path you have to absorb from. Now arrange glass and vacuum to produce the correct interference.
97.9% against 100% and I simply don't know what to do.
.
Great game! :)