Good news everyone! Flatland is non-contextual!

Quantum mechanics is weird! Imagine for a second that you want to make an experiment and that the result of your experiment depends on what your colleague is doing in the next room. It would be crazy to live in such a world! This is the world we live in, at least at the quantum scale. The result of an experiment cannot be described in a way that is independent of the context. The neighbor is sticking his nose in our experiment!

Before telling you why quantum mechanics is contextual, let me give you an experiment that admits a simple non-contextual explanation. This story takes place in Flatland, a two-dimensional world inhabited by polygons. Our protagonist is a square who became famous after claiming that he met a sphere.



This square, call him Mr Square for convenience, met a sphere, Miss Sphere. When you live in a planar world like Flatland, this kind of event is not only rare, but it is also quite weird! For people of Flatland, only the intersection of Miss Sphere’s body with the plane is visible. Depending on the position of the sphere, its shape in Flatland will either be a point, a circle, or it could even be empty.


During their trip to flatland, Professor Farnsworth explains to Bender: “If we were in the third dimension looking down, we would be able to see an unhatched chick in it. Just as a chick in a 3-dimensional egg could be seen by an observer in the fourth dimension.’

Not convinced by Miss Sphere’s arguments, Mr Square tried to prove that she cannot exist – Square was a mathematician – and failed miserably. Let’s imagine a more realistic story, a story where spheres cannot speak. In this story, Mr Square will be a physicist, familiar with hidden variable models. Mr Square met a sphere, but a tongue-tied sphere! Confronted with this mysterious event, he did what any other citizen of Flatland would have done. He took a selfie with Miss Sphere. Mr Square was kind enough to let us use some of his photos to illustrate our story.

Picture taken by Mr Square, with his Flatland-camera. (a) The sphere. (b) Selfie of Square (left) with the sphere (right).

As you can see on these photos, when you are stuck in Flatland and you take a picture of a sphere, only a segment is visible. What aroused Mr Square’s curiosity is the fact that the length of this segment changes constantly. Each picture shows a segment of a different length, due to the movement of the sphere along the z-axis, invisible to him. However, although they look random, Square discovered that these changing lengths can be explained without randomness by introducing a hidden variable living in a hypothetical third dimension. The apparent randomness is simply a consequence of his incomplete knowledge of the system: The position along the hidden variable axis z is inaccessible! Of course, this is only a model, this third dimension is purely theoretical, and no one from Flatland will ever visit it.

What about quantum mechanics?

Measurement outcomes are random as well in the quantum realm. Can we explain the randomness in quantum measurements by a hidden variable? Surprisingly, the answer is no! Von Neumann, one of the greatest scientists of the 20th century, was the first one to make this claim in 1932. His attempt to prove this result is known today as “Von Neumann’s silly mistake”. It was not until 1966 that Bell convinced the community that Von Neumann’s argument relies on a silly assumption.

Consider first a system of a single quantum bit, or qubit. A qubit is a 2-level system. It can be either in a ground state or in an excited state, but also in a quantum superposition |\psi\rangle = \alpha |g\rangle + \beta|e\rangle of these two states, where \alpha and \beta are complex numbers such that |\alpha|^2 + |\beta|^2 = 1. We can see this quantum state as a 2-dimensional vector (\alpha, \beta), where the ground state is |g\rangle=(1,0) and the excited state is |e\rangle=(0,1).


The probability of an outcome depends on the projection of the quantum state onto the ground state and the excited state.

What can we measure about this qubit? First, imagine that we want to know if our quantum state is in the ground state or in the excited state. There is a quantum measurement that returns a random outcome, which is g with probability P(g) = |\alpha|^2 and e with probability P(e) = |\beta|^2.

Let us try to reinterpret this measurement in a different way. Inspired by Mr Square’s idea, we extend our description of the state |\psi\rangle of the system to include the outcome as an extra parameter. In this model, a state is a pair of the form (|\psi\rangle, \lambda) where \lambda is either e or g. Our quantum state can be seen as being in position (|\psi\rangle, g) with probability P(g) or in position (|\psi\rangle, e) with probability P(e). Measuring only reveals the value of the hidden variable \lambda. By introducing a hidden variable, we made this measurement deterministic. This proves that the randomness can be moved to the level of the description of the state, just as in Flatland. The weirdness of quantum mechanics goes away.

Contextuality of quantum mechanics

Let us try to extend our hidden variable model to all quantum measurements. We can associate a measurement with a particular kind of matrix A, called an observable. Measuring an observable returns randomly one of its eigenvalue. For instance, the Pauli matrices

Z =  \begin{pmatrix}  1 & 0\\  0 & -1\\  \end{pmatrix}  \quad \text{ and } \quad  X =  \begin{pmatrix}  0 & 1\\  1 & 0\\  \end{pmatrix},

as well as Y = iZX and the identity matrix I, are 1-qubit observables with eigenvalues (i.e. measurement outcomes) \pm 1. Now, take a system of 2 qubits. Since each of the 2 qubits can be either excited or not, our quantum state is a 4-dimensional vector

|\psi\rangle = \alpha |g_1\rangle \otimes |g_2\rangle  + \beta |g_1\rangle \otimes |e_2\rangle  + \gamma |e_1\rangle \otimes |g_2\rangle  + \delta |e_1\rangle \otimes |e_2\rangle.

Therein, the 4 vectors |x\rangle \otimes |y\rangle can be identified with the vectors of the canonical basis (1000), (0100), (0010) and (0001). We will consider the measurement of 2-qubit observables of the form A \otimes B defined by A \otimes B |x\rangle \otimes |y\rangle = A |x\rangle \otimes B |y\rangle. In other words, A acts on the first qubit and B acts on the second one. Later, we will look into the observables X \otimes I, Z \otimes I, I \otimes X, I \otimes Z and their products.

What happens when two observables are measured simultaneously? In quantum mechanics, we can measure simultaneously multiple observables if these observables commute with each other. In that case, measuring O then O', or measuring O' first and then O, doesn’t make any difference. Therefore, we say that these observables are measured simultaneously, the outcome being a pair (\lambda,\lambda'), composed of an eigenvalue of O and an eigenvalue of O'. Their product O'' = OO', which commutes with both O and O', can also be measured in the same time. Measuring this triple returns a triple of eigenvalues (\lambda,\lambda',\lambda'') corresponding respectively to O, O' and O''. The relation O'' = OO' imposes the constraint

(1)               \qquad \lambda'' = \lambda \lambda'

on the outcomes.

Assume that one can describe the result of all quantum measurements with a model such that, for all observables O and for all states \nu of the model, a deterministic outcome \lambda_\nu(O) exists. Here, \nu is our ‘extended’, not necessarily physical, description of the state of the system. When O and O' are commuting, it is reasonable to assume that the relation (1) holds also at the level of the hidden variable model, namely

(2)                \lambda_\nu(OO') = \lambda_\nu(O) \cdot \lambda_\nu(O').

Such a model is called a non-contextual hidden variable model. Von Neumann proved that no such value \lambda_\nu exists by considering these relations for all pairs O, O' of observables. This shows that quantum mechanics is contextual! Hum… Wait a minute. It seems silly to impose such a constraint for all pairs of observable, including those that cannot be measured simultaneously. This is “Von Neumann’s silly assumption’. Only pairs of commuting observables should be considered.


Peres-Mermin proof of contextuality

One can resurrect Von Neumann’s argument, assuming Eq.(2) only for commuting observables. Peres-Mermin’s square provides an elegant proof of this result. Form a 3 \times 3 array with these observables. It is constructed in such a way that

(i) The eigenvalues of all the observables in Peres-Mermin’s square are ±1,

(ii) Each row and each column is a triple of commuting observables,

(iii) The last element of each row and each column is the product of the 2 first observables, except in the last column where Y \otimes Y = -(Z \otimes Z)(X \otimes X).

If a non-contextual hidden variable exists, it associates fixed eigenvalues a, b, c, d (which are either 1 or -1) with the 4 observables X \otimes I, Z \otimes I, I \otimes X, I \otimes Z. Applying Eq.(2) to the first 2 rows and to the first 2 columns, one deduces the values of all the observables of the square, except Y \otimes Y . Finally, what value should be attributed to Y \otimes Y? By (iii), applying Eq.(2) to the last row, one gets \lambda_\nu(Y \otimes Y) = abcd. However, using the last column, (iii) and Eq.(2) yield the opposite value \lambda_\nu (Y \otimes Y ) = -abcd. This is the expected contradiction, proving that there is no non-contextual value \lambda_\nu. Quantum mechanics is contextual!

We saw that the randomness in quantum measurements cannot be explained in a ‘classical’ way. Besides its fundamental importance, this result also influences quantum technologies. What I really care about is how to construct a quantum computer, or more generally, I would like to understand what kind of quantum device could be superior to its classical counterpart for certain tasks. Such a quantum advantage can only be reached by exploiting the weirdness of quantum mechanics, such as contextuality 1,2,3,4,5. Understanding these weird phenomena is one of the first tasks to accomplish.

Monopoles passing through Flatland!

Like many mathematically inclined teenagers, I was charmed when I first read the book Flatland by Edwin Abbott Abbott.* It’s a story about a Sphere who visits a two-dimensional world and tries to awaken its inhabitants to the existence of a third dimension. As perceived by Flatlanders, the Sphere is a circle which appears as a point, grows to maximum size, then shrinks and disappears.

My memories of Flatland were aroused as I read a delightful recent paper by Max Metlitski, Charlie Kane, and Matthew Fisher about magnetic monopoles and three-dimensional bosonic topological insulators. To explain why, I’ll need to recall a few elements of the theory of monopoles and of topological insulators, before returning to the connection between the two and why that reminds me of Flatland.

Flatlanders, confined to the surface of a topological insulator, are convinced by a magnetic monopole that there is a third dimension.

Flatlanders, confined to the two-dimensional surface of a topological insulator, are convinced by a magnetic monopole that a third dimension must exist.


Paul Dirac was no ordinary genius. Aside from formulating relativistic electron theory and predicting the existence of antimatter, Dirac launched the quantum theory of magnetic monopoles in a famous 1931 paper. Dirac envisioned a magnetic monopole as a semi-infinitely long, infinitesimally thin string of magnetic flux, such that the end of the string, where the flux spills out, seems to be a magnetic charge. For this picture to make sense, the string should be invisible. Dirac pointed out that an electron with electric charge e, transported around a string carrying flux \Phi, could detect the string (via what later came to be called the Aharonov-Bohm effect) unless the flux is an integer multiple of 2\pi\hbar /e, where \hbar is Planck’s constant. Conversely, in order for the string to be invisible, if a magnetic monopole exists with magnetic charge g_D = 2\pi\hbar /e, then all electric charges must be integer multiples of e. Thus the existence of magnetic monopoles (which have never been observed) could explain quantization of electric charge (which has been observed).

Captivated by the beauty of his own proposal, Dirac concluded his paper by remarking, “One would be surprised if Nature had made no use of it.”

Our understanding of quantized magnetic monopoles advanced again in 1979 when another extraordinary physicist, Edward Witten, discussed a generalization of Dirac’s quantization condition. Witten noted that the Lagrange density of electrodynamics could contain a term of the form

\frac{\theta e^2\hbar}{4\pi^2}~\vec{E}\cdot\vec{B},

where \vec{E} is the electric field and \vec{B} is the magnetic field. This “\theta term” may also be expressed as

\frac{\theta e^2\hbar}{8\pi^2}~ \partial^\mu\left(\epsilon_{\mu\nu\lambda\sigma}A^\nu\partial^\lambda A^\sigma \right),

where A is the vector potential, and hence is a total derivative which makes no contribution to the classical field equations of electrodynamics. But Witten realized that it can have important consequences for the quantum properties of magnetic monopoles. Specifically, the \theta term modifies the field momentum conjugate to the vector potential, which becomes

\vec{E}+\frac{\theta e^2\hbar}{4\pi^2}\vec{B}.

Because the Gauss law condition satisfied by physical quantum states is altered, for a monopole with magnetic charge m g_D , where g_D is Dirac’s minimal charge 2\pi\hbar /e and m is an integer, the allowed values of the electric charge become

q = e\left( n - \frac{\theta m}{2\pi}\right),

where n is an integer. This spectrum of allowed charges remains invariant if \theta advances by 2\pi, suggesting that the parameter \theta is actually an angular variable with period 2\pi. This periodicity of \theta can be readily verified in a theory admitting fermions with the minimal charge e. But if the charged particles are bosons then \theta turns out to be a periodic variable with period 4\pi instead.

That \theta has a different period for a bosonic theory than a fermionic one has an interesting interpretation. As Goldhaber noticed in 1976, dyons carrying both magnetic and electric charge can exhibit statistical transmutation. That is, in a purely bosonic theory, a dyon with magnetic charge g_D= 2\pi\hbar/e and electric charge ne is a fermion if n is an odd integer — when two dyons are exchanged, transport of each dyon’s electric charge in the magnetic field of the other dyon induces a sign change in the wave function. In a fermionic theory the story is different; now we can think of the dyon as a fermionic electric charge bound to a bosonic monopole. There are two canceling contributions to the exchange phase of the dyon, which is therefore a boson for any integer value of n, whether even or odd.

As \theta smoothly increases from 0 to 2\pi, the statistics (whether bosonic or fermionic) of a dyon remains fixed even as the dyon’s electric charge increases by e. For the bosonic theory with \theta = 2\pi, then, dyons with magnetic charge g_D and electric charge ne are bosons for n odd and fermions for n even, the opposite of what happens when \theta=0. For the bosonic theory, unlike the fermionic theory, we need to increase \theta by 4\pi for the physics of dyons to be fully invariant.

In 1979 Ed Witten was a postdoc at Harvard, where I was a student, though he was visiting CERN for the summer when he wrote his paper about the \theta-dependent monopole charge. I always read Ed’s papers carefully, but I gave special scrutiny to this one because magnetic monopoles were a pet interest of mine. At the time, I wondered whether the Witten effect might clarify how to realize the \theta parameter in a lattice gauge theory. But it certainly did not occur to me that the \theta-dependent electric charge of a magnetic monopole could have important implications for quantum condensed matter physics. Theoretical breakthroughs often have unexpected consequences, which may take decades to emerge.

Symmetry-protected topological phases

Okay, now let’s talk about topological insulators, a very hot topic in condensed matter physics these days. Actually, a topological insulator is a particular instance of a more general concept called a symmetry-protected topological phase of matter (or SPT phase). Consider a d-dimensional hunk of material with a (d-1)-dimensional boundary. If the material is in an SPT phase, then the physics of the d-dimensional bulk is boring — it’s just an insulator with an energy gap, admitting no low-energy propagating excitations. But the physics of the (d-1)-dimensional edge is exotic and exciting — for example the edge might support “gapless” excitations of arbitrarily low energy which can conduct electricity. The exotica exhibited by the edge is a consequence of a symmetry, and is destroyed if the symmetry is broken either explicitly or spontaneously; that is why we say the phase is “symmetry protected.”

The low-energy edge excitations can be described by a (d-1)-dimensional effective field theory. But for a typical SPT phase, this effective field theory is what we call anomalous, which means that for one reason or another the theory does not really make sense. The anomaly tells us something interesting and important, namely that the (d-1)-dimensional theory cannot be really, truly (d-1) dimensional; it can arise only at the edge of a higher-dimensional system.

This phenomenon, in which the edge does not make sense by itself without the bulk, is nicely illustrated by the integer quantum Hall effect, which occurs in a two-dimensional electron system in a high magnetic field and at low temperature, if the sample is sufficiently clean so that the electrons are highly mobile and rarely scattered by impurities. In this case the relevant symmetry is electron number, or equivalently the electric charge. At the one-dimensional edge of a two-dimensional quantum Hall sample, charge carriers move in only one direction — to the right, say, but not to the left. A theory with such chiral electric charges does not really make sense. One problem is that electric charge is not conserved — an electric field along the edge causes charge to be locally created, which makes the theory inconsistent.

The way the theory resolves this conundrum is quite remarkable. A two-dimensional strip of quantum Hall fluid has two edges, one at the top, the other at the bottom. While the top edge has only right-moving excitations, the bottom edge has only left-moving excitations. When electric charge appears on the top edge, it is simultaneously removed from the bottom edge. Rather miraculously, charge can be conveyed across the bulk from one edge to the other, even though the bulk does not have any low-energy excitations at all.

I first learned about this interplay of edge and bulk physics from a beautiful 1985 paper by Curt Callan and Jeff Harvey. They explained very lucidly how an edge theory with an anomaly and a bulk theory with an anomaly can fit together, with each solving the other’s problems. Curiously, the authors did not mention any connection with the quantum Hall effect, which had been discovered five years earlier, and I didn’t appreciate the connection myself until years later.

Topological insulators

In the case of topological insulators, the symmetries which protect the gapless edge excitations are time-reversal invariance and conserved particle number, i.e. U(1) symmetry. Though the particle number might not be coupled to an electromagnetic gauge field, it is instructive for the purpose of understanding the properties of the symmetry-protected phase to imagine that the U(1) symmetry is gauged, and then to consider the potential anomalies that could afflict this gauge symmetry. The first topological insulators conceived by theorists were envisioned as systems of non-interacting electrons whose properties were relatively easy to understand using band theory. But it was not so clear at first how interactions among the electrons might alter their exotic behavior. The wonderful thing about anomalies is that they are robust with respect to interactions. In many cases we can infer the features of anomalies by studying a theory of non-interacting particles, assured that these features survive even when the particles interact.

As have many previous authors, Metlitski et al. argue that when we couple the conserved particle number to a U(1) gauge field, the effective theory describing the bulk physics of a topological insulator in three dimensions may contain a \theta term. But wait … since the electric field is even under time reversal and the magnetic field is odd, the \theta term is T-odd; under T, \theta is mapped to -\theta, so T seems to be violated if \theta has any nonzero value. Except … we have to remember that \theta is really a periodic variable. For a fermionic topological insulator the period is 2\pi; therefore the theory with \theta = \pi is time reversal invariant; \theta = \pi maps to \theta = -\pi under T, which is equivalent to a rotation of \theta by 2\pi. For a bosonic topological insulator the period is 4\pi, which means that \theta = 2\pi is the nontrivial T-invariant value.

If we say that a “trivial” insulator (e.g., the vacuum) has \theta = 0, then we may say that a bulk material with \theta = \pi (fermionic case) or \theta = 2\pi (bosonic case) is a “nontrivial” (a.k.a. topological) insulator. At the edge of the sample, where bulk material meets vacuum, \theta must rotate suddenly by \pi (fermions) or by 2\pi (bosons). The exotic edge physics is a consequence of this abrupt change in \theta.

Monopoles in Flatland

To understand the edge physics, and in particular to grasp how fermionic and bosonic topological insulators differ, Metlitski et al. invite us to imagine a magnetic monopole with magnetic charge g_D passing through the boundary between the bulk and the surrounding vacuum. To the Flatlanders confined to the surface of the bulk sample, the passing monopole induces a sudden change in the magnetic flux through the surface by a single flux quantum g_D, which could arise due to a quantum tunneling event. What does the Flatlander see?

In a fermionic topological insulator, there is a monopole that carries charge e/2 when inside the sample (where \theta=-\pi) and charge 0 when outside (where \theta=0). Since electric charge is surely conserved in the full three-dimensional theory, the change in the monopole’s charge must be compensated by a corresponding change in the charge residing on the surface. Flatlanders are puzzled to witness a spontaneously arising excitation with charge e/2. This is an anomaly — electric charge conservation is violated, which can only make sense if Flatlanders are confined to a surface in a higher-dimensional world. Though unable to escape their surface world, the Flatlanders can be convinced by the Monopole that an extra dimension must exist.

In a bosonic topological insulator, the story is somewhat different: there is a monopole that carries electric charge 0 when inside the sample (where \theta=-2\pi) and charge –e when outside (where \theta=0). In this case, though, there are bosonic charge-e particles living on the surface. A monopole can pick up a charged particle as it passes through Flatland, so that its charge is 0 both inside the bulk sample and outside in the vacuum. Flatlanders are happy — electric charge is conserved!

But hold on … there’s still something wrong. Inside the bulk (where \theta= -2\pi) a monopole with electric charge 0 is a fermion, while outside in the vacuum (where \theta = 0) it is a boson. In the three-dimensional theory it is not possible for any local process to create an isolated fermion, so if the fermionic monopole becomes a bosonic monople as it passes through Flatland, it must leave a fermion behind. Flatlanders are puzzled to witness a spontaneously arising fermion. This is an anomaly — conservation of fermionic parity is violated, which can only make sense if Flatlanders are confined to a surface in a higher-dimensional world. Once again, the clever residents of Flatland learn from the Monopole about an extra spatial dimension, without ever venturing outside their two-dimensional home.

Topological order gets edgy

This post is already pretty long and I should wrap it up. Before concluding I’ll remark that the theory of symmetry-protected phases has been developing rapidly in recent months.

In particular, a new idea, introduced last fall by Vishwanath and Senthil, has been attracting increasing attention. While in most previously studied SPT phases the unbroken symmetry protects gapless excitations confined to the edge of the sample, Vishwanath and Senthil pointed out another possibility — a gapped edge exhibiting topological order. The surface can support anyons with exotic braiding statistics.

Here, too, anomalies are central to the discussion. While anyons in two-dimensional media are already a much-studied subject, the anyon models that can be realized at the edges of three-dimensional SPT phases are different than anyon models realized in really, truly two-dimensional systems. What’s new are not the braiding properties of the anyons, but rather how the anyons transform under the symmetry. Flatlanders who study the symmetry realization in their gapped two-dimensional world should be able to infer the existence of the three-dimensional bulk.

The pace of discovery picked up this month when four papers appeared simultaneously on the preprint arXiv, by Metlitski-Kane-Fisher, Chen-Fidkowski-Vishwanath, Bonderson-Nayak-Qi, and Wang-Potter-Senthil, all proposing and analyzing models of SPT phases with gapped edges. It remains to be seen, though, whether this physics will be realized in actual materials.

Are we on the edge?

In Flatland, our two-dimensional friend, finally able to perceive the third dimension thanks to the Sphere’s insistent tutelage, begs to enter a world of still higher dimensions, “where thine own intestines, and those of kindred Spheres, will lie exposed to … view.” The Sphere is baffled by the Flatlander’s request, protesting, “There is no such land. The very idea of it is utterly inconceivable.”

Let’s not be so dogmatic as the Sphere. The lessons learned from the quantum Hall effect and the topological insulator have prepared us to take the next step, envisioning our own three-dimensional world as the edge of a higher-dimensional bulk system. The existence of an unseen bulk may be inferred in the future by us edgelings, if experimental explorations of our three-dimensional effective theory reveal anomalies begging for an explanation.

Perhaps we are on the edge … of a great discovery. At least it’s conceivable.

*Disclaimer: The gender politics of Flatland, to put it mildly, is outdated and offensive. I don’t wish to endorse the idea that women are one dimensional! I included the reference to Flatland because the imagery of two-dimensional beings struggling to imagine the third dimension is a perfect fit to the scientific content of this post.