---
title: "Gauss Law on a Lattice Interactive Lab | Sandbox Physics"
description: "Can every charge and electric link be chosen independently? They cannot be chosen independently."
canonical_url: "https://sandboxphysics.com/labs/gauss-law-builder/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/gauss-law-builder/"
---

FR04-A · A charge needs its flux

# Gauss Law on a Lattice

**Can every charge and electric link be chosen independently?** They cannot be chosen independently. At each site, the outgoing electric flux minus the incoming flux must equal the matter charge plus any fixed external charge. Moving a particle therefore requires changing the adjoining flux.

Move electric flux between neighboring sites and find where Gauss law fails. Add a particle and its antiparticle, then find the links that make the configuration physical.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

The open chain has six staggered-fermion sites, integer electric flux and two fixed external charges. The builder displays individual basis configurations. It tests the local Gauss constraint; it does not evolve a quantum state. This one-dimensional Abelian model is distinct from three-dimensional QCD.

Deterministic model calculation

## Check each site

Two neighboring sites detect the broken link.

Selected site equation

$G_2=-1$

The record saves occupations, internal flux, fixed charges, boundary flux and every local residual.

[Continue the course: Gauss law, strings and gauge protection](https://sandboxphysics.com/stories/lattice-gauge/)

Physics tutorial

## Gauss Law on a Lattice

**Background** In one dimension, an electric link has only a left and a right neighbor. A charge at their meeting point fixes how much the flux must change across that point.

**Why it matters** A numerical calculation can include many impossible configurations unless the local constraint is built into its basis.

Start with the essentials

- **Focus question**: Can every charge and electric link be chosen independently?
- **One-sentence intuition**: A matter hop and the electric-flux change on its link are one allowed operation.

### Core mathematical model

#### Charge relative to the staggered background

$$
b_n=\frac{1-(-1)^n}{2},\qquad Q_n=N_n-b_n
$$

Sites are numbered from zero. The reference product state fills odd sites and leaves even sites empty. An occupied even site carries positive charge; an empty odd site carries negative charge.

#### The local Gauss generator

$$
G_n=E_n-E_{n-1}-Q_n-q_n^{\rm ext},\qquad G_n=0
$$

Electric flux points to the right. Both boundary fluxes vanish. A physical configuration satisfies this relation at every site, including the external charges at the ends.

### Common difficulties

#### A vanishing total is not enough

**Typical misconception** Positive and negative Gauss residuals cancel, so the state is physical.

**Better mental model** Every local residual must vanish separately. The sum only checks the total charge against the two boundary fluxes.

### Run the experiment

1. 01

   #### Find the two affected sites

   Start with A broken link. Drag the dark central link upward, or select its left site and increase Flux to its right.

   **What to observe:** One changed link affects the outgoing flux of one site and the incoming flux of its neighbor. Restoring the link removes both violations.

2. 02

   #### Make a screening pair

   Choose A screening pair. Compare the two gold and coral matter charges with An allowed string.

   **What to observe:** The matter charges reduce the flux between them. All local Gauss residuals still vanish.

3. 03

   #### Change an occupation alone

   Select a site and press Toggle occupation, or click the matter sphere in the scene. Then use Rebuild flux.

   **What to observe:** An isolated occupation change usually violates the constraint and can change the total charge. Rebuilding from the left boundary reveals any incompatible charge at the right boundary.

Physical conclusion

Test Gauss law locally before evolving a lattice state.

## Related experiments and articles

Lattice gauge fields and string breaking · Reading path

### Gauss constraints, screening and numerical control

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **Building an electric-flux chain with Gauss’s law**](https://sandboxphysics.com/stories/lattice-gauge/local-gauss/)
2. [Article **Turning allowed configurations into a quantum model**](https://sandboxphysics.com/stories/lattice-gauge/hamiltonian-basis/)
3. [Article **Reading an electric string from atomic occupations**](https://sandboxphysics.com/stories/lattice-gauge/optical-lattice-mapping/)

Quantum & fields · Starter path

## Start from a single measurement

Predict an outcome, then count what the measurements actually give. The path starts with one qubit and moves on to wave packets, bound states and two-photon interference.

[Start here → **Quantum State & Born Measurement** Predict a probability, turn the analyzer, then compare your prediction with the measured frequency over many shots. Observe · 15 min](https://sandboxphysics.com/labs/qubit-state/)

1. [1 Quantum State & Born Measurement](https://sandboxphysics.com/labs/qubit-state/)
2. [2 Stern–Gerlach Sequence](https://sandboxphysics.com/labs/stern-gerlach-sequence/)
3. [3 Wave Packet & Uncertainty](https://sandboxphysics.com/labs/wave-packet-uncertainty/)
4. [4 Quantum Harmonic Oscillator](https://sandboxphysics.com/labs/quantum-harmonic-oscillator/)
5. [5 Which Path & Quantum Eraser](https://sandboxphysics.com/labs/quantum-eraser/)
6. [6 Hong–Ou–Mandel Two-Photon Interference](https://sandboxphysics.com/labs/hong-ou-mandel/)

[View the full path →](https://sandboxphysics.com/topics/quantum/#starter-path)
