🌀 Spin Glass
PhysicsDifficulty 4/5
Temperature
Lattice
Statistics
Energy / N²
Order param q
Frustrated %
MC sweeps
0
Satisfied bond
Frustrated bond
Spin ↑
Spin ↓
ℹ Info & Algorithm

Random ferromagnetic (+J) and antiferromagnetic (−J) bonds prevent the lattice from finding a single ground state. The system instead wanders among many metastable minima — the defining feature of a spin glass.

Hamiltonian

H = −Σ Jij si sj

where Jij ∈ {+1, −1} drawn at initialisation; si ∈ {+1, −1}.

Metropolis MC Steps

  • Pick a random spin i
  • Compute ΔE = 2 si Σj∈nn Jij sj
  • If ΔE ≤ 0: flip unconditionally
  • Else: flip with prob exp(−ΔE / T)

Order Parameter

q = (1/N²) Σ 〈si〉²

Non-zero q below Tf signals frozen spins.

Did You Know?

The mathematics of spin glasses — replica theory by Giorgio Parisi (Nobel 2021) — also describes the loss landscape of deep neural networks and the hardness of NP optimisation problems.

FAQ — Spin Glass Physics

What is a spin glass?

A spin glass is a disordered magnetic material where interactions between spins are randomly ferromagnetic or antiferromagnetic. This randomness causes frustration — no configuration satisfies all bonds — producing a rugged energy landscape with many metastable states and slow, complex relaxation dynamics.

What is magnetic frustration?

Frustration occurs when competing interactions cannot all be satisfied simultaneously. A classic example: in a triangle with two ferromagnetic and one antiferromagnetic bond, at least one bond must remain unsatisfied regardless of spin orientations. Red bonds in this simulation mark frustrated interactions.

What is the Edwards-Anderson model?

Proposed by Edwards and Anderson in 1975, this model places Ising spins (s = ±1) on a lattice with random nearest-neighbour couplings Jij ∈ {±1}. The Hamiltonian H = −Σ Jij si sj captures spatial disorder and is the standard lattice model for spin glasses.

What does the Metropolis algorithm do here?

A randomly chosen spin is flipped if the energy decreases (ΔE ≤ 0), or with probability exp(−ΔE/T) if it increases. This preserves detailed balance and drives the system toward thermal equilibrium. Many proposed flips are attempted each animation frame (one MC sweep = N² attempts).

What is the spin-glass order parameter q?

The Edwards-Anderson order parameter q = ⟨(1/N²) Σ ⟨si⟩²⟩ measures whether individual spins freeze into preferred orientations over time. q → 0 in the paramagnetic phase and q → 1 in the deeply frozen spin-glass phase, even though the global magnetisation remains near zero.

Why does the energy relax logarithmically?

The rugged energy landscape contains barriers of widely varying heights. Escaping each successive barrier is exponentially harder, so the system's energy decreases roughly as E(t) ∝ −log(t). This characteristic slow, non-exponential relaxation is a hallmark of spin glasses and distinguishes them from simple ferromagnets.

What is the freezing temperature Tf?

Below Tf the spin glass enters a frozen phase: thermal fluctuations are too weak to explore all metastable states ergodically, q becomes non-zero, and the system exhibits history-dependent (non-equilibrium) behaviour. The dashed vertical line in the energy plot marks your chosen Tf.

How is a spin glass different from a ferromagnet?

In a ferromagnet all couplings Jij are positive, the ground state has aligned spins, and global magnetisation is large. In a spin glass, random signs of Jij mean the time-averaged magnetisation is zero, yet individual spins freeze in fixed random directions. The relevant order parameter is q, not m.

What real materials behave as spin glasses?

Dilute magnetic alloys such as Cu:Mn and Au:Fe are canonical spin glasses. The RKKY interaction between magnetic impurities oscillates in sign with distance, producing random competing interactions. Spin-glass-like behaviour also appears in frustrated magnets, certain polymers, and protein-folding energy landscapes.

What is the connection to neural networks?

Hopfield's 1982 associative memory model has the same energy function as an Edwards-Anderson spin glass. Stored memories correspond to local energy minima. Parisi's replica theory for spin glasses was later applied to understand the loss landscape of deep neural networks and the typical-case complexity of NP-hard problems.