Does light charge the quons? › Files cited on the page › check_m8_fable/
a5_free_spin.py
#!/usr/bin/env python3
"""A5 (blind): the free spin. (i) dynamics: a slip that hops along a line (a moving charge) on a 4^3 lattice, with and without
the checkerboard spin superposed; the spin must stay exactly constant and the transverse motion identical. (ii) numbers."""
import subprocess, importlib.util, sys
import numpy as np
print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip())
spec = importlib.util.spec_from_file_location("a1", __file__.replace("a5_free_spin.py", "a1_wave_law.py"))
# re-use build_S by exec of the function source only
src = open(__file__.replace("a5_free_spin.py", "a1_wave_law.py")).read()
ns = {}
exec(src.split("N = 4")[0].replace('print("git HEAD:"', 'pass #').replace('print("numpy"', 'pass #'), ns)
build_S = ns["build_S"]
N = 4; S = build_S(N); nF = 3 * N**3
idx = lambda a, i, j, k: ((a * N + i % N) * N + j % N) * N + k % N
# null-space projector
u, sv, vt = np.linalg.svd(S); null = vt[sv < 1e-9].T if False else np.linalg.svd(S)[2][np.sum(np.linalg.svd(S)[1] > 1e-9):].T
P_null = null @ null.T
# checkerboard spin pattern (face rates +-1)
psi = np.fromfunction(lambda i, j, k: 0.5 * (-1.0)**(i + j + k), (N, N, N))
phi_cb = np.zeros(nF)
for a in range(3):
for i in range(N):
for j in range(N):
for k in range(N):
r = [i, j, k]; rm = r.copy(); rm[a] -= 1
phi_cb[idx(a, *r)] = psi[tuple(np.mod(r, N))] - psi[tuple(np.mod(rm, N))]
assert np.abs(S @ phi_cb).max() < 1e-12
def run(spin, T=12.0, dt=0.02):
"""I = kappa = 1; slip hops along +x one edge every 1.0 time unit (a charge moving at speed d per unit time = c)."""
phi = np.zeros(nF); vel = spin * phi_cb.copy()
slip = np.zeros(nF)
t = 0.0; rec = []
nsteps = int(T / dt)
for n in range(nsteps):
hop = int(t) # edge index along x advanced each unit of time
slip[:] = 0
for i in range(hop % N + 1):
slip[idx(0, i, 1, 1)] = 1.0 # string from (0,1,1) grows along x (periodic wrap keeps a pair)
s = S @ phi + slip
acc = -(S.T @ s)
vel += 0.5 * dt * acc; phi += dt * vel
s = S @ phi + slip; acc = -(S.T @ s); vel += 0.5 * dt * acc
t += dt
rec.append((P_null @ vel).copy())
return phi, vel, np.array(rec)
phi0, vel0, rec0 = run(0.0)
phi1, vel1, rec1 = run(1.0)
print(f"\n(i) moving slip, 600 steps: zero-mode part of phi' without spin stays {np.abs(rec0).max():.1e} (zero); with spin it stays the")
print(f" checkerboard exactly: max |P_null phi' - phi_cb| over the run = {np.abs(rec1 - phi_cb).max():.1e}")
print(f" transverse motion identical with and without the spin: max |(phi1 - t*phi_cb) - phi0| = {np.abs((phi1 - 12.0 * phi_cb) - phi0).max():.1e}, max |vel1 - phi_cb - vel0| = {np.abs(vel1 - phi_cb - vel0).max():.1e}")
print(" => nothing the slip does changes the spin, and the spin changes nothing the slip or the waves do (exact, by linearity and S phi_cb = 0).")
# (ii) numbers
e = 1.602176634e-19; mu0 = 1.25663706e-6; eps0 = 8.8541878128e-12; c = 299792458.0; hbar = 1.054571817e-34
alpha = 1 / 137.035999; me = 9.1093837e-31
print("\n(ii) numbers, with g = e/(s0 d), I = mu0 g^2 d^3 = mu0 e^2 d/s0^2:")
for d in (1e-18, 1e-26, 1e-35):
for s0 in (2 * np.pi,):
g = e / (s0 * d); I = mu0 * g**2 * d**3
Om = c / d # rim speed c/2 for a wheel of diameter d
B0 = mu0 * g * Om # staggered field amplitude
kick = e * B0 * d / (me * c) # momentum kick per cell crossed, in units of m_e c
U_cell = 1.5 * I * Om**2 # energy per cell (3 wheels)
Om1 = hbar / (6 * I) # quantum of the staggered spin rate (cell magnetic charge = 1 hbar unit)
n_c2 = 6 * I * Om / hbar # quantum number of a spin at rim speed c/2
print(f" d = {d:.0e} m, s0 = 2 pi: B0 = {B0:.2e} T; kick per cell on a point electron = {kick:.1e} m_e c; energy per cell = {U_cell/e/1e9:.3g} GeV"
f" ({U_cell/d**3:.2e} J/m^3); quantum of rate Om_1 = {Om1 / (c / d):.1f} c/d (rim {Om1 * d / 2 / c:.1f} c); c/2 rim spin has n = {n_c2:.3f}")
print(f" general: Om_1 = s0^2 c/(24 pi alpha d) = {1 / (24 * np.pi * alpha):.2f} s0^2 c/d; cell magnetic charge unit = (s0/2pi) h/e (Dirac's unit at one notch per turn);")
print(f" a spin at rim c/2 has n = 6 x 4 pi alpha/s0^2 = {6 * 4 * np.pi * alpha:.3f}/s0^2: n = 1 needs s0 = {np.sqrt(6 * 4 * np.pi * alpha):.3f} rad = {2 * np.pi / np.sqrt(6 * 4 * np.pi * alpha):.1f} notches per turn.")
print(f" energy per cell at rim c/2 = (6 pi/s0^2) e^2/(4 pi eps0 d) = {6 * np.pi / (2 * np.pi)**2:.3f} x 1.44 MeV fm / d (s0 = 2 pi)")