Does light charge the quons? › Files cited on the page › the trials
t27_prep.py
#!/usr/bin/env python3
"""Numbers for the lock of trial 27 (trial 26's three faulty designs, corrected), computed before the lock."""
import math
import subprocess
import sys
import numpy as np
sys.path.insert(0, ".")
from engine import static_field_of # noqa: E402
print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip())
N = 96
k = 2 * np.pi * np.arange(N) / N
sx = 4 * np.sin(k / 2) ** 2
K2 = sx[:, None, None] + sx[None, :, None] + sx[None, None, :]
K2[0, 0, 0] = np.inf
G_N = float((1 / K2).sum() / N**3)
P = np.zeros((3, N, N, N)); P[0, 0, 0, 0] = 1.0
E = static_field_of(P)
own, cross = E[0, 0, 0, 0], E[1, 0, 0, 0]
def imS(w, ndir=200000):
i = np.arange(ndir) + 0.5
th = np.arccos(1 - 2 * i / ndir); ph = np.pi * (1 + 5**0.5) * i
n = np.stack([np.sin(th) * np.cos(ph), np.sin(th) * np.sin(ph), np.cos(th)], 1)
rho = np.full(ndir, w)
for _ in range(60):
kk = rho[:, None] * n
rho -= ((4 * np.sin(kk / 2) ** 2).sum(1) - w * w) / (2 * np.sin(kk) * n).sum(1)
kk = rho[:, None] * n
Kv = 2 * np.sin(kk / 2)
f = 1 - Kv[:, 0] ** 2 / (Kv**2).sum(1)
return math.pi * (4 * np.pi / ndir) * np.sum(rho**2 * f / (2 * np.sin(kk) * n).sum(1)) / (2 * math.pi) ** 3
D, wp2 = 4, 0.2
wA = 1.65 / D
meff = 1 + wp2 * (2 / 3) * G_N
gm = []
for sgn in (+1, -1):
Oms = math.sqrt((wA**2 + wp2 * (-own - sgn * cross)) / meff)
gm.append(wp2 * Oms * imS(Oms) / meff)
print(f"96^3 box: G {G_N:.6f}, own {own:.6f}, cross {cross:.6f}; motion {'x + y' if sgn > 0 else 'x - y'}: frequency {Oms:.5f}, loss rate {gm[-1]:.5e}")
fac = (math.exp(-gm[0] * 72.5) + math.exp(-gm[1] * 72.5)) / (math.exp(-gm[0] * 17.5) + math.exp(-gm[1] * 17.5))
print(f"H1b': means over t = 10 to 25 and 65 to 80 (at their middles): a factor {fac:.4f}; the loss 1 - factor = {1-fac:.4f}")
A_, h_ = 1 / 36, 1 / 6
th_s = 0.06 * ((1 - 1 / 1000) / 3 + 1 / 1000)
t1 = math.pi * A_ / (2 * h_ * th_s)
for a, b in ((0, 0.5), (0.5, 1), (1, 2), (2, 3), (3, 4)):
mean = (2 / math.pi) * (math.sin(math.pi * b / 2) - math.sin(math.pi * a / 2)) / (b - a)
print(f"G2': one gyrostat under a held twist, couple/twist averaged over t = {a} t1 to {b} t1: {mean:+.3f}")