---
title: Bands and Fermi surfaces lab
heading: A tight-binding square lattice in Python, from its density of states and Fermi level to effective and cyclotron masses
eyebrow: B12 · Lesson 18 · Bands lab
xp: 50
---

::: hook
Lessons 14 to 17 described bands with free electrons slightly perturbed, with tight binding in one dimension and in graphene, and with Fermi surfaces. A two-dimensional tight-binding band is the simplest model that shows everything at once: a parabolic bottom with an effective mass, a saddle point where the density of states diverges, a Fermi contour that turns from a circle into a square as the band fills, and a cyclotron mass that grows without bound at half filling. In this lab you'll compute all of it on a grid of k points, the way band-structure codes do, and check each number against the formulas.
:::

::: play
- The curves are the square lattice's band $E = -2t(\cos k_xa + \cos k_ya)$ along two directions from the zone center: toward the edge's midpoint X, and along the diagonal toward the corner M.
- The band runs from −4t at Γ to +4t at M. Along Γ–X it only reaches 0, the saddle point where the density of states piles up.
- The slider moves the Fermi level; the readouts give the band mass at the bottom and the free-electron estimate of the filling.
:::

```sim plot
view: graph
x: f = 0..1
y: E = -4.5..4.5 eV
slider: t = 0.2..2 step 0.05 = 1 eV
slider: e = -4..4 step 0.05 = -1.44 eV
plot: -2*t*(cos(pi*f) + 1) | label: Γ to X | samples: 300
plot: -4*t*cos(pi*f) | color: ch2 | label: Γ to M | samples: 300
marker: E = e | label: Fermi level
readout: band mass at the bottom for a 0.3 nm lattice, in units of mₑ = (1.054571817e-34)^2/(2*t*1.602176634e-19*(0.3e-9)^2)/9.1093837e-31 | digits: 3
readout: filling estimate near the bottom, electrons per site = (e/t + 4)/(2*pi) | digits: 3
```

::: predict
## Electrons fill a square-lattice tight-binding band. As the Fermi level approaches the band's middle (E = 0), what happens to the density of states there?

- [ ] It falls to zero
- [ ] It stays constant, as for free electrons in 2D
- [x] It diverges (logarithmically) at the saddle points
- [ ] It doubles

::: reveal
It diverges logarithmically. At E = 0 the Fermi contour touches the zone's edge midpoints, where the band is flat in one direction and curved down in the other: saddle points. Near them, many k states share almost the same energy, a van Hove singularity. Step 2's histogram shows the spike, and step 5 shows its effect on the cyclotron mass.
:::
:::

::: nameit
## The band on a grid

With nearest-neighbor hopping t on a square lattice of spacing a, the band is $E(\mathbf k) = -2t(\cos k_xa + \cos k_ya)$, from −4t to +4t. Sampling an n × n grid of k points across the zone, centered in each cell, gives n² equally weighted states; each holds two electrons (spin).

## Density of states and Fermi level

A histogram of the grid's energies estimates the density of states. Sorting them gives the Fermi level directly: for a filling of ν electrons per site, the states up to $E_F$ make up a fraction ν/2 of the zone. Near the bottom the band is parabolic, $E \approx -4t + ta^2k^2$, so with $k_F^2a^2 = 2\pi\nu$ the Fermi level is about $t(2\pi\nu - 4)$.

## Effective mass

The curvature at the bottom gives $m^* = \frac{\hbar^2}{2ta^2}$: narrow bands (small t) and short hopping distances make heavy electrons. A numerical second derivative of E(k) gives the same.

## Cyclotron mass

In a magnetic field electrons orbit around the Fermi contour, at a rate set by how fast its enclosed area A grows with energy:

$$m_c = \frac{\hbar^2}{2\pi}\frac{dA}{dE}.$$

Near the bottom $m_c = m^*$. As the contour approaches the saddle points, dA/dE grows (the density of states is $\frac{2}{(2\pi)^2}\frac{dA}{dE}$ per unit area), so orbits slow and $m_c$ rises without bound at E = 0.
:::

::: example
## For t = 1 eV and a = 0.3 nm, what's the band's effective mass at the bottom, and where is the Fermi level at 0.1 electrons per site?

::: solution
1. **Effective mass at the bottom.**
   $$\begin{aligned} m^* &= \frac{\hbar^2}{2ta^2} \\ &= \frac{(1.055 \times 10^{-34})^2}{2(1.602 \times 10^{-19})(3 \times 10^{-10})^2} \\ &= 0.423m_e \end{aligned}$$
2. **Parabolic estimate of the Fermi level.** At low filling,
   $$\begin{aligned} E_F &\approx t(2\pi\nu - 4) \\ &= -3.37\ \text{eV} \end{aligned}$$
   0.63 eV above the bottom.
3. **Fermi level from the grid.** Sorting the energies on a fine grid gives −3.40 eV.
4. **Why they differ.** The band already bends below the parabola, so the parabolic estimate overshoots by about 4% of the filled depth.

**Answer:** the effective mass at the bottom is 0.423 mₑ, and the Fermi level sits at −3.40 eV (the parabolic estimate gives −3.37 eV).
:::
:::

::: example
## At what Fermi level is the band half full (one electron per site), and what shape is the Fermi contour there?

::: solution
1. **Symmetry.** By symmetry, $E(\mathbf k + (\pi/a, \pi/a)) = -E(\mathbf k)$, so states below and above zero are equal in number, and half filling puts $E_F$ = 0 exactly.
2. **The contour.** The contour $\cos k_xa + \cos k_ya = 0$ is the square joining the four edge midpoints:
   $$|k_x| + |k_y| = \pi/a$$
3. **Nesting.** Opposite sides of that square are parallel, so one wavevector, $(\pi/a, \pi/a)$, connects large stretches of the Fermi surface.
4. **What nesting does.** This "nesting" makes the half-filled square lattice prone to charge or spin ordering, which is part of why the copper oxide superconductors, close to this model, are so rich.

**Answer:** the band is half full at $E_F$ = 0 exactly, where the Fermi contour is a square joining the zone's four edge midpoints.
:::
:::

::: example
## How does the cyclotron mass change from near the band bottom to near half filling, for t = 1 eV and a = 0.3 nm?

::: solution
1. **Method.** At each energy, compute $\frac{dA}{dE}$ from the grid by a central difference.
2. **Near the bottom.** At E = −3.9 eV, $m_c$ = 0.425$m_e$, the band mass.
3. **At −3.0 eV.** $m_c$ = 0.485$m_e$.
4. **At −1.0 eV.** $m_c$ = 0.742$m_e$.
5. **Near half filling.** At −0.2 eV, $m_c$ = 1.20$m_e$, almost three times the band mass.
6. **What experiments see.** Quantum oscillation experiments measure $m_c$ for each extremal orbit, so a mass that grows with filling is direct evidence that the band isn't parabolic.

**Answer:** the cyclotron mass grows from 0.425 mₑ near the bottom to 1.20 mₑ at −0.2 eV, almost three times the band mass.
:::
:::

::: check
kind: python

## Step 1. Write `tb_energies(t, n)` returning a NumPy array of the band energies $-2t(\cos k_x + \cos k_y)$ (units with a = 1) on an n × n grid of k points centered in cells spanning −π to π.

```python starter
import numpy as np

def tb_energies(t, n):
    return np.zeros(n * n)

E = tb_energies(1.0, 200)
print(E.min(), E.max())
```

```python solution
import numpy as np

def tb_energies(t, n):
    k = -np.pi + 2 * np.pi * (np.arange(n) + 0.5) / n
    kx, ky = np.meshgrid(k, k)
    return (-2 * t * (np.cos(kx) + np.cos(ky))).ravel()

E = tb_energies(1.0, 200)
print(E.min(), E.max())
```

```python tests
import numpy as np
E = tb_energies(1.0, 200)
assert E.size == 40000, "One energy per grid point."
assert abs(E.min() + 4) < 1e-3 and abs(E.max() - 4) < 1e-3, "The band spans −4t to 4t."
assert abs(E.mean()) < 1e-12, "The band's average energy is zero."
assert abs(tb_energies(0.5, 100).max() - 2) < 1e-2, "Halving t halves the band."
```

::: right
Right. Centering the k points in cells keeps the grid symmetric and avoids double-counting the zone edge.
:::
:::

::: check
kind: python

## Step 2. Write `dos(E, bins)` returning `(centers, g)`: a normalized density of states, a histogram of E with g integrating to 1 over energy.

```python starter
import numpy as np

def dos(E, bins):
    return np.zeros(bins), np.zeros(bins)

def tb_energies(t, n):
    k = -np.pi + 2 * np.pi * (np.arange(n) + 0.5) / n
    kx, ky = np.meshgrid(k, k)
    return (-2 * t * (np.cos(kx) + np.cos(ky))).ravel()

c, g = dos(tb_energies(1.0, 400), 81)
print(c[np.argmax(g)])
```

```python solution
import numpy as np

def dos(E, bins):
    g, edges = np.histogram(E, bins=bins, density=True)
    return 0.5 * (edges[:-1] + edges[1:]), g

def tb_energies(t, n):
    k = -np.pi + 2 * np.pi * (np.arange(n) + 0.5) / n
    kx, ky = np.meshgrid(k, k)
    return (-2 * t * (np.cos(kx) + np.cos(ky))).ravel()

c, g = dos(tb_energies(1.0, 400), 81)
print(c[np.argmax(g)])
```

```python tests
import numpy as np
c, g = dos(tb_energies(1.0, 400), 81)
assert abs(np.sum(g) * (c[1] - c[0]) - 1) < 1e-9, "The density of states must integrate to 1."
assert abs(c[np.argmax(g)]) < 0.06, "The largest density of states sits at E = 0, the van Hove singularity."
assert abs(g[0] / g[-1] - 1) < 0.1, "The band is symmetric about zero."
```

::: right
Right. The spike at zero grows slowly with finer bins, as a logarithmic divergence should.
:::
:::

::: check
kind: python

## Step 3. Write `fermi_level(t, nu, n)` returning the Fermi level for ν electrons per site (two spins), from the sorted grid energies.

```python starter
def fermi_level(t, nu, n):
    return 0.0

print(fermi_level(1.0, 0.5, 600))
```

```python solution
import numpy as np

def fermi_level(t, nu, n):
    k = -np.pi + 2 * np.pi * (np.arange(n) + 0.5) / n
    kx, ky = np.meshgrid(k, k)
    E = np.sort((-2 * t * (np.cos(kx) + np.cos(ky))).ravel())
    i = int(round(nu / 2 * E.size))
    i = min(max(i, 1), E.size - 1)
    return float(0.5 * (E[i - 1] + E[i]))

print(fermi_level(1.0, 0.5, 600))
```

```python tests
import math
assert abs(fermi_level(1.0, 1.0, 600)) < 1e-3, "Half filling puts the Fermi level at zero."
assert abs(fermi_level(1.0, 0.5, 600) + 1.44) < 0.01, f"A quarter filling (0.5 per site) gives about −1.44t; got {fermi_level(1.0, 0.5, 600)}"
assert abs(fermi_level(1.0, 0.1, 600) + 3.396) < 0.01, "0.1 per site gives about −3.40t."
assert abs(fermi_level(1.0, 0.1, 600) - (2 * math.pi * 0.1 - 4)) < 0.03, "Near the bottom it's close to the parabolic estimate."
```

::: right
Right. Counting states up to $E_F$ is exactly how codes find the Fermi level, with finer grids or smearing for accuracy.
:::
:::

::: check
kind: python

## Step 4. Write `band_mass(t, a)` returning the effective mass at the band bottom in units of $m_e$, for t in eV and a in nm, from a numerical second derivative of E along $k_x$ at k = 0.

```python starter
def band_mass(t, a):
    return 1.0

print(band_mass(1.0, 0.3))
```

```python solution
import math

def band_mass(t, a):
    hbar, me, q = 1.054571817e-34, 9.1093837e-31, 1.602176634e-19
    A = a * 1e-9
    E = lambda k: -2 * t * q * (math.cos(k * A) + 1)
    h = 1e-3 / A
    d2 = (E(h) - 2 * E(0) + E(-h)) / h**2
    return hbar**2 / d2 / me

print(band_mass(1.0, 0.3))
```

```python tests
assert abs(band_mass(1.0, 0.3) - 0.42333) < 1e-4, f"t = 1 eV, a = 0.3 nm gives 0.423 mₑ; got {band_mass(1.0, 0.3)}"
assert abs(band_mass(0.5, 0.3) / band_mass(1.0, 0.3) - 2) < 1e-6, "Halving t doubles the mass."
assert abs(band_mass(1.0, 0.6) / band_mass(1.0, 0.3) - 0.25) < 1e-6, "Doubling a quarters it."
```

::: right
Right. $m^* = \hbar^2/E''(k)$, which matches $\frac{\hbar^2}{2ta^2}$.
:::
:::

::: check
kind: python

## Step 5. Write `cyclotron_mass(t, a, E, n)` returning $m_c/m_e$ at energy E (eV) from $\frac{\hbar^2}{2\pi}\frac{dA}{dE}$, with the enclosed area A found by counting grid states below E and dA/dE by a central difference of ±0.02 eV.

```python starter
def cyclotron_mass(t, a, E, n):
    return 0.42

print(cyclotron_mass(1.0, 0.3, -1.0, 800))
```

```python solution
import numpy as np

def cyclotron_mass(t, a, E, n):
    hbar, me, q = 1.054571817e-34, 9.1093837e-31, 1.602176634e-19
    k = -np.pi + 2 * np.pi * (np.arange(n) + 0.5) / n
    kx, ky = np.meshgrid(k, k)
    En = np.sort((-2 * t * (np.cos(kx) + np.cos(ky))).ravel())
    zone = (2 * np.pi / (a * 1e-9)) ** 2
    area = lambda e: np.searchsorted(En, e) / En.size * zone
    d = 0.02
    dAdE = (area(E + d) - area(E - d)) / (2 * d * q)
    return float(hbar**2 / (2 * np.pi) * dAdE / me)

print(cyclotron_mass(1.0, 0.3, -1.0, 800))
```

```python tests
mb = 0.42333
assert abs(cyclotron_mass(1.0, 0.3, -3.9, 800) / mb - 1) < 0.02, "Near the bottom the cyclotron mass equals the band mass."
assert abs(cyclotron_mass(1.0, 0.3, -1.0, 800) - 0.742) < 0.01, f"At −1 eV it's about 0.742 mₑ; got {cyclotron_mass(1.0, 0.3, -1.0, 800)}"
assert cyclotron_mass(1.0, 0.3, -0.2, 800) > 2.5 * mb, "Near the saddle points it grows several times."
```

::: right
Right. The cyclotron mass is the density of states in disguise, so it carries the same van Hove divergence.
:::
:::

::: check
kind: parts
given: t = 0.5 | 1 | 2; a = 0.25 | 0.4

## A square-lattice tight-binding band has hopping t = {t} eV and spacing {a} nm.

::: part
answer: 8*t
unit: eV
tolerance: 0.5%

### How wide is the band?

::: misses
- [4*t] The band runs from −4t to +4t.
- [any] 8t in two dimensions.
:::
:::

::: part
answer: (1.054571817e-34)^2/(2*t*1.602176634e-19*(a*1e-9)^2)/9.1093837e-31
tolerance: 0.5%

### What's its effective mass at the bottom, in units of $m_e$?

::: misses
- [any] $m^* = \frac{\hbar^2}{2ta^2}$.
:::
:::
:::

::: check
given: t = 0.5 | 1; n = 0.02 | 0.05 | 0.1
answer: t*(2*pi*n - 4)
unit: eV
tolerance: 0.5%

## Near the bottom of a square-lattice band with t = {t} eV, where does the Fermi level sit for {n} electrons per site, by the parabolic estimate?

::: right
Right. $k_F^2a^2 = 2\pi\nu$ and $E \approx -4t + ta^2k^2$.
:::

::: misses
- [t*(pi*n - 4)] Two spin states per k: $k_F^2a^2 = 2\pi\nu$.
- [any] $E_F \approx t(2\pi\nu - 4)$.
:::
:::

::: check
given: t = 0.5 | 1 | 2; a = 0.3 | 0.5; f = 0.25 | 0.5
answer: 2*t*1.602176634e-19*a*1e-9/1.054571817e-34*sin(f*pi)/1000
unit: km/s
tolerance: 0.5%

## An electron in a square-lattice band (t = {t} eV, a = {a} nm) moves along $k_x$ with $k_xa$ = {f}π, $k_y$ = 0. How fast does it go?

::: right
Right. $v = \frac{1}{\hbar}\frac{\partial E}{\partial k_x} = \frac{2ta}{\hbar}\sin k_xa$.
:::

::: misses
- [t*1.602176634e-19*a*1e-9/1.054571817e-34*sin(f*pi)/1000] The derivative of $-2t\cos ka$ is $2ta\sin ka$.
- [any] $v = \frac{2ta}{\hbar}\sin k_xa$.
:::
:::

::: check
kind: parts
given: E = -3.5 | -2 | -0.5; t = 1

## A square-lattice band (t = {t} eV) has its Fermi level at {E} eV, on the line $k_y$ = 0.

::: part
answer: acos(-E/(2*t) - 1)/pi
tolerance: 0.5%

### Where does the Fermi contour cross that line, as a fraction of π/a?

::: misses
- [any] Solve $-2t(\cos k_xa + 1) = E$.
:::
:::

::: part
answer: acos(-E/(4*t))/pi
tolerance: 0.5%

### Where does it cross the diagonal $k_x = k_y$, as a fraction of π/a in each component?

::: misses
- [any] Solve $-4t\cos ka = E$.
:::
:::
:::

::: explain
## Why does the cyclotron mass of a tight-binding band grow without limit as the Fermi level approaches the band's middle?

::: model
An electron in a magnetic field moves around the Fermi contour, and the time it takes to go around is proportional to how fast the area inside the contour grows with energy, dA/dE. Near the band bottom the contour is a circle and dA/dE is constant, giving the ordinary effective mass. As the Fermi level nears the middle of a square-lattice band, the contour approaches the saddle points at the zone's edges, where the band is flat in one direction. There a small change in energy sweeps out a large area, because many states have almost the same energy. dA/dE, the density of states and the cyclotron mass all diverge there: the electron slows to a crawl as it passes near the saddle points.
:::
:::

::: practice

::: check
given: t = 0.3 | 1.5; a = 0.3 | 0.6
answer: (1.054571817e-34)^2/(2*t*1.602176634e-19*(a*1e-9)^2)/9.1093837e-31
tolerance: 0.5%

## Band-bottom mass for t = {t} eV, a = {a} nm, in $m_e$?

::: misses
- [any] $\frac{\hbar^2}{2ta^2}$.
:::
:::

::: check
given: t = 0.8 | 1.2; n = 0.04 | 0.08
answer: t*(2*pi*n - 4)
unit: eV
tolerance: 0.5%

## Parabolic Fermi level for t = {t} eV, {n} electrons per site?

::: misses
- [any] $t(2\pi\nu - 4)$.
:::
:::
:::
