# Mermin's device

In physics, Mermin's device or Mermin's machine is a thought experiment intended to illustrate the non-classical features of nature without making a direct reference to quantum mechanics. The challenge is to reproduce the results of the thought experiment in terms of classical physics. The input of the experiment are particles, starting from a common origin, that reach detectors of a device that are independent from each other, the output are the lights of the device that turn on following a specific set of statistics depending on the configuration of the device.
The results of the thought experiment are constructed in such a way to reproduce the result of a Bell test using quantum entangled particles, which demonstrate how quantum mechanics cannot be explained using a local hidden variable theory. In this way Mermin's device is a pedagogical tool to introduce the unconventional features of quantum mechanics to a larger public.

## History

The original version with two particles and three settings per detector, was first devised in a paper called "Bringing home the atomic world: Quantum mysteries for anybody" authored by the physicist N. David Mermin in 1981. Richard Feynman told Mermin that it was "One of the most beautiful papers in physics". Mermin later described this accolade as "the finest reward of my entire career in physics". Ed Purcell shared Mermin's article with Willard Van Orman Quine, who then asked Mermin to write a version intended for philosophers, which he then produced.
Mermin also published a second version of the thought experiment in 1990 based on the GHZ experiment, with three particles and detectors with only two configurations. In 1993, Lucien Hardy devised a paradox that can be made into a Mermin-device-type thought experiment with two detectors and two settings.

## Original two particle device
### Assumptions

In Mermin's original thought experiment, he considers a device consisting of three parts: two detectors A and B, and a source C. The source emits two particles whenever a button is pushed, one particle reaches detector A and the other reaches detector B. The three parts A, B and C are isolated from each other (no connecting pipes, no wires, no antennas) in such a way that the detectors are not signaled when the button of the source has been pushed nor when the other detector has received a particle.
Each detector (A and B) has a switch with three configurations labeled (1,2 and 3) and a red and a green light bulb. Either the green or the red light will turn on (never both) when a particle enters the device after a given period of time. The light bulbs only emit light in the direction of the observer working on the device.
Additional barriers or instrument can be put in place to check that there is no interference between the three parts (A,B,C), as the parts should remain as independent as possible. Only allowing for a single particle to go from C to A and a single particle from C to B, and nothing else between A and B (no vibrations, no electromagnetic radiation).
The experiment runs in the following way. The button of the source C is pushed, particles take some time to travel to the detectors and the detectors flash a light with a color determined by the switch configuration. There are nine total possible configuration of the switches (three for A, three for B).
The switches can be changed at any moment during the experiment, even if the particles are still traveling to reach the detectors, but not after the detectors flash a light. The distance between the detectors can be changed so that the detectors flash a light at the same time or at different times. If detector A is set to flash a light first, the configuration of the switch of detector B can be changed after A has already flashed (similarly if B set to flash first, the settings of A can be change before A flashes).

### Expected results

The expected results of the experiment are given in this table in percentages:
Table 1 :
| Setting of detector 1 | Setting of detector 2 | Flash the same colors (%) | Flash opposite colors (%) |
| 1 | 1 | 100 | 0 |
| 2 | 2 | 100 | 0 |
| 3 | 3 | 100 | 0 |
| 1 | 2 | 25 | 75 |
| 1 | 3 | 25 | 75 |
| 2 | 1 | 25 | 75 |
| 2 | 3 | 25 | 75 |
| 3 | 1 | 25 | 75 |
| 3 | 2 | 25 | 75 |
Every time the detectors are set to the same setting, the bulbs in each detector always flash same colors (either A and B flash red, or A and B flash green) and never opposite colors (A red B green, or A green B red). Every time the detectors are at different setting, the detectors flash the same color a quarter of the time and opposite colors 3/4 of the time. The challenge consists in finding a device that can reproduce these statistics.

### Hidden variables and classical implementation

In order to make sense of the data using classical mechanics, one can consider the existence of three variables per particle that are measured by the detectors and follow the percentages above. Particle that goes into detector A has variables $(a_{1},a_{2},a_{3})$ and the particle that goes into detector B has variables $(b_{1},b_{2},b_{3})$. These variables determine which color will flash for a specific setting (1,2 and 3). For example, if the particle that goes in A has variables (R,G,G), then if the detector A is set to 1 it will flash red (labelled R), set to 2 or 3 it will flash green (labelled G).
We have 8 possible states:
| $(a_{1},a_{2},a_{3})$ | $(b_{1},b_{2},b_{3})$ |
| (G,G,G) | (G,G,G) |
| (G,G,R) | (G,G,R) |
| (G,R,G) | (G,R,G) |
| (G,R,R) | (G,R,R) |
| (R,G,G) | (R,G,G) |
| (R,G,R) | (R,G,R) |
| (R,R,G) | (R,R,G) |
| (R,R,R) | (R,R,R) |
where $(b_{1},b_{2},b_{3})=(a_{1},a_{2},a_{3})$ in order to reproduce the results of table 1 when selecting the same setting for both detectors.
For any given configuration, if the detector settings were chosen randomly, when the settings of the devices are different (12,13,21,23,31,32), the color of their lights would agree 100% of the time for the states (GGG) and (RRR) and for the other states the results would agree 1/3 of the time.
Thus we reach an impossibility: there is no possible distribution of these states that would allow for the system to flash the same colors 1/4 of the time when the settings are not the same. Thereby, it is not possible to reproduce the results provided in Table 1.

### Quantum mechanical implementation

Contrary to the classical implementation, table 1 can be reproduced using quantum mechanics using quantum entanglement. Mermin reveals a possible construction of his device based on David Bohm's version of the Einstein–Podolsky–Rosen paradox.
One can set two spin-1/2 particles in the maximally entangled singlet Bell state:
    $|\Psi ^{-}\rangle ={\frac {|\uparrow \downarrow \rangle -|\downarrow \uparrow \rangle }{\sqrt {2}}}$,
to leave the experiment, where $|\uparrow \downarrow \rangle$ ($|\downarrow \uparrow \rangle$) is the state where the projection of the spin of particle 1 is aligned (anti-aligned) with a given axis and particle 2 is anti-aligned (aligned) to the same axis. The measurement devices can be replaced with Stern–Gerlach devices, that measure the spin in a given direction. The three different settings determine whether the detectors are vertical or at ±120° to the vertical in the plane of perpendicular to the line of flight of the particles. Detector A flashes green when the spin of the measured particle is aligned with the detector's magnetic field and flashes red when anti-aligned. Detector B has the opposite color scheme with respect to A. Detector B flashes red when the spin of the measured particle is aligned and flashes green when anti-aligned. Another possibility is to use photons that have two possible polarizations, using polarizers as detectors, as in Aspect's experiment.
Quantum mechanics predicts a probability of measuring opposite spin projections given by
    $P(\theta )=\cos ^{2}(\theta /2)$
where $\theta$ is the relative angle between settings of the detectors. For $\theta =0$ and $\theta =\pm 120^{\circ }$ the system reproduces the result of table 1 keeping all the assumptions.

## Three particle device

Mermin's improved three particle device demonstrates the same concepts deterministically: no statistical analysis of multiple experiments is necessary. It has three detectors, each with two settings 1 and 2, and two lights, one red and one green. Each run of the experiment consists of setting the switches to values 1 or 2 and observing the color of the lights that flash when particles enter the detectors. The detectors again are assumed independent of one another, and cannot interact.
For the improved device, the expected results are the following: if one detector is switched to setting 1 while the others are on setting 2, an odd number of red lights flash. If all three detectors set to 1, and odd number of red light flashes never occurs.
Mermin then imagines that each of three particles emitted from the common source and entering the detectors has a hidden instruction set, dictating which light to flash for each switch setting. If only one device of three has a switch set to 1, there will always be an odd number of red flashes. However, Mermin shows that all possible instruction sets predict an odd number of red lights when all three devices are set to 1. No instruction set built in to the particles can explain the expected results. This contradiction implies that local hidden variable theory cannot explain such a device.

### Quantum mechanical implementation

The improved device can be built using quantum mechanics. This implementation is based on the Greenberger–Horne–Zeilinger (GHZ) experiment. The device can be constructed if the three particles are quantum entangled in a GHZ state, written as
    $|\mathrm {GHZ} \rangle ={\frac {1}{\sqrt {2}}}(|\mathrm {\downarrow \downarrow \downarrow } \rangle +|\mathrm {\uparrow \uparrow \uparrow } \rangle ).$
where $|\downarrow \rangle$ and $|\uparrow \rangle$ represent two states of a two-level quantum system. For electrons, the two states can be the up and down projections of the spin along the z-axis. The detector settings correspond to other two orthogonal measurement directions (for example, projections along x-axis or along the y-axis).