Simulation - Quantum Mechanics

Unwinding the Electron Orbit

Canvas not supported

Unwinding the Electron Orbit

[Disclaimer: This is a semi-classical (i.e. not particulary rigorous or convincing) explanation of the discrete energy levels in an atom, but it does give you a feel for the basic idea.]

Not all wavelengths are allowed on an electron orbit because the electron waves must "match up with itself" after going around one circle, otherwise destructive interference will destroy the waves. Adjust the wavelength and the radius so that the wave joins back to itself smoothly to get an "allowed" orbit.

  • $2\pi r = n \lambda$ must be obeyed.
  • de Broglie tells us momentum is $p =\frac{h}{\lambda} = \frac{nh}{2\pi r}= \frac{n\hbar}{r}$, where $\hbar = \frac{h}{2\pi}$.
  • Angular momentum is $L =rp$, therefore $L = n\hbar$.
  • This is Neils Bohr's qunatization condition on angular momentum in his (semi-classical) hydrogen model: Angular momentum only appears as integral multiples of $\hbar$.

Hydrogen Wave Function (3D)

Canvas not supported

Hydrogen Wave Function

  • Try $n=4$, $l=3$, $m=1$ and increase the number of points to about 30000.
  • Density of the dots represents the likelihood of locating an electron at a location.
  • Orbits are allowed only when $n>l$ and $l \geq |m|$.
  • Turn off auto rotate to use mouse control.
  • The electron wave functions in a hydrogen atom is usually written in terms of the spherical harmonic functions, $Y_l^m$. These functions are usually written in its "real" or "complex" form. The switch "Use Real Y" allows you to see the (small) difference between the two.
  • Links: static rendering of the "complex" wave functions and the "real" wave functions of hydrogen.

Infinite Square Well

Canvas not supported

Infinite Square Well

Click play to make observations on the quantum particle. The particle is more likely to appear where the probability density (click the "show probability density" button to see) is high.

  • $\psi_n = \sqrt{\frac{2}{L}}\sin(k_n x)$, where $k_n = \frac{n \pi}{L}$
  • Probability density $\rho(x) = |\psi(x)|^2$
  • $E_n = \frac{(\hbar k_n)^2}{2m}$

Finite Square Well

Canvas not supported

Infinite Square Well

Click play to make observations on the quantum particle. The particle is more likely to appear where the probability density (click the "show probability density" button to see) is high.

Notations follow Introduction to Quantum Mechanics by David Griffiths, section 2.6.

  • $\psi(x) = B e^{\kappa x}$ (for $x\lt -a$), $C \sin(lx) + D\cos(lx)$ (for $ -a \lt x \lt +a$), $F e^{-\kappa x}$ (for $x\gt -a$).
  • $\psi(x)$ is an even function for odd $n$ (i.e. $C=0$), and odd function for even $n$ (i.e. $D=0$).
  • Allowed states are found by solving $\sqrt{(\frac{z_0}{z})^2 - 1} = \tan(z)$ for odd $n$ (green curves), $\sqrt{(\frac{z_0}{z})^2 - 1} = -\cot(z)$ for even $n$ (indigo curves). These equations came from boundary conditions on $\psi$ and $\psi'$. The number of possible solutions changes with the values of the parameters.
  • $z=la\Rightarrow l = \frac{z}{a}$, where $L=2a$ is the width of the well.
  • $z_0 = \frac{a}{\hbar}\sqrt{2mV_0}$.
  • $\kappa = l\sqrt{(\frac{z_0}{z})^2 - 1}$
  • $F = e^{\kappa a}(C \sin(la) + D\cos(la))$.
  • $B=+F$ for odd $n$, $B=-F$ for even $n$.

Tunneling of a Pulse

Canvas not supported

Tunneling of a Pulse

  • Probability density ($|\psi|^2$) is shown. The wave function is complex so it is not drawn.
  • When $V_0=1$ the potential well has a peak value identical to the mean kinetic energy of the incoming particle.
  • The wave packet (i.e. pulse) is constructed by combining several waves of similar wavelengths.
  • When $V_0$ is high, some amount of wave still gets through ("tunnel" through) the barrier when the wall is thin enough.
  • Classically a particle cannot pass through once the potential barrier exceeds its kinetic energy, but this is violated in quantum mechanics by tunneling.

Tunneling of a Stream of Particles

Canvas not supported

Tunneling of a Stream of Particles

  • A stream of particles of fixed momentum is represented as the plane wave $\psi_{incident} = e^{ikx}$, and it generates a reflected wave and a transmitted wave.
  • The wave function is complex. To visualize, choose to view either the probability density ($|\psi|^2$) or just the real part (imaginary part looks similar) of the wave function.
  • When $V_0=1$ the potential well has a peak value identical to the mean kinetic energy of the incoming particle.
  • When $V_0$ is high, some amount of wave still gets through ("tunnel" through) the barrier when the wall is thin enough.
  • Classically a particle cannot pass through once the potential barrier exceeds its kinetic energy, but this is violated in quantum mechanics by tunneling.

Simple Harmonic Oscillator

Canvas not supported

Simple Harmonic Oscillator

Click play to make observations on the quantum particle. The particle is more likely to appear where the probability density (click the "show probability density" button to see) is high.

  • $V = \frac{1}{2}kx^2 = \frac{1}{2}m\omega^2$, where $k$ is the spring constant and $\omega = \sqrt{\frac{k}{m}}$.
  • $\psi_n(x) = (\frac{m\omega}{\hbar \pi})^{1/4}\frac{1}{\sqrt{2^n n!}}e^{-\frac{1}{2}\frac{m\omega}{\hbar} x^2} H_n(\sqrt{\frac{m\omega}{\hbar}}x)$, where $H_n$ are the physicists' Hermite polynomials and $n=0, 1, 2, \dots$
  • $E_n = \hbar \omega (n+\frac{1}{2})$.

Quantum Double-slit Experiment

Canvas not supported

Quantum Double-slit Experiment

Click play to make observations on the quantum particle. The particle is more likely to appear where the probability density (click the "show probability density" button to see) is high.

  • The quantum particles are shot through the narrow slits one at a time.
  • The interference pattern emerges only after numerous particles arrive at the screen at the bottom.
  • There are locations of destructive interference, where no particles will land. You can think of these positions as the "forbidden regions". However, the precise locations of these regions depend on both slits. Each particle must somehow "knows" the positions of both slits as it passes the barrier.
  • When observers are added to monitor which slit the particle came through, the interference pattern is destroyed, leaving a uniform distribution on screen.
  • An observer forces the particle to be either through the left slit or the right, but not both. If a particle is observed to pass through the left slit, it does not know where the right slit is, therefore do not where to avoid on screen, and as a result could land anywhere on the screen.
  • The contrast of the two cases leads us to the unusal conclusion that when the observers are absent, a quantum particle passes through both slits at the same time. Strange as it is, this is how physicists understand how each particle knows not to step on the forbidden regions.

Spin Measurements

Canvas not supported

Spin Measurements

A lab manual based on this simulation is available here.

A simulation of the Stern-Gerlach experiment, where a particle with a magnetic moment is sent through a non-uniform magnetic field. The trajectory of the particle depends on the magnetic moment, which in turn depends on the intrinsic angular momentum (spin) it carries. Adjusting the angle on the detector in the simulation is the same as rotating the magnets in the experiment, thereby detecting the compoenent of spin along different directions.

Rotate the dials on the detector to adjust the axis of measurement. Rotate the source to change the spin of the particles emitted. $p(+)$ and $p(-)$ are the observed probability based on the accumulated counts.

  • A quantum measurements is destructive in that it changes the state of the particle. A particle leaving the detector has a different directions to that before the measurement in general.
  • The probability of observing a spin in the same direction of the dial is $p = \cos^2(\frac{\Delta \theta}{2})$, where $\Delta \theta$ is the angle between the incoming particle and the dial.
  • Even though the particles are identically produced, the observed direction depends on chance.

Things to try:

  • Click "hide info", and rotate the source to some unknown angle. Can you use the detector to figure out the angle of the source by measuring only one particle? While a single spin (a "qubit") potentially carries a huge amount of information, the universe only allows us to extract a small bit of information (whether the particle comes out on the top or the bottom exit) during a measurement. This has enormous implication to quantum computing.
  • Plot the probability on the detector for different $\Delta \theta$ to see if it matches with the theory $p = \cos^2(\frac{\Delta \theta}{2})$.

Hidden Variables? (ultimately disproved)

Canvas not supported

Hidden Variables? (ultimately disproved)

A lab manual based on this simulation is available here.

Here is an (seemingly trivial but in fact infintely subtle) analogy between a coin toss and the spin experiment:

Playing heads or tails Spin experiment
Tossing the coin and the coin landing on the table Source producing a particle
You looking at the coin to determine H or T Detector sending the particle to either the top ($+$) or the bottom ($-$) exit
Coin is either H or T even before you look. The "reality" of the state of the coin does not depend on your act of looking. Hidden variables view: The particle spin $s$ is either $\pm 1$ along the detector direction even before it reaches the detector (disproved by Bell's inequality later). Think of $s$ the variable "hidden" from you before the detector makes the measurement.

When quantum mechanics was in its infancy, some physicists (Einstein included) thought the idea of random outcomes based on probability did not make sense. For example, when you toss a coin ("heads or tails"), the probability of getting H (heads) is 1/2. However, this only appears to be random because you did not account for factors like the force you tossed the coin, air resistance, mass of the coin, etc. These are "hidden variables" that when taken into account, will allow one (theoretically) to predict whether you get H or T. In physics jargon, we say classical processes like a coin toss is "deterministic" even though it appears to be random to a casual observer.

In the previous simulation, you see the particle exits the detector at the top ($+$) or bottom ($-$) exit randomly. It seems reasonable to suggest that maybe there are some information, so called hidden variables ("HV" below), that when taken into account, will predict exactly which exit the particle will go through.

In this simulation, each particle carries with it some hidden information, that when known, actually pre-determines which exit the particle will go through before it is measured. You will see that the physicists of old had a valid point it seems, that with hidden variables, one could "fake it" and apparently produce the same probabilistic observations as quantum mechanics. However, this idea was ultimately disproved in the very famous Bell's Inequality experiment shown in the next simulation. For now we will pretend HV exists and see how it could produce the same outcome as quantum mechanics.

  • Click on the "show HV: angle" (HV is "hidden variables") to see the pre-determined exit each particle has chosen before it reaches the detector.
  • The sign shows the exit ($s=\pm 1$) a particle will go through if the detector is set to the corresponding angle.
  • For simplicity, the angles of the source and the dials are limited to only $0^\circ$, $-120^\circ$ or $+120^\circ$.
  • For our eventual goals below, we can use the notation $h=(s_0, s_{-120}, s_{+120})$ to represent the hidden variables.
  • Example: $h=(-++)$ is a particle that will go through the bottom ($-$) exit when the detector angle is $0^\circ$, top ($+$) exit when the detector angle is $-120^\circ$, and top ($+$) exit when the detector angle is $+120^\circ$.
  • Example: $h=(+-+)$ is a particle that will go through the top ($+$) exit when the detector angle is $0^\circ$, bottom ($-$) exit when the detector angle is $-120^\circ$, and top ($+$) exit when the detector angle is $+120^\circ$.
  • Essentially, a detector "picks out" one out of the three signs in $h$ depending on the detector angle.

Things to try:

  • Send the particles through one at a time using the "emit one" button. Click on the "show HV: angle" for the detector angle to confirm that particles goes through the exit pre-determined by the sign.
  • Plot the probability on the detector for different $\Delta \theta$ to see if it matches with the theory $p = \cos^2(\frac{\Delta \theta}{2})$. If so, it means the hidden variables model produces the same experimental outcome as regular quantum mechanics. It has successfully "pretend" to act like traditional quantum mechanics even though it is secretly deterministic.
  • Write out all the possible combinations for the hidden variables $h$. Here are two examples: $h=(+++)$, $h=(++-)$. There should be 8 different combinations altogether.

A Simple Explanation of Bell's Inequality

There is no computer simulation for this section, just a simple (but very long) explanation.

Bell's inequality: $$ \langle score \rangle \lt 0 $$ Classical physics obeys this inequality. Quantum mechanics violates it.

Now comes the long story.

Imagine two boxes (box $A$ and box $B$), each has three compartments, numbered 1, 2, and 3. In each compartment is a ball labeled either "+" or "-". For example, here is the content of the first box: $A(++-)$. There is only one rule (for now):

  1. The balls in each compartment in $B$ must be exactly opposite to their counterparts in $A$. For example, $A(++-), B(--+)$ is fine, but $A(++-), B(+-+)$ is forbidden (first compartments are not allowed to have the same sign).

Rule number 1 means there are only 8 possible configurations for the pairs, namely:

  1. $A(+++), B(---)$
  2. $A(++-), B(--+)$
  3. $A(+-+), B(-+-)$
  4. $A(+--), B(-++)$
  5. $A(-++), B(+--)$
  6. $A(-+-), B(+-+)$
  7. $A(--+), B(++-)$
  8. $A(---), B(+++)$

You are on a game show. The host prepared 100 pairs of these boxes according to the rules and closed them. He knows the content of the boxes but you do not, the pairs are not all identical. Now comes more game rules:

  1. You can only open one compartment on each box. For example, you are allowed to open compartment 3 in $A$, and compartment 1 in $B$. The compartment numbers do not have to match.
  2. For each pair, you will get a score of $s_1\times s_2$, where $s$ is the sign of the ball in the compartment. For example, if you open a compartment in $A$ and see the "+" ball and "-" in $B$, then your score for this pair is $(+1)\times (-1) = -1$.
  3. You get a million dollars if your overall score is positive. In short, matching signs are good, opposite signs are bad.

You can think about the right strategy to win the million dollars, but for our purpose we will analyze the action of you as a naïve game contestant, who opens the compartments completely randomly. We will label your action on a pair of boxes by two numbers $(n_A, n_B)$. For example, $(3, 2)$ means you open compartment 3 in the box $A$, and compartment 2 in box $B$.

There are only 9 actions you could take for each pair of boxes. Due to your naïveté you will choose one of these 9 options for each pair with equal probability.

  1. $(1, 1)$
  2. $(1, 2)$
  3. $(1, 3)$
  4. $(2, 1)$
  5. $(2, 2)$
  6. $(2, 3)$
  7. $(3, 1)$
  8. $(3, 2)$
  9. $(3, 3)$
Are you going to win a million dollars and get out of this drudgery of studying mind-bending physics? We will analyze two specific examples.

Suppose the content of a pair is $A(+++), B(---)$ (the host knows this but the contestant does not), then the score from opening the compartments for this pair is going to earn you a score of $-1$ because he would get opposite signs no matter which compartments you choose. That is bad news for you.

Luckily, the host is not a dishonest person, he did not put all the pairs in such unfavorable configurations. Here is another pair you could get: $A(++-), B(--+)$. Out of the 9 actions you could take, these are the ones that will get you a negative score of -1:

  • $(1, 1)$
  • $(2, 2)$
  • $(3, 3)$
  • $(1, 2)$
  • $(2, 1)$
For example, $(2, 1)$ means you open the second compartment in $A$ (which gives you $s_A = +1$) and the first compartment in $B$ (which gives you $s_B = -1$). The score is the product $s_A\times s_B = (+1)\times(-1) = -1$. These five choices are bad.

On the other hand, for $A(++-), B(--+)$, you can earn a positive score of +1 if you choose to open the following:

  • $(1, 3)$
  • $(2, 3)$
  • $(3, 1)$
  • $(3, 2)$
  • Let's recap. There are 9 choices you can make, 5 of them gives you $score = -1$, 4 of the choices gives you $score=+1$. The odds are against you because the bad choices outnumbered the good ones. When the pair is $A(++-), B(--+)$, and you make your choice randomly, your average score will be: $$ \langle score \rangle = \frac{5}{9}(-1) + \frac{4}{9}(+1) = -\frac{1}{9} $$

    While there are 8 possible configurations for $A$ and $B$, there are really only two main categories, classified by the contents of box $A$:

    • All balls in $A$ have the same sign. In which case you will get a score of -1 for sure.
    • 2 of the 3 balls in $A$ have the same sign, in which case you will get a score of $-\frac{1}{9}$ on average.

    Using your naïve strategy, the odds are stacked against you. On average you will get an overall negative score and therefore not become a millionaire (unless you are unusally lucky).

    Bell's inequality in this context is the depressing fact: $$ \langle score \rangle \lt 0 $$

    Imagine your surprise when the next ten contestants after you each won a million dollars! You then recalled that the contestants confined in you backstage that they were actually the host's friends, so you suspect maybe the host helped them win. The contestants were kept in a sound-proof box making the choices remotely, so it did not appear they communicated with the host. How did they cheat?

    Watching the recording carefully, you realized that after a contestant opened a compartment in box $A$, the host always blocked the view to box $B$ before the contestant chose a compartment in $B$. It is obvious now: the host must have replaced the content in box $B$ after his friend opened box $A$ to increase the chance of a positive score. With cheating they violated Bell's inequality and get an average score $\langle score \rangle \geq 0$!

    Without cheating, once the content of the boxes are prepared, the average score is negative. The only way to get around it (with the naïve strategy) is if the contents are changed in the middle of the game.

    Classical physics is like the honest contestant. The contents of the boxes are fixed once the host prepared them, you opening a compartment does not change the content inside.

    Quanum mechanics is like the cheating game. If we replace the balls in the game with their quantum counterparts (like the spins in the simulations below), then the act of opening a compartment in $A$ changes the probability of the outcome in $B$. It is almost as if something in box $A$ "reaches over" to box $B$ to replace its content so you have a higher chance of getting a positive score. How nature is able to do that (despite the two boxes being light years apart) is still a subject of debate and we will not get into the details here.

    Bell's Inequality with Local Hidden Variables

    Canvas not supported

    Bell's Inequality with Local Hidden Variables

    A lab manual based on this simulation is available here.

    Hidden variables appear impossible to disprove, as least that was how it appeared to physicists for many years. After all, how do you prove that something "hidden" does not exist? Amazingly, that is what John Bell managed to do in a 1964 paper, based on an idea by Einstein, Podolsky and Rosen years ago. The simplified version in this simulation is based on an article by David Mermin. The two detectors are placed at slightly different distance from the source on purpose.

      Notations:
    • D1, D2: detectors at the top and bottom, respectively.
    • $h_1$, $h_2$: hidden variables of particles going into D1 and D2, respectively. See previous simulation for details.

    Spin corresponds to angular momentum, which is conserved, and the pairs of particles must obey this law. This means if one has spin +1 along the $0^\circ$ direction, the other must have spin -1 if measured along the same direction. In practice, it means the signs in $h_1$ and $h_2$ are always reversed.

      Examples:
    • If $h_1 = (+++)$ then flip all the signs to get $h_2 = (---)$.
    • If $h_1 = (++-)$ then $h_2 = (--+)$.
    • In general $h_1$ completely determines $h_2$, and vice versa.
    • Since there are 8 different $h_1$, there are 8 corresponding $h_2$. Write tham all out.

    Next we are going to assign a "score" for each measurement by $score = exit_1\times exit_2$.

      Example:
    • If the one particle exits through the bottom ($-$) exit in D1 and the other exits also through the bottom ($-$) exit in D2, then the score is $(-1)\times (-1) = +1$.
    • If the one particle exits through the bottom ($-$) exit in D1 but the other exits through the top ($+$) exit in D2, then the score is $(-1)\times (+1) = -1$.
    • Summary: score=+1 for same exits, score=-1 for different exits.

    The exit (i.e. the result of a measurement) is completely determined by $h = (s_0, s_{-120}, s_{+120})$, for example:

    • $h_1=(+--)$ means the particle exits through the top if D1 angle is $0^\circ$, but through the bottom if the angle is $\pm 120^\circ$.
    • If $h_1=(-+-)$, it means the particle exits through the bottom if D1 angle is $0^\circ$, through the top if the angle is $-120^\circ$, and through the bottom if D1 angle is $+120^\circ$.
    • D1 essentially "picks out" one of the three signs in $h_1$ depending on the detector angle. D2 is similar.
    • Knowing $h_1$ and $h_2$ allows us to work out the score.

    • Think of $h_1$ as a bag containing three balls, each marked with either "+" or "-". D1 picks one ball out of the bag during measurement. D2 picks out one ball from the bag $h_2$.
    • Suppose $h_1 = (+++), h_2=(---)$. D1 picks out one of the signs in $h_1$, D2 from $h_2$. What is the probabilty that $score=sign_1\times sign_2=+1$ (i.e. the signs picked by D1 and D2 are the same)? The answer is never! Therefore $P(+1)=0, P(-1)=1$.
    • The same probability is true for $h_1 = (---), h_2=(+++)$. Therefore the average score for these two choices of $h_1$ is -1.
    • Suppose $h_1 = (++-), h_2=(--+)$. What are $P(+1)$ and $P(-1)$ if the angles of the detectors are set randomly?
    • There are a total of 9 possible outcomes. Write them out to convince yourself that 4 of the 9 have the same signs, 5 of the 9 have opposite signs.
    • Therefore $P(+1)=4/9, P(-1)=5/9$ for $h_1 = (++-), h_2=(--+)$.
    • The same is true of 5 other $h_1$-$h_2$ pairs where two signs in $h_1$ are the same, like $h_1 = (+--), h_2=(-++)$, $h_1 = (+-+), h_2=(-+-)$, ...etc
    • For these cases, the average score is $(+1)P(+1)+(-1)P(-1)=4/9-5/9 = -1/9$.
    • Out of the 8 different choices of $h_1$, 2 of them give $P(+1)=0, P(-1)=1$, while the remaining 6 give $P(+1)=4/9, P(-1)=5/9$.
    • What you see is that no matter what $h_1$ and $h_2$ are, the average score is always negative! You are always more likely to get opposite signs if you pick one sign from each $h$ randomly. This is Bell's famous inequality recasted in our notations: $\langle score \rangle \lt 0$.
    • Assume further that $h_1$ is generated randomly, then the overall probability and average score for all $h$ is: $$ P(+1) = \frac{2}{8} (0) + \frac{6}{8} (\frac{4}{9}) = \frac{1}{3} $$ $$ P(-1) = \frac{2}{8} (1) + \frac{6}{8} (\frac{5}{9}) = \frac{2}{3} $$ $$ \langle score \rangle = \frac{1}{3}(+1) + \frac{2}{3}(-1) = -\frac{1}{3} $$

    Experimentally, it means if we randomize the angles of D1 and D2, the average score will be negative as long as we assume the particles have hidden variables determining the measurement outcome. The precise values of the hidden variables do not matter.

    An easy analogy: Put three balls into a bag $h_1$, each either black or white. For every black ball you put in bag $h_1$, you have to put a white ball in bag $h_2$ and vice versa. Randomly take out one ball in $h_1$ and one in $h_2$, you are more likely to end up with two different colors. In our spin experiment, you are more likely to get different spin $s$ from the two detectors, so the score is more likely to be $-1$ than $+1$, so the average score is negative.

    The standard deviation is: $$ \sigma_1 = \sqrt{\langle score^2 \rangle - \langle score \rangle^2} = \sqrt{1-\frac{1}{3^2}} = \frac{2\sqrt{2}}{3} $$ If one take $N$ measurements and take the average, the standard deviation of the average is: $$ \sigma_N = \frac{\sigma_1}{\sqrt{N}}=\frac{2}{3}\sqrt{\frac{2}{N}} $$

    In the next simulation, we will see that quantum mechanics predicts $\langle score \rangle = 0$ (as opposed to $-\frac{1}{3}$ of hidden variables), which was confirmed by multiple experiments. In our case, to have confidence in the measurement of $\langle score \rangle = 0$, we want to make sure this value is at least 2 (or more) standard deviation away from the hidden variables prediction of $-\frac{1}{3}$: $$ 0 - (-\frac{1}{3})> 2\times \sigma_N =\frac{4}{3}\sqrt{\frac{2}{N}} \Rightarrow N > 32 $$ Similarly, one could work out the number of measurements required for confidence of $5 \sigma_N$ is $N>200$.

    Virtual lab:

    1. Set the detector angles to $0^\circ$ for D1 and $0^\circ$ for D2, and measure the score for 100 particles.
    2. Reset the score to zero.
    3. Set the detector angles to $0^\circ$ for D1 and $-120^\circ$ for D2, and measure the score for another 100 particles.
    4. Repeat until you have measured the score for all 9 combinations of detector angles. Hint: You should find the average score very close to zero when the angles of the two detectors are different.
    5. Calculate the average score and compare it with the theoretical value of $-\frac{1}{3}$.
    6. In an actual experiment on Bell's inequality, one would randomize the detector angles for each pair of incoming particles, but for simplicity we will not do that here.

    Beating Bell's Inequality with Quantum Mechanics

    Canvas not supported

    Bell's Inequality with Quantum Mechanics

    A lab manual based on this simulation is available here.

    In many ways, quantum mechanics is actually easier to analyze (mathematically but not conceptually) than the hidden variables version, but it forces us to think really hard about our notion of reality in the process.

    Entanglement: Classical vs Quantum Correlation

    If I have a pair of gloves, I keep one glove and put the other one in a box and send it on a rocket with you to Mars. If you open the box on Mars and see a left glove, you can immediately deduce that the glove I kept must be a right glove. This is classical correlation, and there is nothing magical about this. Which glove is in the box is pre-determined even before you opened the box.

    Quantum mechanics works rather differently. Remember how an electron can pass through both slits at the same time in a double-slit experiment? A "quantum glove" could be both left and right at the same time until you decide to open the box to observe it. If you open and see a left glove, then and only then, the glove in my possession becomes a right glove as if by magic, despite the fact that we are a long distance apart and I may not even be looking at my own glove. We describe such systems to be "entangled" in physics jargon. There are a lot of subtle points here, simultaneity (what do we mean by "at the same time") being one, faster than light travel being another, which we will not get into here.

    In our spin simulation, in order to conserve angular momentum carried by the particle spin, if D1 detects particle 1 to spin up, then particle 2 must now spin down. Play the simulation to see how a particle changes to a definite state when its entanglement partner is measured by a detector. You can also drag the detectors to change their order.

    We again define the "score" the same way as in the hidden variables simulation earlier by $score = exit_1\times exit_2$.

      Example:
    • If the one particle exits through the bottom ($-$) in D1 and the other exits also through the bottom ($-$) in D2, then the score is $(-1)\times (-1) = +1$.
    • If the one particle exits through the bottom ($-$) in D1 but the other exits through the top ($+$) in D2, then the score is $(-1)\times (+1) = -1$.
    • Summary: score=+1 for same exits, score=-1 for different exits.

    • If the angles of D1 and D2 are the same, then score=-1 for every pair of particles, i.e. they always exit opposite exits on the two detectors. There are 3 such detector configurations, namely $0^\circ$ and $\pm 120^\circ$.
    • For the other six detector configurations (for example try D1 at $0^\circ$ and D2 at $120^\circ$), observe in the simulation (easiest if you send out one pair at a time) if particle 1 exits D1 at the top ($+$) exit, then particle 2 will align more with the dial at the same exit ($+$) in D2. If particle 1 exits D1 at the bottom ($-$) exit, then particle 2 will also align more with the bottom ($-$) exit at D2. They are more likely to exit at the same exits for these six configurations.
    • If you observe closely for these six configurations, you can see particle 2 always makes an angle of $60^\circ$ with the exit at D2 that has the same $s$. We learned earlier the probability of such a particle actually making it through the exit is $\cos^2(\frac{60^\circ}{2}) = 3/4$. So $P(+1)=\frac{3}{4}$ and $P(-1)=\frac{1}{4}$ and the average score is given by: $\langle score \rangle = \frac{3}{4}(+1) + \frac{1}{4}(-1) = +\frac{1}{2}$. Unlike hidden variables, quantum mechanics produces a positive average score for these configurations.
    • 3 detector configurations gives $\langle score \rangle = -1$, 6 gives $\langle score \rangle = +\frac{1}{2}$. Average over these 9 configurations together gives $\langle score \rangle = \frac{3(-1) + 6(\frac{1}{2})}{9} = 0$.
    • Bell's inequality states $\langle score \rangle \lt 0$ in our notations, so quantum mechanics violates Bell's inequality.
    • Experiments have confirmed that Bell's inequality is indeed violated in quantum systems. This proves that local hidden variables do not exist. The story is actually a little more subtle than that, but I will not get into it here.

    Some things should bother you immediately. While we draw the pairs of particles fairly close together, in theory they could be several galaxies apart. How does one particle fix the spin state of the other despite being so far apart even though there are no interactions involved once they separated at the source? Does the spin state of the second particle get fixed "at the same time as" when the first particle gets measured? If so, what does "at the same time" means given its ambiguity in relativity? Is the influence between the pair traveling faster than light? Can we use this to send information beyond the speed of light? I should at least point out the last question has a simple answer - no, but it is closely related to the subject of quantum teleportation. I will not have time to get into all these points, but just know that you are witnessing something quite subtle.

    Now is a deeper and more "profound" discussion. What is so unusal about quantum mechanics and its violation of the Bell's inequality? Quantum mechanics manages to beat the inequality by not having a pre-determined state if no one observes the particles' spin. In other words, despite the fact that every time you observe it, a particle's spin is always either $s=\pm 1$ along a certain direction, it is possible for a particle to have no definite value of spin when no one is observing. In a philosophy class, you may think when a tree falls in a forest, it still makes a sound even if no one is around, but in quantum mechanics, "reality" is really not quite what you think. Einstein himself asked, "if no one is looking at the moon, does it still exists?" We are used to thinking reality is "out there" whether we human look or not, but such "reality" is really our hidden variables in our jargons, something that is hidden but still exists even when we do not look. Bell's show if that is the case, Bell's inequality must be obeyed. The experimental fact that the ineqaulity is violated by physical systems tells us to completely rethink the concept of reality.

    Virtual lab:

    1. Set the detector angles to $0^\circ$ for D1 and $0^\circ$ for D2, and measure the score for 100 particles.
    2. Reset the score to zero.
    3. Set the detector angles to $0^\circ$ for D1 and $-120^\circ$ for D2, and measure the score for another 100 particles.
    4. Repeat until you have measured the score for all 9 combinations of detector angles. Hint: You should find the average score very close to zero when the angles of the two detectors are different.
    5. Calculate the average score and compare it with the theoretical value of $0$.
    6. In an actual experiment on Bell's inequality, one would randomize the detector angles for each pair of incoming particles, but for simplicity we will not do that here.

    I will end this with a defense of Einstein, who got a bad reputation for apparently "not getting" quantum mechanics. He disliked quantum mechanics, and debated with other physicists over many years, arguing quantum mechanics was incomplete. Looking back with a lot of hindsight, we now realize (within the past 30 years or so) Einstein was pretty much the only one really "getting it", at least as far as the most subtle points are concerned, while all other physicists simply swept the difficult bits under the carpet and pretended they were not there. His paper on EPR paradox on entanglement was the foundation behind John Bell's work that we discussed here. These days one may go as far as saying that entanglement is the heart of quantum mechanics, even Einstein was really the only person understanding it for a long time. The hope of quantum computing depends crucially on entanglement, and in my own field of study, there is now high hopes that entanglement can finally resolve many of the deepest mysteries of the univserse, such as the information loss in black holes, traveling through a wormhole, and the fundamental nature of spacetime. It is sad that Einstein never lived to see progress made with his guidance he seeded all those years ago.