Eve library

phase-101.md

Tracker

Revision 1

On this page

Historical task source. The Eve task board holds current task state.

Phase 101: Kalika Theoretical Physics I — Quantum Mechanics, Quantum Field Theory, General Relativity & Statistical Mechanics#

Builds on the CAS engine (Phase 99) and pure mathematics libraries (Phase 100) to implement the core theoretical physics computation libraries. Each library provides symbolic, numerical, and visualization capabilities. Targets parity with or exceeding: xAct (tensor GR), Cadabra (field theory), FeynCalc/FORM (QFT algebraic), Package-X (one-loop), FeynArts (diagram generation), FeynRules/SARAH (model building), and the full spectrum of specialized tools.


101.1 Quantum Mechanics (@kalika/quantum-mechanics)#

101.1.1 Hilbert Space Framework#

  • 101.1.1.1 Implement abstract Hilbert space construction: finite-dimensional (C^n), countably-infinite (l^2), and continuous (L^2) spaces with named basis vectors (|0>, |1>, ..., |n>, |x>, |p>, |l,m>, |j,m>, |n,l,m,s>), Dirac bra-ket notation algebra, inner product computation, orthogonal projection, tensor product of Hilbert spaces (for composite systems), direct sum
  • 101.1.1.2 Implement quantum state representations: state vectors (kets) in position/momentum/energy bases with automatic basis transformation via completeness relation, density matrices (pure and mixed states), Bloch sphere representation for qubits, Wigner function (phase space quasi-probability), Husimi Q function, Glauber-Sudarshan P representation
  • 101.1.1.3 Implement quantum operator algebra: creation/annihilation operators (bosonic: [a, a†] = 1, fermionic: {a, a†} = 1), position/momentum operators ([x, p] = ih), angular momentum operators (Jx, J_y, J_z satisfying [J_i, J_j] = iε{ijk}Jk), spin operators (Pauli matrices sigma_x, sigma_y, sigma_z, general spin-s matrices), ladder operators (J+, J_-), number operator (a†a), parity, time-reversal
  • 101.1.1.4 Implement commutator/anticommutator algebra: [A, B], {A, B}, nested commutators, Baker-Campbell-Hausdorff formula (to arbitrary order), Zassenhaus formula, Magnus expansion — with automatic simplification using canonical commutation/anticommutation relations

101.1.2 Quantum Dynamics#

  • 101.1.2.1 Implement Schrodinger equation solver (time-independent): exact symbolic solutions for standard potentials (infinite/finite square well, harmonic oscillator, hydrogen atom, Morse potential, Poschl-Teller, delta function, step potential, Kronig-Penney), WKB approximation for arbitrary smooth potentials, variational method (Ritz), numerical shooting method for bound states
  • 101.1.2.2 Implement Schrodinger equation solver (time-dependent): split-operator FFT method, Crank-Nicolson, Chebyshev propagation, Magnus integrator (for time-dependent Hamiltonians), Dyson series / time-ordered exponential — all with convergence guarantees and error bounds
  • 101.1.2.3 Implement perturbation theory: Rayleigh-Schrodinger perturbation theory (non-degenerate and degenerate, to arbitrary order with automated recursion), Brillouin-Wigner, time-dependent perturbation theory (Dyson series, transition amplitudes, Fermi's golden rule, selection rules from matrix element symmetry analysis)
  • 101.1.2.4 Implement path integral formulation: discretized path integral for 1D quantum mechanics (lattice computation), stationary phase approximation / semiclassical expansion, instanton solutions for tunneling rates, coherent state path integral for harmonic oscillator / spin systems — with both symbolic and numerical evaluation modes

101.1.3 Angular Momentum & Spin#

  • 101.1.3.1 Implement angular momentum coupling: Clebsch-Gordan coefficients (exact rational computation via Racah formula), Wigner 3j/6j/9j symbols (exact computation via Regge symmetries), Racah W coefficients, isoscalar factors — with caching of computed values and verification against symmetry relations. Performance target: compute 6j symbols for j up to 100 in milliseconds
  • 101.1.3.2 Implement spherical harmonics: Yl^m(theta, phi) symbolic and numerical, spin-weighted spherical harmonics _sY_l^m (for gravitational wave extraction), vector spherical harmonics (for electromagnetic multipole expansion), tensor spherical harmonics (for gravitational perturbation theory), solid harmonics, Wigner D-matrices D^j{mm'}(alpha, beta, gamma)
  • 101.1.3.3 Implement spin algebra for arbitrary spin: spin-s matrices (2s+1 dimensional), tensor product decomposition of spin states, singlet/triplet states, Clebsch-Gordan decomposition of tensor products, Fierz identities

101.1.4 Scattering Theory#

  • 101.1.4.1 Implement scattering formalism: partial wave analysis (expansion in Legendre polynomials, phase shift computation), Born approximation (first and second order), optical theorem, S-matrix unitarity, T-matrix, cross-section computation (differential and total), resonance analysis (Breit-Wigner), Lippmann-Schwinger equation
  • 101.1.4.2 Implement special scattering problems: Coulomb scattering (exact Rutherford formula, Coulomb phase shifts), hard sphere, square well/barrier (transmission/reflection coefficients, resonances), Yukawa potential (Born series), and Mott scattering (identical particle exchange)

101.2 Quantum Field Theory (@kalika/quantum-field-theory)#

101.2.1 Lagrangian & Field Infrastructure#

  • 101.2.1.1 Implement quantum field type system: scalar fields (real/complex, spin 0), Dirac spinor fields (spin 1/2, 4-component), Weyl spinor fields (2-component, left/right chirality), Majorana fields, vector fields (spin 1, massive/massless), Rarita-Schwinger fields (spin 3/2), rank-2 symmetric tensor fields (spin 2, for linearized gravity) — each with propagator, quantization rules, and Feynman rules
  • 101.2.1.2 Implement Lagrangian builder matching/exceeding FeynRules: kinetic terms (scalar, Dirac, gauge), mass terms, Yukawa interactions, gauge interactions via covariant derivative, scalar potential (Mexican hat, general polynomial), Fadeev-Popov ghost terms, gauge-fixing terms (Lorenz, Coulomb, axial, light-cone), higher-dimensional operators (dim-5 Weinberg operator, dim-6 SMEFT operators) — with automatic Feynman rule derivation from any Lagrangian
  • 101.2.1.3 Implement gauge theory infrastructure: gauge group specification (SU(N), SO(N), Sp(2N), U(1), products), representation assignment for fields, covariant derivative construction, field strength tensor, structure constants (automatic from generators), gauge transformation laws, BRST symmetry and ghost fields — matching FeynRules' model description language
  • 101.2.1.4 Implement Standard Model Lagrangian: complete SM with all terms (gauge kinetic, fermion kinetic + gauge interaction, Higgs potential + kinetic + gauge, Yukawa, gauge fixing, ghost), CKM matrix, PMNS matrix, theta terms — as a built-in model, verified against published Feynman rules
  • 101.2.1.5 Implement BSM model library: MSSM (minimal supersymmetric SM), NMSSM, 2HDM (type I, II, lepton-specific, flipped), Left-Right symmetric model, Pati-Salam, SO(10) GUT, seesaw models (type I, II, III), scotogenic model, composite Higgs (MCHM), extra dimensions (ADD, Randall-Sundrum) — each with complete Lagrangian and Feynman rules, matching SARAH's model database
  • 101.2.1.6 Implement Noether's theorem engine: given a Lagrangian and a continuous symmetry transformation, automatically compute the conserved current j^mu and verify its conservation (d_mu j^mu = 0), compute the conserved charge Q = integral j^0 d^3x, and identify the symmetry algebra — for both internal and spacetime symmetries

101.2.2 Feynman Diagram Engine (matching/exceeding FeynArts + FeynCalc + FORM)#

  • 101.2.2.1 Implement Feynman diagram topology generator: given incoming and outgoing particles and loop order, enumerate ALL topologically distinct diagrams using the algorithm of FeynArts (isomorphism filtering via canonical labeling, one-particle-irreducible filtering, vacuum bubble removal, tadpole handling) — for arbitrary models, not just SM
  • 101.2.2.2 Implement Feynman rule application: given a diagram topology and a model, insert propagators (scalar, fermion, gauge boson with gauge-dependent terms, ghost) and vertices (from Lagrangian), assign momenta (momentum conservation at each vertex, loop momenta as free variables), assign indices (Lorentz, spinor, color, flavor), and write the amplitude as a symbolic expression
  • 101.2.2.3 Implement Dirac algebra engine: gamma matrix algebra in d dimensions (trace of products of gamma matrices via recursive Chisholm identity, matching FeynCalc/FORM), gamma_5 handling in dimensional regularization (naive, BMHV/'t Hooft-Veltman, Kreimer schemes), charge conjugation matrix C, Fierz identities (automatic Fierz rearrangement), Gordon decomposition
  • 101.2.2.4 Implement color algebra engine: SU(N) color factor computation (fundamental generators T^a, structure constants f^{abc}, d^{abc} symbols), trace identities (Tr[T^a T^b] = delta^{ab}/2), Fierz identity for color (T^a*{ij} T^a*{kl} = delta*{il}delta*{kj}/2 - delta*{ij}delta*{kl}/(2N)), Casimir invariants (C_F, C_A, T_F), color decomposition of amplitudes into color-ordered partial amplitudes
  • 101.2.2.5 Implement FORM-style large expression handling: term-by-term processing with disk streaming for expressions exceeding RAM, pattern matching on individual terms, parallel term processing (matching TFORM's thread parallelism) — the key innovation that allows FORM to handle multi-loop calculations with billions of terms that no other CAS can manage

101.2.3 Loop Integrals (matching FIRE/Kira + pySecDec + AMFlow)#

  • 101.2.3.1 Implement Passarino-Veltman tensor reduction: reduce tensor loop integrals (integrals with loop momenta in numerator) to scalar integrals by systematic decomposition — the standard one-loop technique, matching FeynCalc and Package-X
  • 101.2.3.2 Implement one-loop scalar integrals: analytic expressions for all Passarino-Veltman basis functions (A_0, B_0, C_0, D_0 and higher-point) with arbitrary masses and external momenta, in d = 4 - 2epsilon with full epsilon expansion, UV and IR divergences as 1/epsilon poles — matching Package-X's fully analytic approach (closed-form in terms of dilogarithms)
  • 101.2.3.3 Implement Integration-by-Parts (IBP) reduction: Laporta's algorithm for reducing arbitrary multi-loop integrals to master integrals via IBP identities and Lorentz invariance identities, with optimizations: modular arithmetic (compute reduction modulo large primes, reconstruct rational coefficients via CRT — matching FIRE6), finite field arithmetic (matching Kira), syzygy-based reduction, and sector symmetry detection — target: handle two-loop five-point with multiple mass scales
  • 101.2.3.4 Implement sector decomposition: primary decomposition, iterated sector decomposition (geometric strategy via Normaliz polytope computation, heuristic strategies), singularity subtraction, epsilon expansion of poles, numerical integration of finite remainders (Cuba library integration or built-in QMC), contour deformation for physical-region kinematics — matching pySecDec/FIESTA5 capabilities
  • 101.2.3.5 Implement differential equations method for master integrals: derive systems of differential equations in kinematic invariants from IBP relations, find transformation to canonical (epsilon-factorized) form via Lee's algorithm (Libra), solve via generalized power series expansion at regular singular points (matching DiffExp), and transport solutions between kinematic regions via analytic continuation
  • 101.2.3.6 Implement AMFlow (Auxiliary Mass Flow) method: introduce auxiliary mass parameter, compute high-precision numerical boundary conditions via sector decomposition, transport solution along auxiliary mass flow via differential equations — achieving 50+ digit precision for master integrals

101.2.4 Renormalization#

  • 101.2.4.1 Implement regularization schemes: dimensional regularization (d = 4 - 2epsilon), Pauli-Villars, hard cutoff, zeta-function regularization, lattice regularization (for lattice field theory connection), point-splitting — with automatic conversion between schemes where possible
  • 101.2.4.2 Implement renormalization schemes: MS-bar (modified minimal subtraction), on-shell, momentum subtraction (MOM), RI-MOM (used in lattice-to-continuum matching) — with automatic computation of counterterms and renormalization constants (Z factors) from divergent amplitudes
  • 101.2.4.3 Implement renormalization group: beta function computation to N-loop order (using IBP-reduced vacuum diagrams and R-operation), anomalous dimension computation, RG equation integration (running of couplings from scale mu_1 to mu_2), fixed point analysis (zeros of beta function), critical exponents from anomalous dimensions at fixed points
  • 101.2.4.4 Implement automated RGE computation matching SARAH: given any gauge theory Lagrangian, automatically compute one-loop and two-loop beta functions for all gauge couplings, Yukawa couplings, and scalar quartic couplings using the generic formulas of Martin-Vaughn (with Machacek-Vaughn for gauge, and Luo-Wang-Xiao for general two-loop)
  • 101.2.4.5 Implement Wilson's renormalization group: block-spin transformation, Kadanoff scaling, Wilsonian effective action computation (integrating out shells of momentum), exact/functional RG (Wetterink-Morris equation), and identification of relevant/irrelevant/marginal operators

101.2.5 Cross-Sections & Observables#

  • 101.2.5.1 Implement cross-section computation: phase space integration (RAMBO for massless, RAMBO-on-diet for massive particles, multi-channel integration with VEGAS adaptive sampling), spin averaging/summing, flux factor, and conversion to physical units (pb, fb) — for 2->N processes at tree level and NLO
  • 101.2.5.2 Implement decay rate computation: partial widths for all decay channels, total width, branching ratios, lifetime — with NLO QCD and QED corrections for standard decay modes
  • 101.2.5.3 Implement NLO automation pipeline: real emission (dipole subtraction via Catani-Seymour formalism or FKS subtraction), virtual corrections (from one-loop amplitudes), integrated subtraction terms, and combination — matching MadGraph5_aMC@NLO's automated NLO workflow for arbitrary processes

101.3 General Relativity (@kalika/general-relativity)#

101.3.1 Tensor Calculus for GR (matching/exceeding xAct)#

  • 101.3.1.1 Implement abstract tensor algebra with the Butler-Portugal canonicalization algorithm (matching xPerm): canonicalize tensor expressions with arbitrary index symmetries (symmetric, antisymmetric, cyclic, and multi-term symmetries like Bianchi identity) using computational group theory (double coset representatives of the symmetry group acting on indices) — effectively polynomial time for most cases, handling expressions with 100+ indices
  • 101.3.1.2 Implement metric tensor operations: index raising/lowering with automatic metric insertion, metric compatibility (nablamu g{ab} = 0), Kronecker delta, generalized Kronecker delta, Levi-Civita tensor/symbol (with sqrt(|g|) density weight), volume form
  • 101.3.1.3 Implement covariant derivative: Christoffel symbols (Gamma^lambda_{mu nu} from metric), covariant derivative of arbitrary tensor fields, geodesic equation derivation, parallel transport equation, autoparallel equation
  • 101.3.1.4 Implement curvature tensors: Riemann tensor R^rho*{sigma mu nu} (from Christoffel symbols), Ricci tensor R*{mu nu} (contraction), Ricci scalar R, Einstein tensor G*{mu nu} = R*{mu nu} - (1/2)g*{mu nu}R, Weyl tensor C*{rho sigma mu nu} (tracefree part of Riemann), Cotton tensor, Schouten tensor, Kretschner scalar R_{abcd}R^{abcd}, Chern-Pontryagin density R*R, Gauss-Bonnet density — all with automatic simplification using Bianchi identities
  • 101.3.1.5 Implement multi-term symmetry handling matching Cadabra: Bianchi identity (R*{a[bcd]} = 0), differential Bianchi identity (nabla*{[e}R_{ab]cd} = 0), Schouten identity (for dimensionally-dependent antisymmetrization), and custom multi-term symmetries — these are NOT simple index symmetries and require Cadabra's specialized simplification algorithms
  • 101.3.1.6 Implement component calculation engine (matching xCoba): given a metric in specific coordinates, compute all geometric quantities numerically/symbolically, evaluate abstract tensor expressions in components, transform between coordinate systems

101.3.2 Exact Solutions & Spacetime Analysis#

  • 101.3.2.1 Implement exact solution library: Schwarzschild (static spherically symmetric vacuum), Kerr (rotating vacuum), Kerr-Newman (rotating charged), Reissner-Nordstrom (static charged), FLRW (cosmological), de Sitter / anti-de Sitter (constant curvature), Godel (rotating universe), pp-wave (plane-fronted waves with parallel rays), Vaidya (radiating), Lemaitre-Tolman-Bondi (spherical dust), Kasner (anisotropic cosmology), Taub-NUT, C-metric, Melvin, and 30+ more from Stephani-Kramer-MacCallum-Hoenselaers-Herlt exact solutions catalog — each with pre-computed Christoffel symbols, Riemann tensor, Killing vectors, and geodesic equations
  • 101.3.2.2 Implement Killing vector computation: solve Killing's equation nabla*{(a}xi*{b)} = 0 for a given metric, determine the isometry group (Lie algebra of Killing vectors via commutators), identify spacetime symmetry class (static, stationary, axisymmetric, homogeneous, isotropic)
  • 101.3.2.3 Implement Penrose-Carter diagram construction: conformal compactification of spacetimes, identification of null/timelike/spacelike infinity (I+, I-, i0, i+, i-), causal structure visualization, conformal factor computation — for Schwarzschild, Kerr, FLRW, de Sitter, Reissner-Nordstrom, and arbitrary static spherically symmetric spacetimes
  • 101.3.2.4 Implement singularity analysis: Kretschner scalar divergence detection (curvature singularity), geodesic incompleteness test (b-boundary), trapped surface detection (expansion of null congruences), apparent horizon finding, Penrose singularity theorem conditions (closed trapped surface + energy condition), cosmic censorship assessment
  • 101.3.2.5 Implement geodesic solver: symbolic geodesic equations from metric, numerical geodesic integration (Runge-Kutta-Fehlberg with adaptive step, Verlet/leapfrog for Hamiltonian formulation), effective potential analysis, circular orbit conditions, ISCO (innermost stable circular orbit), photon sphere, Lyapunov exponents for geodesic stability, geodesic deviation equation

101.3.3 Perturbation Theory (matching xPert)#

  • 101.3.3.1 Implement metric perturbation theory: expand g*{ab} = g0*{ab} + epsilon _ h_{ab} + epsilon^2 _ h2_{ab} + ... to arbitrary order, automatically compute perturbations of Christoffel symbols, Riemann tensor, Ricci tensor, Einstein tensor at each order — matching xPert's capabilities
  • 101.3.3.2 Implement gauge transformations: infinitesimal diffeomorphism gauge (h*{ab} -> h*{ab} + nabla_a xi_b + nabla_b xi_a), gauge-invariant combinations (Bardeen variables for cosmological perturbation theory), Regge-Wheeler and Zerilli gauge for Schwarzschild perturbations, radiation gauge, transverse-traceless gauge for gravitational waves
  • 101.3.3.3 Implement cosmological perturbation theory: scalar/vector/tensor decomposition (SVT), gauge-invariant Bardeen potentials (Phi, Psi), Mukhanov-Sasaki variable, power spectrum computation, transfer functions, Boltzmann hierarchy for CMB anisotropies — matching CLASS/CAMB's perturbation theory engine (symbolic derivation, not just numerical)
  • 101.3.3.4 Implement black hole perturbation theory: Regge-Wheeler equation (odd-parity perturbations of Schwarzschild), Zerilli equation (even-parity), Teukolsky equation (perturbations of Kerr), quasinormal mode computation (QNMs via continued fraction / Leaver method), gravitational wave emission from perturbed black holes

101.3.4 ADM Formalism & Numerical Relativity Interface#

  • 101.3.4.1 Implement ADM 3+1 decomposition: lapse function N, shift vector N^i, spatial metric gamma*{ij}, extrinsic curvature K*{ij}, Gauss-Codazzi equations, Hamiltonian and momentum constraints, ADM evolution equations — symbolic derivation from arbitrary 4-metric
  • 101.3.4.2 Implement BSSN formulation: conformal decomposition (conformal factor phi, conformal metric tilde{gamma}{ij}, traceless extrinsic curvature tilde{A}{ij}, conformal connection functions tilde{Gamma}^i), BSSN evolution equations, gauge conditions (1+log slicing, Gamma-driver shift) — both symbolic derivation and numerical implementation (connecting to @kalika/numerical-engine for actual NR simulations)
  • 101.3.4.3 Implement gravitational wave extraction: Newman-Penrose formalism, Weyl scalars (Psi0 through Psi_4), Psi_4 extraction at finite radius with extrapolation to null infinity, decomposition into spin-weighted spherical harmonics, strain computation (h+ and h_x from double time integration of Psi_4)

101.4 Statistical Mechanics (@kalika/statistical-mechanics)#

101.4.1 Equilibrium Statistical Mechanics#

  • 101.4.1.1 Implement partition function computation: canonical Z(T, V, N), grand canonical Z(T, V, mu), microcanonical Omega(E, V, N) — symbolic evaluation for standard systems (ideal gas, harmonic oscillators, two-level system, ideal paramagnet, ideal Bose/Fermi gas), and numerical evaluation (direct summation, transfer matrix, Monte Carlo) for lattice models
  • 101.4.1.2 Implement thermodynamic potential derivation: from partition function, automatically compute free energy F = -kT ln Z, entropy S = -dF/dT, energy E = -d(ln Z)/d(beta), pressure P = -dF/dV, chemical potential mu = dF/dN, specific heat C_V/C_P, compressibility, susceptibility — all as symbolic expressions
  • 101.4.1.3 Implement quantum statistical mechanics: Bose-Einstein distribution, Fermi-Dirac distribution, Bose-Einstein condensation (critical temperature, condensate fraction, specific heat anomaly), Fermi gas (Fermi energy, Sommerfeld expansion, electronic specific heat), blackbody radiation (Planck distribution, Stefan-Boltzmann law, Wien displacement)
  • 101.4.1.4 Implement classical lattice models: Ising model (exact 1D solution via transfer matrix, exact 2D solution via Onsager, mean-field for general d, Monte Carlo for any d), Potts model, XY model, Heisenberg model, clock model — with phase transition identification, critical temperature computation, and universality class assignment

101.4.2 Phase Transitions & Critical Phenomena#

  • 101.4.2.1 Implement mean-field theory: Landau theory of phase transitions (order parameter expansion, symmetry breaking, first/second order classification, tricritical point), Landau-Ginzburg theory (gradient terms, domain walls, fluctuation corrections), Curie-Weiss mean-field for magnets
  • 101.4.2.2 Implement renormalization group for statistical mechanics: real-space RG (block-spin transformation, Migdal-Kadanoff), momentum-space RG (Wilson's epsilon expansion), fixed point analysis, critical exponent computation (alpha, beta, gamma, delta, nu, eta), scaling relations (Rushbrooke, Griffiths, Josephson, Fisher, Widom), universality classes
  • 101.4.2.3 Implement exact results: Kramers-Wannier duality, star-triangle relation, Yang-Baxter equation solutions, Bethe ansatz for XXX/XXZ chains (ground state energy, excitation spectrum), conformal field theory at criticality (central charge, operator dimensions, OPE coefficients)

101.5 Tests#

  • 101.5.1.1 Write QM tests: verify hydrogen atom energy levels E_n = -13.6/n^2 eV, harmonic oscillator wavefunctions against Hermite polynomials, Clebsch-Gordan coefficients against published tables (Varshalovich), angular momentum commutation relations — minimum 250 test cases
  • 101.5.1.2 Write QFT tests: verify one-loop QED vertex correction (anomalous magnetic moment a = alpha/(2pi)), scalar QED vacuum polarization, QCD beta function (b_0 = (11C_A - 4T_Fn_f)/(3*(4*pi)^2)), phi^4 theory beta function — minimum 150 test cases against published analytic results
  • 101.5.1.3 Write GR tests: verify Schwarzschild Ricci tensor = 0, FLRW Friedmann equations, Kerr ISCO radius, gravitational wave strain from binary inspiral (leading order Peters formula), Penrose process energy extraction — minimum 200 test cases against exact analytic solutions
  • 101.5.1.4 Write statistical mechanics tests: verify Onsager 2D Ising exact solution (critical temperature kT_c/J = 2/ln(1+sqrt(2))), ideal gas equation of state, Bose-Einstein condensation critical temperature, Fermi energy of free electron gas — minimum 100 test cases