When not everyone can be satisfied simultaneously, the system freezes into a disordered but structured state.
At a dinner party with friend pairs (same side) and rival pairs (opposite sides), loops of odd length leave at least one pair unhappy no matter how you seat them. That is frustration, the central idea behind spin glasses.
A spin glass is a material with random magnetic couplings — some bonds want neighbors aligned, some want them opposite. On certain triangles no assignment satisfies every bond. The system has many nearly equivalent configurations separated by energy barriers. Cooling brings frozen disorder, not order.
Each circle is a spin (red up, blue down). Bonds are ferromagnetic (solid, want matching spins) or antiferromagnetic (dashed, want opposite spins). Triangles where no assignment satisfies all three bonds are highlighted in orange. Frustration is a property of the bonds, not the configuration.
Click a spin to flip it.
Figure 1. A triangular spin glass lattice. Solid green lines indicate satisfied bonds; dashed red lines indicate frustrated ones. Orange highlights mark triangles where no configuration can satisfy all constraints.
Triangles with an odd number of antiferromagnetic bonds always leave at least one bond unsatisfied. Frustration comes from inescapable loops, not the count of antiferromagnetic bonds.
The Metropolis algorithm: pick a spin, compute $\Delta E$ from flipping it, accept downhill flips, accept uphill flips with probability $e^{-\Delta E / T}$. High $T$ accepts almost anything; low $T$ allows only downhill moves.
Drop the temperature and the system freezes. Each run lands in a different configuration at a different final energy — the signature of a spin glass. The landscape has many valleys, and which one you land in depends on the cooling path.
While paused, click a spin to flip it by hand.
Figure 2. Each colored line is one cooling run; the dashed grey curve is the temperature schedule \( T(t) \) on its own axis. Final energies differ because the system gets trapped in different valleys of the energy landscape. Pause any time to inspect the configuration, or flip spins manually to probe the local barrier. Click a run chip to recall that trajectory's final state.
A small system (7 spins, 128 configurations) lets us enumerate every state. Sort them by energy and the result is a forest of local minima separated by peaks — no clean funnel.
Hover a bar to see that configuration; the number is its Hamming distance from the current ground state. Similar-energy states sit far apart in configuration space and require crossing tall barriers to reach. That is what makes spin glasses computationally hard.
Figure 3. Energy of every configuration for a small spin glass. Hover a bar to preview that state. The rugged terrain with many near-degenerate minima is the hallmark of NP-hard optimization.
Spin glasses earned Giorgio Parisi the 2021 Nobel in Physics. His replica symmetry breaking tools now appear in neural network theory, error-correcting codes, and combinatorial optimization. The traveling salesman problem maps to a spin glass.