Does light charge the quons? › Files cited on the page › check_m8_fable/

a7_matter_on_lattice.py

In the investigation at sim/light_ether_review/check_m8_fable/a7_matter_on_lattice.py · last changed in commit 18dc38d, 23 November 2026 · 6,153 bytes · the folder as a zip


#!/usr/bin/env python3
"""A7 (blind): matter on the lattice. Units d = kappa = s0 = 1 (so e = g, eps0 = g^2, kappa s0^2 = e^2/(eps0 d)).
A held charge ("Lorentz oscillator", charge e, mass m, bare tune w0) sits at a vertex and is displaced by x along an x-edge: the
band on that edge gets the polarisation slip s_p = s0 x/d. Static balance of the wheels: s = s_uniform + P_grad(slip + s_p), where
P_grad projects an edge field on vertex-gradients (A2). The charge feels E = g s_edge/(d eps0) on its own edge, so in these units
the self-consistent condition on an occupied edge is  s_p = a_bare s_edge, with a_bare = alpha_bare/(eps0 d^3), alpha_bare = e^2/(m w0^2).
The macroscopic D is the uniform part of s (fixed by the boundary), P the mean of s_p, E = D - P (units eps0 = 1), eps = D/E."""
import subprocess
import numpy as np
print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip())
N = 32
k = 2 * np.pi * np.fft.fftfreq(N)
KX, KY, KZ = np.meshgrid(k, k, k, indexing="ij")
lam = -4 * (np.sin(KX / 2)**2 + np.sin(KY / 2)**2 + np.sin(KZ / 2)**2)
def grad(V): return np.stack([np.roll(V, -1, axis=a) - V for a in range(3)])
def div(s): return sum(s[a] - np.roll(s[a], 1, axis=a) for a in range(3))
def P_grad(s):
    Q = np.fft.fftn(div(s)); Q[0, 0, 0] = 0
    with np.errstate(divide="ignore", invalid="ignore"):
        V = np.real(np.fft.ifftn(np.where(lam != 0, Q / lam, 0)))
    return grad(V)

# (i) one dipole: own relaxed stretch on its band
s_p = np.zeros((3, N, N, N)); s_p[0, 5, 5, 5] = 1.0
s_rel = P_grad(s_p)
print(f"\n(i) isolated dipole (unit polarisation slip on one x-edge): relaxed stretch on its own edge = {s_rel[0,5,5,5]:.5f} (1/3 expected from G(0)-G(1) = 1/6 twice);")
print(f"    on the next x-edge along the dipole axis {s_rel[0,6,5,5]:+.5f}, on the parallel x-edge one cell sideways {s_rel[0,5,6,5]:+.5f}.")
print("    the charge feels its own polarisation as a restoring field -(1/3) p/(eps0 d^3): an extra spring e^2/(3 eps0 d^3) on the bare tune.")

# (ii) dielectric. Sign: displacing +e by +x along its edge REDUCES the band's stretch by s0 x/d (A2's hop convention), and the
#  force on it is F = kappa s0 s_edge/d = e D_edge/eps0 with D = +g s/d. With m w0^2 x = F the response is s_p = -a s_edge, a = alpha_bare/(eps0 d^3).
#  The wheels remove only the curl part of s_p; the stretch is s = s_w + mean(s_p) + P_grad(s_p), s_w the winding (imposed D_macro).
#  E_macro = (g/d eps0) mean(s); P = -(g/d) mean(s_p); D_macro = (g/d) s_w; eps = s_w/(s_w + mean(s_p)).
def solve_eps(mask, a, sw=1.0, iters=2000):
    s_p = np.zeros((3, N, N, N)); s_p[0] = -a * sw * mask / (1 + a)
    for it in range(iters):
        s_edge = sw + s_p[0].mean() + P_grad(s_p)[0]
        s_new = np.zeros_like(s_p); s_new[0] = -a * mask * s_edge
        if np.abs(s_new - s_p).max() < 1e-13: s_p = s_new; break
        s_p = 0.5 * s_p + 0.5 * s_new
    return sw / (sw + s_p[0].mean()), it
def cm(Nalpha): return (1 + 2 * Nalpha / 3) / (1 - Nalpha / 3)
rng = np.random.default_rng(3)
print("\n(ii) permittivity. a = alpha_bare/(eps0 d^3) per occupied x-edge; a_iso = a/(1 + a/3) is the isolated edge dipole's value (own 1/3 spring);")
print("     N alpha_iso/eps0 = f a_iso. Mean-field prediction (text): eps = CM(f a_iso) exactly. Residual = lattice - CM(f a_iso).")
print("     f      a     eps_lattice    CM(f a_iso)    residual     1+f a (no local field)   iterations")
for f in (1.0, 0.5, 0.2, 0.05):
    mask = (rng.uniform(size=(N, N, N)) < f).astype(float) if f < 1 else np.ones((N, N, N))
    f_act = mask.mean(); rows = []
    for a in (0.05, 0.1, 0.2, 0.5, 1.0):
        eps, it = solve_eps(mask, a)
        a_iso = a / (1 + a / 3)
        rows.append((a, eps - cm(f_act * a_iso)))
        print(f"   {f_act:.3f}  {a:.2f}   {eps:.7f}    {cm(f_act*a_iso):.7f}   {eps-cm(f_act*a_iso):+.2e}    {1+f_act*a:.5f}    {it}")
    (a1, r1), (a2, r2) = rows[0], rows[1]
    print(f"   -> f = {f_act:.3f}: residual/(f a_iso)^2 at a = 0.05, 0.1: {r1/(f_act*a1/(1+a1/3))**2:+.4f}, {r2/(f_act*a2/(1+a2/3))**2:+.4f}  (the lowest-order departure from CM)")

# (iii) radiation of a dipole on the lattice vs Larmor: rate ~ sum_k |e_k . x|^2 delta(w - w_k) with the lattice coupling.
#  Coupling of a point x-dipole (slip on one x-edge) to mode k: the x-component of the transverse projector at K(k), and the mode's
#  stretch at the edge. Golden rule: Gamma(w) ∝ (1/w) ∫ d^3k/(2pi)^3 (1 - K_x^2/K^2) delta(w - c K(k)) [band-model vertex, units c=d=1].
#  Continuum: (1/w) ∫ 4pi k^2 dk/(2pi)^3 (2/3) delta(w - k) = w/(3 pi^2). Ratio to continuum computed by histogram.
M = 160
q = (np.arange(M) + 0.5) / M * 2 * np.pi - np.pi
QX, QY, QZ = np.meshgrid(q, q, q, indexing="ij")
Kx, Ky, Kz = 2 * np.sin(QX / 2), 2 * np.sin(QY / 2), 2 * np.sin(QZ / 2)
K2 = Kx**2 + Ky**2 + Kz**2; W = np.sqrt(K2)
weight = (1 - Kx**2 / np.where(K2 > 0, K2, 1)) * (2 * np.pi / M)**3 / (2 * np.pi)**3
edges = np.linspace(0, 3.5, 71)
hist, _ = np.histogram(W.ravel(), bins=edges, weights=weight.ravel())
wc = 0.5 * (edges[1:] + edges[:-1]); dw = edges[1] - edges[0]
ratio = (hist / dw) / (wc**2 / (3 * np.pi**2))
print("\n(iii) radiation rate of a lattice dipole / Larmor rate at the same frequency (band model, point dipole on one edge):")
print("    w d/c :", " ".join(f"{w:.2f}" for w in wc[[1, 5, 10, 20, 30, 40, 50, 60, 69]]))
print("    ratio :", " ".join(f"{r:.2f}" for r in ratio[[1, 5, 10, 20, 30, 40, 50, 60, 69]]))
print("    at long waves the ratio is 1 (Larmor recovered); it rises with the lattice density of states and ends at the band top 3.46 c/d.")

# (iv) scattering: a perfect empty lattice scatters nothing (Bloch waves). Random filling f of sites with polarisability alpha:
#  Rayleigh: 1/ell = (f(1-f)/d^3) (k^4/(6 pi)) |alpha/eps0|^2  (uncorrelated lattice gas; from standard theory, from memory)
print("\n(iv) scattering: the empty lattice is periodic and scatters no light (no disorder); filled at random the Rayleigh attenuation is")
print("    1/ell = f(1-f) d^-3 (k^4/6pi) |alpha/eps0|^2, i.e. the ordinary result with the lattice-gas variance f(1-f) [from memory, not derived here].")