<!-- prettier-ignore-start -->

## Phase 119: Kalika Lattice Dynamics & Phonon Physics — Phonon Dispersion, Anharmonicity, Thermal Transport, Electron-Phonon Coupling & Eliashberg Superconductivity

Vibrational properties of crystalline and disordered materials. Phonons — the
quantized lattice vibrations — govern thermal conductivity, thermodynamic
stability, phase transitions, spectroscopy (Raman, IR, INS), and
superconductivity. This phase builds a complete phonon stack from harmonic force
constants through anharmonic thermal transport to Eliashberg superconductivity,
targeting parity with Phonopy, Phono3py, ShengBTE, EPW, and Quantum ESPRESSO
DFPT. Technology split: Rust (~45%) for force constant solvers, dynamical matrix
diagonalization, iterative BTE, and Eliashberg kernel assembly; TypeScript
(~45%) for orchestration, types, thermodynamic post-processing, and
visualization; Python (~10%) for DFPT wrappers and validation against existing
codes.

---

### 119.1 Scaffolding & Core Types (`@kalika/phonons`)

#### 119.1.1 Library Scaffolding

- [x] **119.1.1.1** Create `libs/kalika/phonons/` directory with `package.json`,
      `project.json`, `tsconfig.json`, and `src/index.ts` barrel export.
      Register path mapping `@kalika/phonons` in `tsconfig.base.json`
- [x] **119.1.1.2** Create Rust crate `libs/kalika/phonons/crate/` with
      `Cargo.toml` (dependencies: `ndarray`, `ndarray-linalg`, `num-complex`,
      `rayon`, `serde`), `src/lib.rs`, and napi-rs bindings in
      `libs/kalika/phonons/crate/src/napi.rs` for exposing Rust solvers to
      TypeScript
- [x] **119.1.1.3** Configure Nx `project.json` with targets: `build` (tsup +
      cargo build), `test` (vitest + cargo test), `lint` (eslint + clippy),
      `build:wasm` (wasm-pack for browser-side phonon visualization)
- [x] **119.1.1.4** Create Python wrapper `libs/kalika/phonons/python/` with
      `pyproject.toml` for DFPT integration scripts and Phonopy/Phono3py
      validation utilities

#### 119.1.2 Core Type Definitions

- [x] **119.1.2.1** Define `ForceConstants` type: second-order interatomic force
      constant tensor Phi(l kappa alpha, l' kappa' alpha') stored as sparse or
      dense rank-4 array (supercell index, atom pair, Cartesian 3x3 block),
      including metadata for supercell dimensions, number of atoms in primitive
      cell, atomic masses, and lattice vectors
- [x] **119.1.2.2** Define `ThirdOrderForceConstants` type: Phi_3(l kappa alpha,
      l' kappa' alpha', l'' kappa'' alpha'') as sparse tensor with cutoff
      radius, triplet list, and symmetry-reduced independent elements
- [x] **119.1.2.3** Define `FourthOrderForceConstants` type: Phi_4 tensor for
      four-phonon scattering, stored as sparse quadruplet list with Cartesian
      blocks and cutoff metadata
- [x] **119.1.2.4** Define `DynamicalMatrix` type: D(q) as a complex Hermitian
      matrix of dimension (3*n_atoms x 3*n_atoms) at a specific q-point, with
      methods for eigenvalue decomposition returning phonon frequencies and
      eigenvectors
- [x] **119.1.2.5** Define `PhononMode` type: single phonon mode at a q-point
      with frequency omega (real or imaginary for soft modes), eigenvector
      (complex, 3\*n_atoms components), mode Grueneisen parameter, linewidth,
      and symmetry label (irreducible representation)
- [x] **119.1.2.6** Define `PhononBandStructure` type: collection of PhononMode
      along a q-path through the Brillouin zone, with high-symmetry point
      labels, q-point coordinates, distance along path, and branch connectivity
      tracking
- [x] **119.1.2.7** Define `PhononDOS` type: phonon density of states g(omega)
      as frequency grid + density values, with support for total DOS,
      atom-projected partial DOS (PDOS), and orbital-projected PDOS, plus
      integration utilities for thermodynamic sums
- [x] **119.1.2.8** Define `ThermalProperties` type: temperature-dependent
      thermodynamic quantities — free energy F(T), entropy S(T), heat capacity
      C_v(T), internal energy U(T), zero-point energy E_ZPE — as arrays over a
      temperature grid
- [x] **119.1.2.9** Define `GrueneisenParameters` type: mode Grueneisen
      parameter gamma(q,s) = -d ln(omega_qs) / d ln(V), macroscopic Grueneisen
      parameter gamma(T), and volume-dependent frequency data for multiple
      volumes
- [x] **119.1.2.10** Define `PhononSelfEnergy` type: complex self-energy
      Sigma(q,s,omega) = Delta(q,s,omega) + i\*Gamma(q,s,omega) with real part
      (frequency shift) and imaginary part (linewidth/scattering rate), at
      specified temperature
- [x] **119.1.2.11** Define `ThermalConductivity` type: thermal conductivity
      tensor kappa_ij(T) (3x3 symmetric), with mode-resolved contributions
      kappa_lambda, cumulative kappa vs. mean free path, and convergence
      metadata (RTA vs. iterative BTE)
- [x] **119.1.2.12** Define `ElectronPhononCoupling` type: electron-phonon
      matrix element g_mn_nu(k,q), Eliashberg spectral function alpha^2F(omega),
      coupling constant lambda, and transport spectral function
      alpha^2F_tr(omega)
- [x] **119.1.2.13** Define `EliashbergSolution` type: gap function
      Delta(i*omega_n) on Matsubara frequencies, renormalization function
      Z(i*omega_n), critical temperature T_c, gap ratio 2*Delta_0 / k_B*T_c, and
      tunneling DOS
- [x] **119.1.2.14** Define `BornEffectiveCharge` type: Born effective charge
      tensor Z\*\_kappa (3x3 per atom), high-frequency dielectric tensor
      epsilon_infinity (3x3), and acoustic sum rule violation metric
- [x] **119.1.2.15** Define `PolaronState` type: polaron wavefunction (lattice
      distortion field + electronic state), effective mass, binding energy,
      polaron radius, and mobility as function of temperature
- [x] **119.1.2.16** Define `PhononSpectralFunction` type: A(q,omega) spectral
      function beyond Lorentzian approximation, for anharmonic phonons where
      quasiparticle picture breaks down, stored as 2D grid (q-points x omega)

#### 119.1.3 Utility Infrastructure

- [x] **119.1.3.1** Implement q-point mesh generation: Monkhorst-Pack mesh,
      Gamma-centered mesh, and q-path generation along high-symmetry lines for
      all 14 Bravais lattices using the Brillouin zone database from
      @kalika/symmetry (or inline high-symmetry point tables for cubic,
      hexagonal, tetragonal, orthorhombic, monoclinic, triclinic)
- [x] **119.1.3.2** Implement Fourier interpolation utilities: forward transform
      (real-space force constants to dynamical matrix at arbitrary q) and
      inverse transform (q-space dynamical matrices on commensurate mesh to
      real-space force constants), with careful handling of phases and
      normalization
- [x] **119.1.3.3** Implement tetrahedron method for Brillouin zone integration:
      linear tetrahedron method with Bloechl corrections for computing phonon
      DOS, thermodynamic integrals, and electron-phonon coupling integrals —
      giving smooth results without artificial broadening
- [x] **119.1.3.4** Implement Hermitian eigensolver wrapper (Rust): thin wrapper
      around LAPACK `zheev`/`dsyev` via `ndarray-linalg` for diagonalizing
      dynamical matrices, with fallback to divide-and-conquer `zheevd` for large
      matrices (> 100 atoms)
- [x] **119.1.3.5** Implement crystal symmetry interface: adapter to
      @kalika/symmetry (or standalone spglib-like routines) for obtaining space
      group operations, site symmetries, and irreducible q-points from the full
      Monkhorst-Pack mesh — reducing computational cost by symmetry
- [x] **119.1.3.6** Implement phonon unit conversion utilities: frequency units
      (THz, cm^-1, meV, K) with exact conversion factors (1 THz = 33.35641 cm^-1
      = 4.13567 meV = 47.9924 K), force constant units (eV/Ang^2, Ry/Bohr^2,
      Ha/Bohr^2, N/m), and thermal conductivity units (W/mK, W/cmK)
- [x] **119.1.3.7** Implement sparse force constant storage (Rust): compressed
      sparse row (CSR) format for force constant matrices exploiting the short-
      range nature of interatomic interactions (only non-zero blocks within
      cutoff radius stored), with efficient lookup by atom pair and lattice
      vector
- [x] **119.1.3.8** Implement phonon I/O routines: read/write force constants in
      Phonopy FORCE_CONSTANTS / force_constants.hdf5 format, VASP
      FORCE_CONSTANTS, Quantum ESPRESSO .fc format, and native HDF5 format with
      full metadata (structure, masses, Born charges, supercell info)
- [x] **119.1.3.9** Implement phonon band structure plotting data export:
      generate plot data (q-distance, frequencies, high-symmetry labels) in
      JSON, CSV, and gnuplot-compatible formats for external visualization, plus
      built-in SVG renderer for direct output
- [x] **119.1.3.10** Implement complex Hermitian eigenvalue solver validation:
      test suite verifying eigenvalue accuracy against known analytical results
      (1D chain, 2-atom basis), orthonormality of eigenvectors, and numerical
      stability for near-degenerate eigenvalues (accidental degeneracies at
      high-symmetry points)

---

### 119.2 Harmonic Phonons — Finite Displacement Method (`@kalika/phonons`)

#### 119.2.1 Supercell & Displacement Generation

- [x] **119.2.1.1** Implement supercell constructor: given primitive cell
      (lattice vectors, basis atoms) and supercell matrix (3x3 integer or
      diagonal n1 x n2 x n3), generate supercell with correctly mapped atomic
      positions, preserving atom type ordering consistent with force constant
      indexing
- [x] **119.2.1.2** Implement displacement generation: for each
      symmetry-inequivalent atom, generate +/- displacements along
      symmetry-adapted directions (using site symmetry to determine the minimal
      set), with configurable displacement amplitude (default 0.01 Angstrom).
      Central difference scheme for accuracy
- [x] **119.2.1.3** Implement symmetry reduction of displacements: use space
      group operations to identify symmetry-equivalent atoms and reduce the
      number of required displacement calculations. For a crystal with N atoms
      in the primitive cell, reduce from 6N (central difference, 3 directions x
      2 signs) to the symmetry-irreducible set
- [x] **119.2.1.4** Implement displacement file writer: export displaced
      supercell structures in VASP POSCAR, Quantum ESPRESSO PWscf, and generic
      XYZ/JSON formats for force evaluation by external DFT codes
- [x] **119.2.1.5** Implement force parser: read forces from DFT output files
      (VASP vasprun.xml/OUTCAR, QE pwscf.out, generic JSON) and associate each
      force set with its corresponding displacement, with validation (force
      dimensions match atom count, units conversion)

#### 119.2.2 Force Constant Extraction

- [x] **119.2.2.1** Implement second-order force constant extraction (Rust):
      from displaced-supercell forces F_i(displacement_j), compute force
      constant matrix Phi(kappa alpha, kappa' alpha') = -dF(kappa alpha) /
      du(kappa' alpha') using central differences. Handle the full
      (3*N_super)x(3*N_super) matrix and fold back to primitive cell pairs
- [x] **119.2.2.2** Implement acoustic sum rule enforcement: adjust force
      constants so that sum over l' of Phi(0 kappa alpha, l' kappa' alpha') = 0
      for all kappa, alpha, alpha'. Use both simple correction (distribute
      violation equally) and symmetry-preserving correction (project onto
      ASR-satisfying subspace)
- [x] **119.2.2.3** Implement force constant symmetrization: enforce space group
      symmetry on force constants — for each symmetry operation R, impose
      Phi(R*r, R*r') = R _ Phi(r, r') _ R^T. Also enforce Hermitian symmetry
      Phi(l kappa, l' kappa') = Phi(l' kappa', l kappa)^T and translational
      invariance
- [x] **119.2.2.4** Implement force constant range analysis: compute the decay
      of force constant magnitude |Phi| as function of interatomic distance,
      identify the effective interaction range, and warn if significant force
      constants extend to the supercell boundary (indicating insufficient
      supercell size)
- [x] **119.2.2.5** Implement supercell size convergence testing: automate
      running phonon calculations for 2x2x2, 3x3x3, 4x4x4 (etc.) supercells and
      compare phonon frequencies at high-symmetry q-points, reporting
      convergence of frequencies to a user-specified tolerance (e.g., 0.1 THz)

#### 119.2.3 Dynamical Matrix & Eigenvalue Problem

- [x] **119.2.3.1** Implement dynamical matrix construction (Rust): given
      real-space force constants Phi(0 kappa, l' kappa') and q-vector, compute
      D_kappa_alpha,kappa'\_alpha'(q) = (1/sqrt(M_kappa _ M_kappa')) _ sum_l'
      Phi(0 kappa alpha, l' kappa' alpha') _ exp(i _ q . R_l') — the
      mass-weighted Fourier transform of force constants
- [x] **119.2.3.2** Implement non-analytic correction for polar materials: add
      the electrostatic contribution D^NA(q->0) = (4*pi*e^2 / V) _ (q .
      Z_\_kappa)\_alpha _ (q . Z_\_kappa')\_alpha' / (q . epsilon_infinity . q _
      sqrt(M_kappa _ M_kappa')) — responsible for LO-TO splitting at the Gamma
      point, with direction-dependent limit handling
- [x] **119.2.3.3** Implement phonon eigenvalue solver: diagonalize D(q) to
      obtain eigenvalues omega^2_s(q) and eigenvectors e_s(q). Handle negative
      eigenvalues (imaginary frequencies indicating dynamical instability) by
      returning omega as imaginary. Normalize eigenvectors to satisfy
      sum_kappa_alpha |e_s(kappa,alpha)|^2 = 1
- [x] **119.2.3.4** Implement phonon dispersion calculator: compute phonon
      frequencies along a q-path through high-symmetry points, with branch
      connectivity tracking (avoid spurious crossings by tracking eigenvector
      continuity between adjacent q-points)
- [x] **119.2.3.5** Implement phonon density of states: compute total DOS
      g(omega) by sampling frequencies on a dense q-mesh (Monkhorst-Pack) using
      either histogram binning with Gaussian broadening or the linear
      tetrahedron method (119.1.3.3). Include atom-projected PDOS g_kappa(omega)
      via eigenvector weights
- [x] **119.2.3.6** Implement imaginary frequency detection and reporting: scan
      all q-points for imaginary frequencies (omega^2 < 0), identify the
      unstable modes (q-vector, branch index, eigenvector pattern), classify
      instability type (zone-center ferroelectric, zone-boundary
      antiferrodistortive, CDW), and report in a structured `InstabilityReport`
- [x] **119.2.3.7** Implement commensurate q-point identification: given
      supercell dimensions n1 x n2 x n3, determine which q-points are exactly
      commensurate (q such that exp(i*q*R_super) = 1 for all superlattice
      vectors), and flag non-commensurate q-points where finite displacement
      results are interpolated rather than exact

#### 119.2.4 Born Effective Charges & Dielectric Properties

- [x] **119.2.4.1** Implement Born effective charge tensor parser: read
      Z*\_kappa (3x3 tensor per atom) from DFT outputs (VASP OUTCAR/BORN, QE
      ph.x output), verify charge neutrality sum rule (sum_kappa Z*\_kappa = 0),
      and store for non-analytic correction
- [x] **119.2.4.2** Implement high-frequency dielectric tensor parser: read
      epsilon_infinity (3x3 symmetric tensor) from DFT outputs, validate
      positive definiteness, and store alongside Born charges
- [x] **119.2.4.3** Implement LO-TO splitting analysis: for each IR-active mode
      at Gamma, compute the LO-TO splitting as function of direction q-hat,
      report splitting magnitudes, and plot the direction-dependent frequency
      surface for uniaxial/biaxial materials
- [x] **119.2.4.4** Implement mixed boundary conditions for LO-TO: handle the
      q->0 limit along different crystallographic directions for non-cubic
      crystals where LO-TO splitting is anisotropic, using Gonze-Lee
      interpolation scheme for smooth dispersion through Gamma

#### 119.2.5 Analytical Models & Benchmarks

- [x] **119.2.5.1** Implement 1D monoatomic chain model: analytical phonon
      dispersion omega(q) = 2*sqrt(k/M) * |sin(q\*a/2)| for benchmarking and
      pedagogy. Verify numerical dynamical matrix reproduces exact result.
      Compute DOS analytically (van Hove singularities at zone boundary)
- [x] **119.2.5.2** Implement 1D diatomic chain model: two branches — acoustic
      omega*-(q) and optical omega*+(q) — with analytical gap at zone boundary.
      Verify Born effective charge and LO-TO splitting in 1D limit. Compute
      group velocities and DOS for both branches
- [x] **119.2.5.3** Implement 3D Debye model: isotropic linear dispersion omega
      = v*|q| with Debye cutoff omega_D, analytical DOS g(omega) =
      3*omega^2/omega_D^3, analytical thermodynamics (Debye functions for C_v,
      F, S). Use as reference for testing numerical integration routines
- [x] **119.2.5.4** Implement Einstein model: N independent oscillators at
      frequency omega_E, analytical C_v = 3Nk_B * (hbar*omega_E/(k_B*T))^2 *
      exp(x)/(exp(x)-1)^2. Use for validating thermodynamic sum code and as
      building block for mixed Debye-Einstein fitting
- [x] **119.2.5.5** Implement Born-von Karman force constant model:
      nearest-neighbor and second-nearest-neighbor spring constant models for
      FCC, BCC, and diamond structure, with analytical expressions for dynamical
      matrix elements. Calibrate spring constants to experimental elastic
      constants
- [x] **119.2.5.6** Implement Keating valence force field model: bond-stretching
      (alpha) and bond-bending (beta) force constants for tetrahedral
      semiconductors (Si, Ge, GaAs), deriving 6 independent force constant
      components from 2 parameters. Compare phonon dispersion with ab initio

#### 119.2.6 Advanced Harmonic Analysis

- [x] **119.2.6.1** Implement irreducible representation analysis: for each
      phonon mode at a high-symmetry q-point, determine the irreducible
      representation (symmetry label) of the space group little group at that
      q-point, using character projection. Essential for Raman/IR selection
      rules and mode identification
- [x] **119.2.6.2** Implement phonon band connectivity (Rust): robust branch
      assignment along q-paths using eigenvector overlap method — at each
      q-step, compute overlap matrix O\_{ss'} = |<e_s(q)|e_s'(q+dq)>| and assign
      branches by maximum overlap. Handle band crossings vs. anti-crossings
- [x] **119.2.6.3** Implement participation ratio: P_s(q) = (sum_kappa
      |e_s(kappa,q)|^2)^2 / (N \* sum_kappa |e_s(kappa,q)|^4), measuring how
      many atoms participate in each mode (P=1 for fully delocalized, P=1/N for
      single-atom vibration). Useful for identifying localized modes in complex
      crystals and alloys
- [x] **119.2.6.4** Implement phonon animation data: for each mode at selected
      q-points, generate time-dependent atomic displacement vectors u_kappa(t) =
      Re[e_s(kappa) * exp(-i*omega*t)] for visualization of mode patterns —
      breathing modes, rocking modes, zone-boundary modes, etc.
- [x] **119.2.6.5** Implement elastic constant extraction from phonon
      dispersion: compute elastic constants C_ij from the slope of acoustic
      branches near Gamma — v_LA along [100] gives C_11/rho, v_TA along [100]
      gives C_44/rho, etc. — providing a consistency check between lattice
      dynamics and continuum elasticity

---

### 119.3 Harmonic Phonons — DFPT (`@kalika/phonons-dfpt`)

#### 119.3.1 Library Scaffolding

- [x] **119.3.1.1** Create `libs/kalika/phonons-dfpt/` with `package.json`,
      `project.json`, `tsconfig.json`, and `src/index.ts`. Register
      `@kalika/phonons-dfpt` in `tsconfig.base.json`
- [x] **119.3.1.2** Create Python module `libs/kalika/phonons-dfpt/python/` with
      DFPT driver scripts for interfacing with Quantum ESPRESSO `ph.x` and
      `matdyn.x`

#### 119.3.2 Linear Response Framework

- [x] **119.3.2.1** Implement Sternheimer equation solver interface: define the
      self-consistent perturbation theory workflow — given unperturbed
      wavefunctions psi*nk and perturbation dV/du*{q,kappa,alpha}, solve (H -
      epsilon_nk + alpha\*P_c) |dpsi_nk> = -(1 - P_occ) dV_SCF |psi_nk>
      iteratively until self-consistency in the first-order density response
- [x] **119.3.2.2** Implement perturbation Hamiltonian for atomic displacements:
      compute dV/du\_{q,kappa,alpha} — the derivative of the self-consistent
      potential with respect to atomic displacement — including local, nonlocal
      pseudopotential, and Hartree/XC contributions
- [x] **119.3.2.3** Implement DFPT response function computation: compute the
      first-order charge density response delta*n(r) at arbitrary q-vectors (not
      limited to commensurate q-points), from which dynamical matrices are
      constructed via D = (1/sqrt(M*M')) * d^2E / du*du
- [x] **119.3.2.4** Implement dielectric tensor computation via DFPT: compute
      both electronic (clamped-ion) dielectric tensor epsilon_infinity and
      static (relaxed-ion) dielectric tensor epsilon_0 from electric field
      perturbation response, including local field effects
- [x] **119.3.2.5** Implement Born effective charge computation via DFPT:
      compute Z*\_kappa,alpha,beta = Omega * dP*alpha / du*{kappa,beta} from the
      mixed electric-field/displacement response, with acoustic sum rule
      enforcement

#### 119.3.3 Force Constant Interpolation

- [x] **119.3.3.1** Implement Fourier interpolation of dynamical matrices: given
      D(q) on a coarse q-mesh from DFPT, compute real-space force constants C(R)
      via inverse Fourier transform, then interpolate to arbitrary q-points via
      forward transform — the standard DFPT workflow for generating smooth
      phonon dispersions from a coarse q-grid
- [x] **119.3.3.2** Implement short-range / long-range decomposition: separate
      force constants into short-range (decaying) and long-range (dipole-dipole)
      contributions; interpolate short-range part on real-space grid and add
      analytic long-range part (from Z\* and epsilon_infinity) at each target
      q-point — essential for polar materials where naive interpolation fails
- [x] **119.3.3.3** Implement Wigner-Seitz cell construction for real-space
      force constants: identify the minimal set of lattice vectors R in the
      Wigner-Seitz supercell, with proper weighting for atoms on WS cell
      boundaries, to avoid double-counting and ensure Hermiticity of
      interpolated D(q)

#### 119.3.4 Validation & Comparison

- [x] **119.3.4.1** Implement DFPT vs. finite displacement comparison tool:
      compute phonon frequencies at commensurate q-points using both methods and
      report discrepancies, identifying sources (supercell size, exchange-
      correlation, pseudopotential, k-mesh density)
- [x] **119.3.4.2** Implement DFPT workflow orchestrator: end-to-end pipeline
      from crystal structure to phonon dispersion — SCF calculation, ph.x run on
      q-mesh, force constant recovery, interpolation, dispersion and DOS
      plotting — with checkpoint/restart capability

#### 119.3.5 Advanced DFPT Features

- [x] **119.3.5.1** Implement electric field perturbation: compute the response
      to a homogeneous electric field E, yielding the electronic dielectric
      tensor epsilon_infinity, Born effective charges (mixed E/u response), and
      Raman tensors (second-order E response) — all from DFPT without finite
      differences
- [x] **119.3.5.2** Implement strain perturbation interface: compute elastic
      constants C_ij, internal strain tensor, and piezoelectric tensor from DFPT
      strain perturbations, complementing the phonon (atomic displacement)
      perturbation for complete mechanical property characterization
- [x] **119.3.5.3** Implement q-point parallelization strategy: distribute DFPT
      calculations across q-points for embarrassingly parallel execution, with
      load-balancing heuristics (Gamma point is cheapest, low-symmetry q-points
      most expensive due to fewer symmetry reductions)
- [x] **119.3.5.4** Implement non-collinear magnetism support: DFPT phonons for
      magnetic systems with spin-orbit coupling and non-collinear spin
      arrangements, where the perturbation Hamiltonian includes spinor rotations
      and the dynamical matrix becomes 6Nx6N (spin-up and spin-down)

---

### 119.4 Thermodynamic Properties from Phonons (`@kalika/phonons`)

#### 119.4.1 Harmonic Thermodynamics

- [x] **119.4.1.1** Implement Helmholtz free energy: F(T) = sum*{q,s}
      [hbar\*omega*{qs}/2 + k*B*T * ln(1 - exp(-hbar\*omega*{qs}/(k_B\*T)))]
      computed by integration over the phonon DOS with appropriate weighting,
      normalized per primitive cell. Handle T=0 limit (zero-point energy only)
- [x] **119.4.1.2** Implement vibrational entropy: S(T) = -k*B \* sum*{q,s}
      [n_{qs} * ln(n_{qs}) - (1+n_{qs}) * ln(1+n_{qs})] where n\_{qs} =
      1/(exp(hbar*omega/(k_B*T)) - 1) is the Bose-Einstein occupation. Verify
      thermodynamic consistency S = -dF/dT
- [x] **119.4.1.3** Implement heat capacity at constant volume: C*v(T) =
      sum*{q,s} k*B * (hbar*omega*{qs}/(k_B*T))^2 * exp(hbar*omega/(k_B*T)) /
      (exp(hbar*omega/(k_B*T)) - 1)^2. Verify Dulong-Petit limit at high T (C_v
      -> 3*N*k_B) and T^3 behavior at low T
- [x] **119.4.1.4** Implement internal energy: U(T) = sum*{q,s}
      hbar\*omega*{qs} \* (n\_{qs} + 1/2). Verify U(0) = E_ZPE and dU/dT = C_v
- [x] **119.4.1.5** Implement zero-point energy: E*ZPE = (1/2) \* sum*{q,s}
      hbar\*omega\_{qs}, with convergence reporting as function of q-mesh
      density
- [x] **119.4.1.6** Implement Debye model fitting: fit computed C_v(T) or DOS to
      Debye model to extract Debye temperature Theta_D, using least-squares fit
      to low-temperature C_v or from the DOS moment <omega^2>. Report quality of
      fit and temperature range of validity

#### 119.4.2 Quasi-Harmonic Approximation (QHA)

- [x] **119.4.2.1** Implement QHA energy surface: compute phonon free energy
      F(V,T) at multiple volumes (typically 5-11 uniformly spaced volumes around
      equilibrium), fit E_static(V) + F_vib(V,T) as function of volume at each
      temperature using Birch-Murnaghan or Vinet equation of state
- [x] **119.4.2.2** Implement equilibrium volume V(T): minimize F(V,T) with
      respect to V at each temperature to find V_eq(T), yielding thermal
      expansion. Use EOS fitting (not raw polynomial) for robust minimization
- [x] **119.4.2.3** Implement volumetric thermal expansion coefficient:
      alpha_V(T) = (1/V) \* dV/dT from the temperature-dependent equilibrium
      volume. Compute both volumetric and linear expansion coefficients. Handle
      anisotropic expansion via directional Grueneisen analysis
- [x] **119.4.2.4** Implement temperature-dependent bulk modulus: B(T) = V \*
      d^2F/dV^2 evaluated at V_eq(T), tracking the softening of bulk modulus
      with increasing temperature
- [x] **119.4.2.5** Implement Gibbs free energy: G(T,P) = min_V [F(V,T) + P*V],
      enabling finite-pressure thermodynamics and P-T phase diagrams
- [x] **119.4.2.6** Implement heat capacity at constant pressure: C_p(T) =
      C_v(T) + alpha^2 _ B _ V \* T, the experimentally measured quantity
      (differs from C_v significantly at high T due to thermal expansion)

#### 119.4.3 Grueneisen Parameters

- [x] **119.4.3.1** Implement mode Grueneisen parameters: gamma(q,s) = -d
      ln(omega\_{qs}) / d ln(V), computed by finite difference of phonon
      frequencies at 2-3 volumes (central difference: gamma = -V/(2*dV) *
      (omega(V+dV) - omega(V-dV)) / omega(V))
- [x] **119.4.3.2** Implement macroscopic Grueneisen parameter: gamma(T) =
      sum*{q,s} gamma(q,s) \* C*{qs}(T) / sum*{q,s} C*{qs}(T), the mode-averaged
      Grueneisen parameter weighted by mode heat capacity
- [x] **119.4.3.3** Implement Grueneisen-based thermal expansion: alpha = gamma
      _ C_v / (B _ V), providing a quick estimate of thermal expansion from
      Grueneisen parameters without full QHA, and comparison with QHA results

#### 119.4.4 Phase Stability

- [x] **119.4.4.1** Implement phase transition detection: compare G(T,P) of two
      (or more) competing crystal structures, find intersection points in P-T
      space (phase boundaries), classify transitions (first-order: discontinuous
      V/S, second-order: continuous V/S but discontinuous C_p)
- [x] **119.4.4.2** Implement phonon contribution to entropy of mixing:
      Delta_S_mix_phonon for alloys / solid solutions by comparing phonon DOS of
      ordered compound vs. endpoints, using the virtual crystal approximation or
      special quasirandom structures for the alloy phonon DOS
- [x] **119.4.4.3** Implement free energy of formation: Delta_G_f(T) for a
      compound relative to elemental references, including vibrational
      contributions, for phase stability diagrams (convex hull at finite
      temperature)

#### 119.4.5 Advanced Thermodynamic Analysis

- [x] **119.4.5.1** Implement mixed Debye-Einstein thermodynamic model: fit
      C_v(T) using n_D Debye modes (acoustic) and n_E Einstein modes (optical)
      with independent Theta_D and Theta_E parameters, giving better fit across
      full temperature range than pure Debye model for complex crystals
- [x] **119.4.5.2** Implement phonon free energy difference for alloy ordering:
      Delta_F_vib = F_vib(ordered) - F_vib(disordered) as function of T,
      determining whether vibrational entropy stabilizes ordered or disordered
      phase and the order-disorder transition temperature
- [x] **119.4.5.3** Implement mean-square displacement (Debye-Waller factor):
      <u^2*kappa>(T) = sum*{q,s} (hbar/(2*N*M*kappa\*omega*{qs})) _
      |e_s(kappa,q)|^2 _ coth(hbar*omega/(2*k_B\*T)) — the thermal mean-square
      atomic displacement used in X-ray/neutron crystallography, Moessbauer
      spectroscopy (Lamb-Moessbauer factor), and EXAFS analysis
- [x] **119.4.5.4** Implement anisotropic displacement parameters: full 3x3
      displacement tensor U_ij(kappa,T) for each atom (not just isotropic
      <u^2>), for comparison with crystallographic ADPs from X-ray refinement.
      Generate CIF-format displacement ellipsoids
- [x] **119.4.5.5** Implement phonon entropy stabilization analysis: for a set
      of competing phases, compute the vibrational entropy difference
      Delta_S_vib(T) to determine which phase is vibrationally stabilized at
      high temperature (typically the softer, lower-density phase), and at what
      temperature the vibrational contribution overcomes the static energy
      difference

---

### 119.5 Anharmonic Phonons — Third-Order Force Constants (`@kalika/phonons-anharmonic`)

#### 119.5.1 Library Scaffolding

- [x] **119.5.1.1** Create `libs/kalika/phonons-anharmonic/` with
      `package.json`, `project.json`, `tsconfig.json`, and `src/index.ts`.
      Register `@kalika/phonons-anharmonic` in `tsconfig.base.json`
- [x] **119.5.1.2** Create Rust crate `libs/kalika/phonons-anharmonic/crate/`
      for computationally intensive third-order and fourth-order force constant
      extraction and scattering rate calculations

#### 119.5.2 Third-Order Force Constant Extraction

- [x] **119.5.2.1** Implement third-order displacement scheme: generate
      displacement-displacement pairs (atom i displaced by +/- delta along
      alpha, atom j displaced by +/- delta along beta) for computing Phi_3(kappa
      alpha, kappa' alpha', kappa'' alpha'') = -d^2F(kappa alpha) / (du(kappa'
      alpha') \* du(kappa'' alpha''))
- [x] **119.5.2.2** Implement cutoff-based triplet selection: enumerate atom
      triplets (kappa, kappa', kappa'') within a specified interaction range
      r_cut, reducing the number of displacements from O(N^2) to manageable
      size. Typical cutoff: 4th-5th nearest neighbor shell
- [x] **119.5.2.3** Implement symmetry reduction of third-order terms: use space
      group operations and permutation symmetry (Phi_3(a,b,c) = Phi_3(b,a,c) =
      Phi_3(a,c,b) = ...) to identify the minimal set of independent third-order
      force constants, reducing computational cost by 10-100x depending on
      symmetry
- [x] **119.5.2.4** Implement third-order force constant extraction (Rust):
      compute Phi_3 from forces on doubly-displaced supercells using finite
      differences. Handle both 2nd-order central difference (4 displacements per
      pair) and mixed-derivative formulas. Store as sparse tensor with
      (triplet_index, 3x3x3 Cartesian block) format
- [x] **119.5.2.5** Implement third-order acoustic sum rule: enforce
      sum\_{l''kappa''} Phi_3(0 kappa alpha, l' kappa' alpha', l'' kappa''
      alpha'') = 0 for translational invariance of third-order force constants
- [x] **119.5.2.6** Implement 2n+1 theorem interface: for DFPT-based third-order
      force constants, define the interface for computing Phi_3 from first-order
      wavefunctions only (avoiding explicit second-order perturbation theory),
      following the 2n+1 theorem of perturbation theory

#### 119.5.3 Three-Phonon Scattering

- [x] **119.5.3.1** Implement three-phonon interaction matrix elements (Rust):
      V*3(lambda, lambda', lambda'') = sum*{kappa alpha, kappa' alpha', kappa''
      alpha''} Phi_3(0 kappa alpha, l' kappa' alpha', l'' kappa'' alpha'') _
      e_lambda(kappa alpha) _ e_lambda'(kappa' alpha') _ e_lambda''(kappa''
      alpha'') _ exp(i*q'*R_l') * exp(i*q''_R_l'') / sqrt(8 _ M_kappa _ M_kappa'
      _ M_kappa'' _ omega_lambda _ omega_lambda' \* omega_lambda'') with
      momentum conservation q + q' + q'' = G (reciprocal lattice vector)
- [x] **119.5.3.2** Implement energy/momentum conservation selection: for a
      given mode lambda = (q,s), enumerate all allowed three-phonon processes:
      (a) absorption: omega_qs = omega_q's' + omega_q''s'' with q'' = q - q' +
      G, (b) emission: omega_qs + omega_q's' = omega_q''s'' with q'' = q + q' +
      G. Use adaptive q'-mesh refinement near conservation surfaces
- [x] **119.5.3.3** Implement phonon-phonon scattering rates (Rust):
      Gamma*lambda = (18*pi/hbar^2) * sum*{lambda',lambda''} |V_3|^2 _
      [(1+n'+n'') _ delta(omega - omega' - omega'') + (n'-n'') \* delta(omega +
      omega' - omega'')] using Gaussian or adaptive broadening for delta
      functions, parallelized over lambda with rayon
- [x] **119.5.3.4** Implement Normal vs. Umklapp process classification: for
      each scattering event, determine whether q + q' + q'' = 0 (Normal) or q +
      q' + q'' = G != 0 (Umklapp), and compute separate N and U scattering
      rates. Only Umklapp processes contribute to thermal resistance
- [x] **119.5.3.5** Implement phonon linewidths from anharmonicity: full width
      at half maximum FWHM_lambda = 2 \* Gamma_lambda (imaginary part of
      self-energy), computed as function of temperature. Compare with
      experimental INS or Raman linewidth data
- [x] **119.5.3.6** Implement phonon frequency shift from anharmonicity: real
      part of the phonon self-energy Delta*lambda(T) = P \*
      sum*{lambda',lambda''} {...} (principal value integral), giving
      temperature-dependent phonon renormalization. Track frequency evolution
      omega_eff(T) = omega_0 + Delta(T)
- [x] **119.5.3.7** Implement phonon spectral function: A_lambda(omega) =
      (1/pi) \* Gamma_lambda / ((omega - omega_lambda - Delta_lambda)^2 +
      Gamma_lambda^2) for Lorentzian approximation, plus full spectral function
      computation beyond Lorentzian for strongly anharmonic systems (multi-peak
      structures)
- [x] **119.5.3.8** Implement joint density of states (JDOS): g*2^(+/-)(omega) =
      sum*{q',s',s''} delta(omega +/- omega*{q',s'} -/+ omega*{q-q',s''}) for
      rapid assessment of three-phonon scattering phase space without computing
      full matrix elements. Weighted JDOS with group velocity weighting

#### 119.5.4 Anharmonic Convergence & Analysis

- [x] **119.5.4.1** Implement cutoff convergence testing for third-order FC:
      compute phonon linewidths and thermal conductivity with increasing
      interaction range cutoffs (3rd, 4th, 5th, 6th neighbor shells), plotting
      convergence of kappa(300K) to identify the minimal cutoff that gives
      converged results (typically 4th-5th neighbor for covalent semiconductors)
- [x] **119.5.4.2** Implement q-mesh convergence testing for scattering rates:
      compute Gamma_lambda on progressively denser q-meshes (8x8x8, 12x12x12,
      16x16x16, 20x20x20), extrapolate to infinite mesh, and report required
      mesh density for 1% convergence of kappa
- [x] **119.5.4.3** Implement adaptive Gaussian broadening: automatically select
      broadening width sigma for delta functions in scattering rate calculation
      based on local phonon dispersion slope and q-mesh spacing (sigma ~
      |v_group| \* |dq|), avoiding both artificial broadening artifacts and
      noisy under-sampled delta functions
- [x] **119.5.4.4** Implement phonon lifetime analysis: visualize mode lifetimes
      tau_lambda = 1/(2\*Gamma_lambda) as function of frequency, q-point, and
      branch, identifying bottleneck modes (shortest lifetime = strongest
      scattering) and long-lived modes (carriers of most heat). Generate
      frequency-resolved lifetime spectrum
- [x] **119.5.4.5** Implement temperature-dependent phonon self-energy maps:
      compute Delta(q,omega) + i\*Gamma(q,omega) on a (q,omega) grid at multiple
      temperatures, showing how anharmonic renormalization evolves. Track mode
      softening approaching structural phase transitions (soft mode behavior)
- [x] **119.5.4.6** Implement anharmonicity metric: quantify the degree of
      anharmonicity per mode via the ratio Gamma_lambda/omega_lambda (linewidth
      to frequency) and the Grueneisen parameter magnitude, flagging strongly
      anharmonic modes where the quasi-particle picture may break down

---

### 119.6 Lattice Thermal Conductivity (`@kalika/thermal-transport`)

#### 119.6.1 Library Scaffolding

- [x] **119.6.1.1** Create `libs/kalika/thermal-transport/` with `package.json`,
      `project.json`, `tsconfig.json`, and `src/index.ts`. Register
      `@kalika/thermal-transport` in `tsconfig.base.json`
- [x] **119.6.1.2** Create Rust crate `libs/kalika/thermal-transport/crate/` for
      BTE solver, scattering rate accumulation, and iterative matrix inversion

#### 119.6.2 Phonon Transport Properties

- [x] **119.6.2.1** Implement phonon group velocity (Rust): v*lambda =
      d\*omega_lambda/dq, computed via first-order perturbation theory:
      v*{s,alpha}(q) = (1/(2*omega_s(q))) * e_s(q)^dagger _ dD(q)/dq_alpha _
      e_s(q), where dD/dq is the derivative of the dynamical matrix. Finite
      difference fallback for validation
- [x] **119.6.2.2** Implement mode heat capacity: C_lambda = k_B *
      (hbar*omega_lambda/(k_B*T))^2 * n_lambda \* (n_lambda + 1) for each phonon
      mode, used in thermal conductivity expressions
- [x] **119.6.2.3** Implement mean free path: Lambda_lambda = |v_lambda| \*
      tau_lambda, with cumulative thermal conductivity kappa(Lambda <
      Lambda_max) for analyzing size effects and nano-scale thermal transport

#### 119.6.3 Boltzmann Transport Equation

- [x] **119.6.3.1** Implement relaxation time approximation (RTA):
      kappa^RTA*{alpha,beta} = (1/(N*V)) * sum_lambda C_lambda \*
      v*{lambda,alpha} _ v\_{lambda,beta} _ tau_lambda, where tau_lambda =
      1/(2\*Gamma_lambda) is the single-mode relaxation time from three-phonon
      scattering. This is the simplest BTE solution, exact only when all modes
      relax independently
- [x] **119.6.3.2** Implement full iterative BTE solution (Rust): solve F_lambda
      = tau_lambda \* (v_lambda + Delta_lambda(F)) iteratively where
      Delta_lambda encodes the deviation from RTA due to non-equilibrium phonon
      redistribution. Iterate until convergence of kappa (typically 20-100
      iterations). This matches the ShengBTE algorithm
- [x] **119.6.3.3** Implement direct (matrix inversion) BTE solution: construct
      and invert the scattering matrix A\_{lambda,lambda'} directly, giving
      exact BTE result in one shot. Feasible for small q-meshes; provides
      reference for validating iterative solution
- [x] **119.6.3.4** Implement variational BTE solution: maximize the variational
      functional kappa_var >= kappa_RTA using the Ziman variational principle,
      providing an upper bound that converges to the exact result. Useful for
      validating iterative results
- [x] **119.6.3.5** Implement mode-resolved thermal conductivity output:
      kappa_lambda = C_lambda _ v_lambda _ Lambda_lambda (scalar per mode),
      enabling identification of dominant heat-carrying phonon modes (typically
      low-frequency acoustic modes with long mean free paths)
- [x] **119.6.3.6** Implement cumulative thermal conductivity:
      kappa*cum(Lambda_max) = sum*{lambda: Lambda_lambda < Lambda_max}
      kappa_lambda, showing what fraction of thermal conductivity comes from
      phonons with mean free path below a given threshold. Critical for
      predicting size effects in nanostructures
- [x] **119.6.3.7** Implement temperature-dependent thermal conductivity:
      compute kappa(T) over a temperature range, verify kappa ~ 1/T behavior at
      high T (Umklapp-dominated regime) and kappa ~ T^3 at very low T (boundary-
      scattering-limited regime)

#### 119.6.4 Additional Scattering Mechanisms

- [x] **119.6.4.1** Implement isotope scattering (Rust): Tamura model —
      1/tau_iso_lambda = (pi*omega^2_lambda)/(2*N) _ sum_lambda'
      delta(omega_lambda - omega_lambda') _ sum_kappa g_kappa _ |e_lambda(kappa)
      . e_\_lambda'(kappa)|^2 where g_kappa = sum_i f_i \* (1 - M_i/M_avg)^2 is
      the mass variance parameter for atom kappa
- [x] **119.6.4.2** Implement grain boundary scattering: Casimir model
      1/tau_gb_lambda = |v_lambda|/L where L is the grain size or sample
      dimension, with specularity parameter p for partially specular boundaries:
      1/tau_gb = |v_lambda|_(1-p)/(L_(1+p))
- [x] **119.6.4.3** Implement alloy scattering — virtual crystal approximation:
      for substitutional alloys A*xB*{1-x}, mass disorder scattering from Tamura
      formula with concentration-weighted mass variance, plus force constant
      disorder correction (bond-length/stiffness differences)
- [x] **119.6.4.4** Implement alloy scattering — T-matrix approach: beyond Born
      approximation for strong mass/force-constant disorder, solving the
      single-site T-matrix equation self-consistently (coherent potential
      approximation for phonons) to get renormalized phonon Green's function and
      scattering rates
- [x] **119.6.4.5** Implement Matthiessen's rule combination: total scattering
      rate 1/tau_total = 1/tau_3ph + 1/tau_iso + 1/tau_gb + 1/tau_4ph + ...,
      combining all scattering mechanisms for computing total thermal
      conductivity. Validate against temperature-dependent kappa measurements
- [x] **119.6.4.6** Implement thermal conductivity tensor for anisotropic
      materials: full 3x3 kappa_ij, with principal axes and eigenvalues, for
      layered materials (graphite: kappa_in-plane >> kappa_cross-plane),
      hexagonal crystals, etc.

#### 119.6.5 Four-Phonon Scattering

- [x] **119.6.5.1** Implement fourth-order displacement scheme: generate triple-
      displacement configurations for extracting Phi_4(kappa alpha, kappa'
      alpha', kappa'' alpha'', kappa''' alpha''') via finite differences, with
      cutoff-based quartet selection
- [x] **119.6.5.2** Implement fourth-order force constant extraction (Rust):
      compute Phi_4 from triply-displaced supercell forces, with symmetry
      reduction (permutation symmetry of 4 indices + space group operations)
- [x] **119.6.5.3** Implement four-phonon scattering rates (Rust):
      1/tau_4ph_lambda from all allowed four-phonon processes (lambda <->
      lambda' + lambda'' + lambda''' and lambda + lambda' <-> lambda'' +
      lambda'''), with energy and crystal momentum conservation. Computationally
      intensive — requires efficient parallelization
- [x] **119.6.5.4** Implement four-phonon contribution to thermal conductivity:
      include 1/tau_4ph in the BTE solution alongside three-phonon scattering.
      Critical for materials where four-phonon scattering is important: BAs
      (suppresses kappa from ~3000 to ~1300 W/mK), diamond at high T, strongly
      anharmonic systems

#### 119.6.6 Beyond Particle Picture

- [x] **119.6.6.1** Implement Wigner transport equation: unified wave-particle
      phonon transport including off-diagonal (coherent) contributions to
      thermal conductivity that are missing from the Peierls-Boltzmann approach.
      Important for complex crystals with many atoms per unit cell where
      inter-branch coherences contribute to heat transport
- [x] **119.6.6.2** Implement spectral thermal conductivity kappa(omega):
      frequency-resolved thermal conductivity for comparison with pump-probe
      experimental data and for identifying which phonon frequency ranges
      dominate heat transport
- [x] **119.6.6.3** Implement ballistic-to-diffusive crossover model:
      interpolation between ballistic transport (L << Lambda_mfp) and diffusive
      transport (L >> Lambda_mfp) using the Fuchs-Sondheimer or
      McKelvey-Shockley frameworks for nanostructure thermal modeling

#### 119.6.7 Thermal Transport Analysis & Visualization

- [x] **119.6.7.1** Implement spectral thermal conductivity decomposition:
      kappa(omega) — contribution to thermal conductivity from phonons in each
      frequency interval d\*omega, for identifying which phonon frequencies
      dominate heat transport and comparing with frequency-domain
      thermoreflectance measurements
- [x] **119.6.7.2** Implement directional thermal conductivity analysis: kappa
      along specific crystallographic directions for anisotropic crystals, polar
      plots of kappa(theta,phi), and principal thermal conductivity axes for
      triclinic/monoclinic systems where principal axes may not align with
      crystal axes
- [x] **119.6.7.3** Implement thermal conductivity accumulation function:
      kappa(Lambda_max) and kappa(omega_max) accumulation functions showing what
      fraction of thermal conductivity comes from phonons with mean free path
      below Lambda_max or frequency below omega_max. Critical for predicting
      size-dependent kappa in nanostructures and thin films
- [x] **119.6.7.4** Implement phonon mean free path spectrum: histogram of
      phonon mean free paths Lambda_lambda weighted by thermal conductivity
      contribution, identifying characteristic length scales for
      ballistic-to-diffusive transition
- [x] **119.6.7.5** Implement thermal conductivity convergence report: automated
      report comparing RTA, iterative (5, 10, 20, 50 iterations), and direct BTE
      solutions, with q-mesh convergence analysis, interaction cutoff
      convergence, and uncertainty estimates

---

### 119.7 Electron-Phonon Coupling (`@kalika/electron-phonon`)

#### 119.7.1 Library Scaffolding

- [x] **119.7.1.1** Create `libs/kalika/electron-phonon/` with `package.json`,
      `project.json`, `tsconfig.json`, and `src/index.ts`. Register
      `@kalika/electron-phonon` in `tsconfig.base.json`
- [x] **119.7.1.2** Create Rust crate `libs/kalika/electron-phonon/crate/` for
      matrix element evaluation, Wannier interpolation, and Eliashberg kernel
      assembly

#### 119.7.2 Electron-Phonon Matrix Elements

- [x] **119.7.2.1** Implement electron-phonon matrix element definition:
      g*{mn,nu}(k,q) = <psi*{m,k+q}| dV*SCF/du*{q,nu} |psi\_{n,k}> where
      dV_SCF/du is the self-consistent change in potential due to phonon mode nu
      at wavevector q, and psi are Bloch states. Parse from DFPT output or
      compute from finite displacement frozen-phonon approach
- [x] **119.7.2.2** Implement deformation potential extraction: for
      long-wavelength acoustic phonons, extract the deformation potential
      constant D = lim\_{q->0} g(k,q) * sqrt(2*M\*omega_q) / |q|, which
      characterizes electron-phonon coupling in the parabolic band
      approximation. Compute for each band extremum (CBM, VBM)
- [x] **119.7.2.3** Implement Froehlich coupling for polar materials:
      g_Froehlich(q) = i * (e^2/(epsilon_0*V))^{1/2} _ (1/epsilon_infinity -
      1/epsilon_0)^{1/2} _ sqrt(hbar/(2*M*omega_LO)) * (4*pi\*omega_LO)^{1/2} /
      |q| for long-wavelength LO phonons, with proper screening and multi-mode
      generalization
- [x] **119.7.2.4** Implement Wannier interpolation of electron-phonon matrix
      elements (Rust): transform g*{mn,nu}(k,q) from Bloch to Wannier
      representation g*{mn,nu}(R_e,R_p), interpolate to arbitrary (k,q) points
      via double Fourier transform — the EPW (Electron-Phonon using Wannier)
      approach enabling ultradense sampling from coarse DFT/DFPT grids
- [x] **119.7.2.5** Implement polar correction for Wannier-interpolated vertex:
      add back the long-range Froehlich component to the interpolated matrix
      element, which was removed before Wannier transformation (short-range part
      only is smooth enough for Wannier interpolation) and must be restored
      analytically at each target (k,q)

#### 119.7.3 Eliashberg Spectral Function

- [x] **119.7.3.1** Implement Eliashberg spectral function: alpha^2*F(omega) =
      (1/N_F) * sum*{k,k',nu} |g*{kk',nu}|^2 _ delta(epsilon_k - E_F) _
      delta(epsilon*k' - E_F) \* delta(omega - omega*{k'-k,nu}) — the phonon DOS
      weighted by electron-phonon coupling strength, computed by dense k,q
      integration using tetrahedron method or Gaussian broadening
- [x] **119.7.3.2** Implement electron-phonon coupling constant: lambda = 2 *
      integral_0^infinity [alpha^2*F(omega) / omega] d\*omega, the dimensionless
      measure of total electron-phonon coupling strength. Decompose into
      mode-resolved lambda_nu and q-resolved lambda(q)
- [x] **119.7.3.3** Implement transport spectral function: alpha^2\*F_tr(omega)
      with transport-weighted matrix elements (velocity factors included), for
      computing resistivity and other transport properties rather than
      superconductivity
- [x] **119.7.3.4** Implement nested Fermi surface integration: efficient
      double- delta sampling on the Fermi surface for alpha^2\*F(omega), using
      adaptive tetrahedron method or random sampling with importance weighting,
      converging to accurate results with tractable q-point counts
- [x] **119.7.3.5** Implement phonon linewidths from electron-phonon coupling:
      gamma*{q,nu} = 2*pi*omega*{q,nu} _ sum*{k,mn} |g*{mn,nu}(k,q)|^2 _
      delta(epsilon*{m,k+q} - E_F) \* delta(epsilon*{n,k} - E_F), the Kohn
      anomaly contribution to phonon linewidths, pronounced near Fermi surface
      nesting vectors

#### 119.7.4 Band Gap Renormalization

- [x] **119.7.4.1** Implement Fan-Migdal self-energy: Sigma^FM*{nk}(T) =
      sum*{m,nu,q} |g*{mn,nu}(k,q)|^2 \* [(n*{q,nu} + f*{m,k+q}) /
      (epsilon*{nk} - epsilon*{m,k+q} - omega*{q,nu} + i*eta) + (n*{q,nu} + 1 -
      f*{m,k+q}) / (epsilon*{nk} - epsilon*{m,k+q} + omega\_{q,nu} + i*eta)] for
      temperature-dependent electronic self-energy from electron-phonon
      interaction, giving band gap renormalization Delta_E_gap(T)
- [x] **119.7.4.2** Implement Debye-Waller self-energy: Sigma^DW\_{nk}(T) from
      the second-order electron-phonon interaction (two-phonon term), which
      combined with Fan-Migdal gives the total band gap renormalization. Compute
      via rigid-ion approximation or full DFPT second-order
- [x] **119.7.4.3** Implement zero-point renormalization: Delta_E_gap(T=0) from
      zero-point motion of atoms, typically reducing semiconductor band gaps by
      50-200 meV (e.g., diamond: -370 meV). Compare with experiment and with
      Allen-Heine-Cardona theory
- [x] **119.7.4.4** Implement adiabatic vs. non-adiabatic approaches: compare
      static (adiabatic) renormalization from frozen-phonon supercells with
      dynamic (non-adiabatic) result from Fan-Migdal/Debye-Waller, quantifying
      non-adiabatic corrections important for light elements (H, Li)

#### 119.7.5 Electron-Phonon Transport

- [x] **119.7.5.1** Implement carrier mobility from electron-phonon BTE: solve
      the linearized Boltzmann equation for electrons with phonon scattering
      1/tau*{nk} = (2*pi/hbar) * sum*{m,nu,q} |g|^2 _ [(n+1-f') _
      delta(epsilon - epsilon' - omega) + (n+f') _ delta(epsilon - epsilon' +
      omega)] to obtain mobility mu\_{alpha,beta}(T) = e _ sum*{nk} v*{nk,alpha}
      _ F\_{nk,beta} _ (-df/depsilon) for each carrier type
- [x] **119.7.5.2** Implement iterative BTE for electrons: beyond SERTA
      (self-energy relaxation time approximation), solve the full linearized BTE
      iteratively including the scattering-in term, analogous to phonon
      iterative BTE. Yields more accurate mobility for polar materials where
      forward scattering is important
- [x] **119.7.5.3** Implement electrical resistivity: rho(T) = 1/(n*e^2/m_eff) *
      integral [alpha^2*F_tr(omega) * ...] from the transport Eliashberg
      function, recovering the Bloch-Grueneisen formula at low T (rho ~ T^5) and
      linear T dependence at high T
- [x] **119.7.5.4** Implement mass enhancement from electron-phonon coupling:
      effective mass m* = m_band * (1 + lambda_nk) for carriers near the Fermi
      level, with mode-resolved and q-resolved decomposition. Important for
      specific heat, de Haas-van Alphen, and ARPES interpretation
- [x] **119.7.5.5** Implement Hall mobility and Hall factor: compute the Hall
      coefficient R_H and Hall mobility mu_H = R_H \* sigma including the energy
      dependence of the scattering rate, which introduces a Hall factor r_H =
      mu_H / mu_drift different from unity

#### 119.7.6 Advanced Electron-Phonon Analysis

- [x] **119.7.6.1** Implement Kohn anomaly detection: scan phonon dispersion for
      anomalous dips/kinks at wavevectors q connecting nested Fermi surface
      regions (2\*k_F for 1D, nesting vectors for quasi-2D materials), where
      enhanced electron-phonon coupling softens phonon frequencies and enhances
      linewidths
- [x] **119.7.6.2** Implement electron-phonon coupling strength decomposition:
      lambda decomposed by phonon branch, by q-point, by electronic band, and by
      atom — identifying which phonon modes and which electronic states
      contribute most to superconductivity. Plot lambda(q) on the Brillouin zone
- [x] **119.7.6.3** Implement nesting function: chi*0(q) = sum_k
      delta(epsilon_k) \* delta(epsilon*{k+q}), the bare electronic
      susceptibility at the Fermi level, identifying Fermi surface nesting
      vectors that enhance electron- phonon coupling and may drive CDW or
      superconducting instabilities
- [x] **119.7.6.4** Implement electron self-energy spectral function: A(k,omega)
      from the electron-phonon self-energy, showing kink features at phonon
      energies visible in ARPES (angle-resolved photoemission), with mass
      enhancement lambda_k from the slope of Re[Sigma] at E_F
- [x] **119.7.6.5** Implement Seebeck coefficient from electron-phonon: S(T) =
      -(pi^2*k_B^2*T)/(3*e) * d*ln(sigma(epsilon))/d*epsilon |\_{E_F} with
      energy-dependent conductivity sigma(epsilon) from electron-phonon
      scattering rates, for thermoelectric applications
- [x] **119.7.6.6** Implement superconducting gap symmetry analysis: determine
      gap symmetry (s-wave, d-wave, p-wave, extended s-wave) from the
      k-dependence of the electron-phonon coupling vertex on the Fermi surface,
      by solving the linearized gap equation in each symmetry channel and
      comparing eigenvalues

---

### 119.8 Eliashberg Theory of Superconductivity (`@kalika/eliashberg`)

#### 119.8.1 Library Scaffolding

- [x] **119.8.1.1** Create `libs/kalika/eliashberg/` with `package.json`,
      `project.json`, `tsconfig.json`, and `src/index.ts`. Register
      `@kalika/eliashberg` in `tsconfig.base.json`
- [x] **119.8.1.2** Create Rust crate `libs/kalika/eliashberg/crate/` for
      self-consistent Eliashberg equation solver on the imaginary axis, analytic
      continuation, and tunneling DOS computation

#### 119.8.2 Isotropic Eliashberg Equations

- [x] **119.8.2.1** Implement McMillan-Allen-Dynes T_c formula: T_c =
      (omega_log/1.2) _ exp(-1.04_(1+lambda) / (lambda - mu*(1+0.62*lambda)))
      with logarithmic average frequency omega_log = exp((2/lambda) * integral
      [alpha^2*F(omega)/omega * ln(omega)] d*omega) and strong-coupling
      corrections (f_1, f_2 factors). Quick T_c estimate before solving full
      Eliashberg equations
- [x] **119.8.2.2** Implement Coulomb pseudopotential: mu* = mu / (1 + mu *
      ln(E_F/omega_max)) (Morel-Anderson), where mu = N(E_F) _ V_C is the bare
      Coulomb repulsion and omega_max is a phonon frequency cutoff. Typical
      values mu_ = 0.10-0.15. Allow user specification or estimation from
      electronic structure
- [x] **119.8.2.3** Implement isotropic Eliashberg equations on imaginary axis
      (Rust): self-consistently solve Z(i*omega_n) = 1 + (pi*T/omega*n) \*
      sum*{n'} lambda(omega*n - omega_n') * omega_n' / sqrt(omega_n'^2 +
      Delta^2(i*omega_n')) and Delta(i*omega_n) * Z(i*omega_n) = pi*T \*
      sum*{n'} [lambda(omega_n - omega_n') - mu*] * Delta(i*omega_n') /
      sqrt(omega_n'^2 + Delta^2(i*omega_n')) where lambda(nu) = 2*integral
      [alpha^2*F(omega)*omega / (omega^2 + nu^2)] d*omega and omega_n =
      (2n+1)*pi\*T are fermionic Matsubara frequencies. Iterate until
      self-consistency (|Delta_new - Delta_old| < 10^{-6} meV)
- [x] **119.8.2.4** Implement Matsubara frequency summation: handle the
      convergence of Matsubara sums — include enough frequencies (typically
      N_Matsubara ~ 10*omega_max/(2*pi\*T)) and apply tail corrections for slow
      convergence of the kernel lambda(omega_n - omega_n')
- [x] **119.8.2.5** Implement T_c determination from Eliashberg: solve the
      linearized gap equation (Delta -> 0 limit) as function of temperature,
      finding the highest T where a non-trivial solution exists. Use bisection
      in T with linearized Eliashberg at each T
- [x] **119.8.2.6** Implement gap function Delta(T): solve full nonlinear
      Eliashberg equations at each temperature from T=0 to T_c, tracking the gap
      magnitude Delta_0(T) = Delta(i*omega_0, T) and the full
      frequency-dependent gap function, comparing with BCS ratio
      2*Delta_0/(k_B\*T_c) = 3.53 (weak coupling) vs. strong-coupling deviations

#### 119.8.3 Analytic Continuation & Real-Axis Properties

- [x] **119.8.3.1** Implement Pade analytic continuation: continue
      Delta(i*omega_n) and Z(i*omega_n) from imaginary to real frequency axis
      using Pade approximants, to obtain the retarded quantities Delta(omega +
      i*delta) and Z(omega + i*delta) needed for tunneling DOS and spectral
      properties
- [x] **119.8.3.2** Implement real-axis Eliashberg equations: directly solve
      Eliashberg equations on the real frequency axis (more numerically
      demanding but avoids analytic continuation artifacts), with careful
      treatment of principal value integrals and delta function contributions
- [x] **119.8.3.3** Implement tunneling density of states: N_s(omega)/N_0 =
      Re[omega / sqrt(omega^2 - Delta^2(omega))] from the real-axis gap
      function. Compare with experimental tunneling spectra (STM,
      point-contact). Identify strong-coupling features (dips/bumps in dI/dV
      from phonon structure)
- [x] **119.8.3.4** Implement superconducting specific heat: C_s(T) from the
      Eliashberg solution, including the specific heat jump Delta*C/C_n at T_c
      (BCS value = 1.43, strong-coupling values can be much larger) and
      exponential low-T behavior C_s ~ exp(-Delta_0/(k_B*T))

#### 119.8.4 Anisotropic & Multiband Eliashberg

- [x] **119.8.4.1** Implement anisotropic Eliashberg equations: k-dependent gap
      Delta*{nk}(i\*omega_n) solved self-consistently with k-dependent
      electron-phonon coupling lambda*{nk,mk'} and renormalization Z\_{nk}, on a
      discretized Fermi surface. Captures gap anisotropy critical for MgB2,
      NbSe2, and unconventional superconductors
- [x] **119.8.4.2** Implement multiband Eliashberg: for systems with
      well-separated Fermi surface sheets (e.g., MgB2 sigma and pi bands), solve
      coupled Eliashberg equations with inter-band and intra-band coupling
      constants lambda*{ij} and mu\**{ij}. Compute multiple gap magnitudes and
      distinct T_c contributions
- [x] **119.8.4.3** Implement MgB2 benchmark: validate multiband Eliashberg
      against known MgB2 results — two gaps Delta_sigma ~ 7 meV and Delta_pi ~
      2.5 meV, T_c ~ 39 K, with literature alpha^2\*F(omega) for sigma-sigma,
      sigma-pi, and pi-pi channels
- [x] **119.8.4.4** Implement anisotropic gap visualization: plot Delta\_{nk} on
      the Fermi surface (color-mapped gap magnitude), showing gap anisotropy
      pattern and nodal structure if present

#### 119.8.5 Strong-Coupling & Anharmonic Effects

- [x] **119.8.5.1** Implement strong-coupling corrections to T_c: beyond
      Allen-Dynes, compute shape-dependent corrections from the full
      alpha^2\*F(omega) spectrum that affect T_c when lambda > 1.5, including
      the omega_2/omega_log ratio and spectral shape factors
- [x] **119.8.5.2** Implement anharmonic phonon effects on T_c: use temperature-
      dependent phonon frequencies omega(T) and linewidths from Section 119.5 to
      compute temperature-dependent alpha^2\*F(omega,T) and self-consistently
      solve Eliashberg equations with the renormalized phonon spectrum.
      Important for H3S, LaH10, and other high-T_c hydrides
- [x] **119.8.5.3** Implement isotope effect exponent: alpha_iso where T_c ~
      M^{-alpha_iso}, computed from the mass dependence of alpha^2*F(omega)
      (classical BCS: alpha = 0.5, deviations indicate strong coupling or mu*
      effects). Compare with experimental isotope data

#### 119.8.6 Superconducting Properties

- [x] **119.8.6.1** Implement London penetration depth: lambda_L(T) from the
      superfluid density rho_s(T) obtained from the Eliashberg gap function,
      lambda_L = sqrt(m*c^2/(4*pi*n_s*e^2)), tracking the BCS temperature
      dependence 1/lambda_L^2 ~ 1 - (T/T_c)^4 and strong-coupling deviations
- [x] **119.8.6.2** Implement upper critical field H*c2(T): from the linearized
      Eliashberg equation in a magnetic field (Helfand-Werthamer theory),
      compute H_c2(0) and the slope dH_c2/dT|*{T_c}, including strong-coupling
      and Pauli paramagnetic limiting effects
- [x] **119.8.6.3** Implement superconducting coherence length: xi_0 =
      hbar*v_F/(pi*Delta_0) from the Eliashberg gap, and temperature-dependent
      xi(T) = xi_0/sqrt(1-(T/T_c)), with Ginzburg-Landau parameter kappa_GL =
      lambda_L/xi determining type-I vs. type-II behavior
- [x] **119.8.6.4** Implement thermodynamic critical field: H_c(T) from the
      condensation energy Delta_F = H_c^2/(8\*pi), computed from the difference
      between superconducting and normal-state free energies from Eliashberg
- [x] **119.8.6.5** Implement electron-phonon renormalized specific heat
      coefficient: gamma_n = (pi^2/3) _ k_B^2 _ N(E_F) \* (1 + lambda), the
      Sommerfeld coefficient enhanced by electron-phonon mass renormalization,
      for comparison with low-temperature specific heat measurements

---

### 119.9 Polaron Physics (`@kalika/polarons`)

#### 119.9.1 Library Scaffolding

- [x] **119.9.1.1** Create `libs/kalika/polarons/` with `package.json`,
      `project.json`, `tsconfig.json`, and `src/index.ts`. Register
      `@kalika/polarons` in `tsconfig.base.json`
- [x] **119.9.1.2** Create Rust crate `libs/kalika/polarons/crate/` for
      variational polaron calculations and path-integral Monte Carlo

#### 119.9.2 Froehlich Polaron

- [x] **119.9.2.1** Implement Froehlich coupling constant: alpha_F =
      (e^2/(4*pi*epsilon_0)) _ (1/epsilon_infinity - 1/epsilon_0) _
      sqrt(m_b/(2*hbar*omega_LO)) \* (1/hbar) where m_b is the band effective
      mass, epsilon_infinity and epsilon_0 are high-frequency and static
      dielectric constants, and omega_LO is the LO phonon frequency. Compute
      alpha_F for multi-mode generalizations
- [x] **119.9.2.2** Implement weak-coupling perturbative polaron: Rayleigh-
      Schroedinger perturbation theory for alpha_F << 1 — polaron energy E_p =
      -alpha_F * hbar*omega_LO, effective mass m* = m_b * (1 + alpha_F/6), valid
      for alpha_F < 1
- [x] **119.9.2.3** Implement Feynman variational polaron (Rust): minimize the
      Feynman path-integral upper bound to the polaron free energy F(v,w,beta)
      where v and w are variational parameters of the model system (electron
      coupled to fictitious particle by harmonic spring), valid for all coupling
      strengths. Compute polaron energy, effective mass, and radius
- [x] **119.9.2.4** Implement polaron effective mass: m\*/m_b from the Feynman
      variational solution — exact in weak-coupling limit (1 + alpha/6) and
      correct exponential growth in strong-coupling limit. Tabulate as function
      of alpha_F
- [x] **119.9.2.5** Implement Onsager-Hellwarth-Biaggio polaron mobility: mu(T)
      from the Feynman-Hellwarth-Iddings-Platzman (FHIP) theory extended to
      finite temperature, including both band-like (coherent) and hopping
      (incoherent) contributions. Compare with Kadanoff-Boltzmann transport
- [x] **119.9.2.6** Implement polaron optical absorption: sigma(omega) from the
      memory function formalism — Reststrahlen band modified by polaron effects,
      plus polaron internal excitation peaks. Compare with experimental
      mid-infrared absorption data

#### 119.9.3 Holstein Polaron

- [x] **119.9.3.1** Implement Holstein model Hamiltonian: H = -t * sum\_{<ij>}
      c_i^dag*c_j + omega_0 * sum_i b_i^dag*b_i + g * sum_i c_i^dag*c_i \*
      (b_i^dag + b_i) — electrons coupled to local (Einstein) phonons on a
      lattice, the canonical small-polaron model
- [x] **119.9.3.2** Implement exact diagonalization for Holstein model: Lanczos
      diagonalization on truncated phonon Hilbert space for small 1D/2D
      clusters, computing ground state energy, polaron bandwidth, and phonon
      cloud structure as function of g/t and omega_0/t
- [x] **119.9.3.3** Implement Lang-Firsov transformation: canonical
      transformation eliminating the linear coupling, yielding the small-polaron
      Hamiltonian with exponentially renormalized hopping t_eff = t \*
      exp(-g^2/omega_0^2) and polaron binding energy E_p = g^2/omega_0. Valid in
      strong-coupling limit g >> t
- [x] **119.9.3.4** Implement polaron crossover analysis: track polaron
      properties (effective mass, radius, lattice distortion pattern) across the
      weak-to-strong coupling crossover, identifying the self-trapping
      transition where the polaron collapses from large (extends over many
      sites) to small (localized on one site)

#### 119.9.4 Bipolaron

- [x] **119.9.4.1** Implement bipolaron formation criterion: two polarons can
      bind into a bipolaron when the phonon-mediated attraction exceeds the
      Coulomb repulsion — compute bipolaron binding energy E_bp - 2\*E_p as
      function of coupling strength and Coulomb parameter U/omega_0. Map the
      bipolaron phase diagram
- [x] **119.9.4.2** Implement bipolaron effective mass and radius: from
      variational or exact diagonalization, compute the bipolaron center-of-mass
      effective mass (much heavier than single polaron) and internal pair size,
      relevant for bipolaronic superconductivity scenarios
- [x] **119.9.4.3** Implement bipolaron Bose-Einstein condensation temperature:
      T_BEC = (2*pi*hbar^2/(m_bp*k_B)) * (n_bp/zeta(3/2))^{2/3} for 3D bipolaron
      gas, providing an upper bound on T_c in the bipolaronic superconductivity
      scenario

#### 119.9.5 Polaron Transport & Spectroscopy

- [x] **119.9.5.1** Implement polaron hopping rate (small polaron): Gamma_hop =
      (t^2/hbar) * sqrt(pi/(2*E_p*k_B*T)) * exp(-E_a/(k_B*T)) where E_a = (E_p -
      2*t)^2 / (4*E_p) is the activation energy for thermally activated hopping
      (Marcus-like theory). Compute mobility mu_hop = e*a^2*Gamma_hop/(k_B\*T)
      with lattice constant a
- [x] **119.9.5.2** Implement polaron band-to-hopping crossover: identify the
      crossover temperature T* where coherent band transport (mu ~ T^{-3/2})
      transitions to incoherent hopping transport (mu ~
      T^{-1}*exp(-E_a/k_B\*T)), by computing both contributions and finding
      their intersection
- [x] **119.9.5.3** Implement polaron photoemission spectrum: compute the
      angle-resolved photoemission spectral function A(k,omega) for a polaron,
      showing the quasiparticle peak with reduced weight Z_p < 1 and the
      multi-phonon sideband structure, for comparison with ARPES on polaronic
      materials (SrTiO3, TiO2, manganites)
- [x] **119.9.5.4** Implement multi-phonon polaron: generalization beyond single
      LO-mode Froehlich coupling to coupling with multiple phonon branches
      (acoustic deformation potential + optical Froehlich + intervalley),
      computing the total polaron self-energy and effective mass from all
      coupling channels

---

### 119.10 Phonons in Special Systems (`@kalika/phonons-special`)

#### 119.10.1 Library Scaffolding

- [x] **119.10.1.1** Create `libs/kalika/phonons-special/` with `package.json`,
      `project.json`, `tsconfig.json`, and `src/index.ts`. Register
      `@kalika/phonons-special` in `tsconfig.base.json`

#### 119.10.2 Surface Phonons

- [x] **119.10.2.1** Implement slab model constructor: given bulk crystal
      structure and surface orientation (Miller indices), generate a slab
      supercell with specified thickness (number of layers) and vacuum spacing,
      with proper termination and optional surface relaxation
- [x] **119.10.2.2** Implement surface phonon dispersion: compute phonon bands
      for the slab geometry, project onto surface and bulk-like modes using
      layer- resolved weights, identify surface-localized modes (Rayleigh wave,
      Fuchs- Kliewer phonon for polar surfaces)
- [x] **119.10.2.3** Implement Rayleigh wave velocity: extract the Rayleigh
      surface acoustic wave velocity v_R from the slope of the lowest
      surface-localized acoustic branch, verify Rayleigh equation det|...| = 0
      relating v_R to bulk elastic constants
- [x] **119.10.2.4** Implement surface phonon DOS: surface-projected density of
      states for studying surface thermodynamic properties and vibrational
      entropy of surfaces (relevant for surface energy and crystal shape)

#### 119.10.3 Phonons in 2D Materials

- [x] **119.10.3.1** Implement 2D phonon dispersion: phonon calculation for
      monolayer materials (graphene, MoS2, hBN) with proper handling of the
      out-of-plane acoustic branch (ZA) that has quadratic dispersion omega ~
      q^2 at Gamma (not linear like in-plane LA/TA), arising from rotational
      invariance of the 2D sheet
- [x] **119.10.3.2** Implement flexural mode thermal conductivity: special
      treatment of ZA phonons in 2D thermal transport — the quadratic dispersion
      gives divergent density of states at omega=0, requiring careful
      regularization and inclusion of four-phonon scattering (or finite sample
      size) to obtain finite kappa. Responsible for anomalously high kappa of
      graphene
- [x] **119.10.3.3** Implement layer-dependent phonon properties: compute phonon
      evolution from monolayer to bilayer to few-layer to bulk, tracking
      interlayer shear and breathing modes (low-frequency rigid-layer modes),
      Davydov splitting of optical modes, and thermal conductivity thickness
      dependence
- [x] **119.10.3.4** Implement 2D phonon scattering: three-phonon scattering
      rates adapted for 2D Brillouin zone integration (2D q-mesh), with correct
      2D momentum conservation and density of states normalization per unit area
      rather than volume

#### 119.10.4 Phonons at Interfaces

- [x] **119.10.4.1** Implement thermal interface resistance (Kapitza
      resistance): acoustic mismatch model (AMM) — R*K = 1/G_K where thermal
      interface conductance G_K = (1/4) * sum_j integral [hbar*omega \*
      v*{j,perp} _ n'(omega) _ t_j(theta)] d*omega for phonon transmission t_j
      across the interface, with acoustic impedance matching Z = rho*v
- [x] **119.10.4.2** Implement diffuse mismatch model (DMM): G_K from phonon DOS
      mismatch between two materials, assuming complete diffuse scattering at
      the interface (loss of phonon memory), giving temperature-dependent R_K
- [x] **119.10.4.3** Implement atomistic Green's function method: compute
      frequency- dependent phonon transmission function T(omega) through an
      interface from the retarded Green's function of the junction region
      coupled to semi-infinite leads, giving spectral thermal conductance
      g(omega)

#### 119.10.5 Phonons in Alloys and Disordered Systems

- [x] **119.10.5.1** Implement virtual crystal approximation (VCA) for phonons:
      mass-averaged dynamical matrix for A*xB*{1-x} alloys, with concentration-
      weighted atomic masses and linearly interpolated force constants. Quick
      estimate of alloy phonon dispersion
- [x] **119.10.5.2** Implement special quasirandom structure (SQS) phonons:
      generate SQS supercells that mimic random alloy pair correlations, compute
      phonon dispersion by unfolding supercell bands to primitive cell Brillouin
      zone, resolving alloy-broadened phonon spectral function
- [x] **119.10.5.3** Implement coherent potential approximation (CPA) for
      phonons: self-consistent single-site approximation for the phonon Green's
      function in a random alloy, giving complex phonon self-energy (frequency
      shift + broadening from disorder), beyond VCA
- [x] **119.10.5.4** Implement dynamical structure factor for amorphous
      materials: S(q,omega) = sum_s |sum_kappa (b_kappa/sqrt(M_kappa)) *
      exp(i*q*R_kappa) * (q . e_s(kappa))|^2 \* delta(omega - omega_s) for
      comparison with inelastic neutron scattering (INS) or inelastic X-ray
      scattering (IXS) experiments on glasses and liquids

#### 119.10.6 Raman & IR Spectroscopy

- [x] **119.10.6.1** Implement symmetry analysis for optical activity: using
      irreducible representations of the point group, classify each Gamma-point
      phonon mode as Raman-active (even parity, transforms as quadratic
      functions x^2, xy, ...), IR-active (odd parity, transforms as x, y, z),
      both, or silent, applying selection rules for each crystal class
- [x] **119.10.6.2** Implement Raman tensor computation: for each Raman-active
      mode, compute the Raman susceptibility tensor R*{alpha,beta,nu} =
      d\*chi*{alpha,beta}/du\_{nu} (derivative of electric susceptibility with
      respect to phonon displacement), from DFPT or finite difference of
      dielectric tensor. Predict Raman intensities for different scattering
      geometries (backscattering, right-angle) and polarization configurations
- [x] **119.10.6.3** Implement IR absorption intensity: for each IR-active mode,
      compute oscillator strength S_nu = (1/V) _ |sum_kappa Z_\_kappa .
      e_nu(kappa) / sqrt(M_kappa)|^2 proportional to the infrared absorption
      cross-section. Generate simulated IR spectrum I(omega) as sum of
      Lorentzians centered at IR-active mode frequencies with computed
      oscillator strengths
- [x] **119.10.6.4** Implement Raman spectrum simulation: generate synthetic
      Raman spectrum including temperature-dependent Stokes/anti-Stokes
      intensities (ratio exp(hbar*omega/(k_B*T))), polarization dependence from
      Raman tensor, and line shapes (Lorentzian broadened by anharmonic
      linewidths from 119.5.3.5)
- [x] **119.10.6.5** Implement resonance Raman enhancement: when incident photon
      energy approaches an electronic transition, the Raman cross-section is
      resonantly enhanced — compute the enhancement factor from the electron-
      phonon coupling matrix elements (119.7.2) and electronic transition
      energies, for modes coupled to the resonant electronic state
- [x] **119.10.6.6** Implement second-order Raman spectrum: two-phonon Raman
      scattering involving combinations and overtones of phonons across the
      Brillouin zone (not just Gamma point), computed from the two-phonon DOS
      weighted by second-order Raman susceptibility. Important for diamond, Si,
      and Ge where second-order features are prominent

#### 119.10.7 Inelastic Neutron & X-ray Scattering

- [x] **119.10.7.1** Implement one-phonon coherent scattering cross-section:
      d^2*sigma/(d*Omega*d*E) for inelastic neutron scattering (INS), computed
      from phonon eigenvectors and neutron scattering lengths, with Debye-Waller
      factor exp(-2W). Generate simulated S(Q,omega) maps for direct comparison
      with triple-axis or time-of-flight spectrometer data
- [x] **119.10.7.2** Implement inelastic X-ray scattering (IXS) cross-section:
      similar to INS but with atomic form factors f(Q) instead of neutron
      scattering lengths, for comparison with IXS beamline data. Important for
      small samples and high-pressure experiments where neutrons are impractical
- [x] **119.10.7.3** Implement powder-averaged phonon spectrum: orientationally
      averaged S(|Q|,omega) for polycrystalline samples, integrated over all
      Q-directions at fixed |Q|, as measured in powder INS experiments

#### 119.10.8 Phonons under External Conditions

- [x] **119.10.8.1** Implement pressure-dependent phonons: compute phonon
      dispersion at multiple pressures by applying hydrostatic strain to the
      crystal structure, re-computing force constants, and tracking frequency
      evolution omega(P). Identify pressure-induced soft modes signaling
      structural phase transitions
- [x] **119.10.8.2** Implement phonon instability under strain: apply biaxial or
      uniaxial strain to epitaxial thin films, compute phonon dispersion to
      detect strain-induced instabilities (ferroelectric soft modes in strained
      SrTiO3, CDW in strained TiSe2)
- [x] **119.10.8.3** Implement temperature-dependent effective phonons via SCPH:
      self-consistent phonon (SCP) method — compute temperature-dependent
      effective harmonic phonon frequencies by self-consistently including
      anharmonic corrections from the quartic term: omega*eff^2(q,s,T) =
      omega_0^2(q,s) + sum*{q's'} Phi_4 * (2*n(q's',T)+1) — capturing soft-mode
      hardening above phase transition temperatures
- [x] **119.10.8.4** Implement phonon renormalization at finite temperature
      (SSCHA): stochastic self-consistent harmonic approximation — sample
      configurations from the quantum thermal distribution, compute forces, and
      extract effective force constants that minimize the free energy. Captures
      quantum nuclear effects beyond classical molecular dynamics
- [x] **119.10.8.5** Implement phonon transport under magnetic field:
      modification of phonon scattering rates and thermal conductivity by
      magnetic field through spin-phonon coupling and magnon-phonon
      interactions, relevant for phonon Hall effect and thermal Hall
      conductivity kappa_xy in magnetic insulators

---

### 119.11 Testing & Validation (`@kalika/phonons`, all libraries)

#### 119.11.1 Unit Tests — Core Types & Utilities

- [x] **119.11.1.1** Write unit tests for q-point mesh generation: verify
      Monkhorst-Pack mesh symmetry (time-reversal, point group), correct number
      of irreducible q-points for FCC/BCC/HCP lattices, and high-symmetry path
      generation for all 14 Bravais lattices
- [x] **119.11.1.2** Write unit tests for Fourier interpolation: verify
      round-trip consistency (force constants -> D(q) -> force constants), D(q)
      Hermiticity, and correct phase convention
- [x] **119.11.1.3** Write unit tests for tetrahedron integration: verify
      against analytical DOS for simple models (1D chain, 3D Debye), convergence
      with mesh refinement, and Bloechl correction accuracy

#### 119.11.2 Integration Tests — Harmonic Phonons

- [x] **119.11.2.1** Validate Si phonon dispersion: compute phonons for Si
      (diamond structure) using published force constants, compare frequencies
      at Gamma, X, L, W against experimental values (e.g., Gamma optical = 15.53
      THz, X_1 = 12.32 THz) to within 5%
- [x] **119.11.2.2** Validate NaCl LO-TO splitting: compute phonons for NaCl
      with Born effective charges, verify LO-TO splitting at Gamma (LO ~ 8.0
      THz, TO ~ 4.9 THz), correct direction-dependent behavior
- [x] **119.11.2.3** Validate thermodynamic properties: for Si, compute C_v(T)
      and compare with experimental data — verify Dulong-Petit limit (C_v =
      3Nk_B = 24.94 J/mol/K at T >> Theta_D), T^3 low-T behavior, and Debye
      temperature Theta_D ~ 645 K

#### 119.11.3 Integration Tests — Anharmonic & Transport

- [x] **119.11.3.1** Validate Si thermal conductivity: compute kappa(300K) for
      natural Si using RTA and iterative BTE, compare with experimental value
      ~150 W/mK, verify RTA underestimates by ~10-20%
- [x] **119.11.3.2** Validate isotope effect on thermal conductivity: compute
      kappa for isotopically pure ^28Si vs. natural Si, verify enhancement
      factor ~1.5x at 300K, matching experimental observations
- [x] **119.11.3.3** Validate three-phonon linewidths: for Si, compare computed
      Gamma-point optical phonon linewidth with experimental Raman linewidth
      (~1.5 cm^-1 at 300K), verifying correct order of magnitude and temperature
      dependence

#### 119.11.4 Integration Tests — Electron-Phonon & Superconductivity

- [x] **119.11.4.1** Validate Pb Eliashberg spectral function: using published
      alpha^2\*F(omega) for Pb, compute lambda ~ 1.55 and T_c ~ 7.2 K from both
      McMillan formula and full Eliashberg equations, comparing with
      experimental T_c = 7.19 K
- [x] **119.11.4.2** Validate MgB2 two-gap superconductivity: using published
      multiband alpha^2\*F for MgB2, solve two-band Eliashberg to obtain
      Delta_sigma ~ 7 meV, Delta_pi ~ 2.5 meV, T_c ~ 39 K
- [x] **119.11.4.3** Validate Froehlich polaron: for alpha_F = 1, 3, 5, compare
      Feynman variational polaron energy and effective mass with exact
      diagrammatic Monte Carlo results (Mishchenko et al.)

#### 119.11.5 Rust Crate Tests

- [x] **119.11.5.1** Write Rust unit tests for dynamical matrix construction:
      verify Hermiticity D(q) = D(q)^dagger, time-reversal D(-q) = D(q)*, and
      correct eigenvalue count (3*N_atoms)
- [x] **119.11.5.2** Write Rust unit tests for three-phonon matrix elements:
      verify permutation symmetry V_3(1,2,3) = V_3(2,1,3) = ... and momentum
      conservation, compare with direct finite-difference check on small systems
- [x] **119.11.5.3** Write Rust unit tests for iterative BTE convergence: verify
      convergence criterion, monotonic approach to converged solution, and
      agreement with direct matrix inversion for small q-meshes
- [x] **119.11.5.4** Write Rust unit tests for Eliashberg solver: verify BCS
      limit (lambda -> 0: Delta_0 = 1.764*k_B*T_c, 2*Delta_0/(k_B*T_c) = 3.53),
      thermodynamic consistency (free energy minimum at self-consistent
      solution), and convergence with number of Matsubara frequencies

#### 119.11.6 Cross-Library Integration

- [x] **119.11.6.1** Test phonon-to-thermal-transport pipeline: force constants
      (119.2) -> three-phonon scattering (119.5) -> thermal conductivity
      (119.6), verifying data flow and unit consistency across libraries
- [x] **119.11.6.2** Test DFPT-to-electron-phonon pipeline: DFPT phonons (119.3)
      -> electron-phonon matrix elements (119.7) -> Eliashberg (119.8),
      verifying Wannier interpolation and spectral function computation
- [x] **119.11.6.3** Test QHA-to-phase-stability pipeline: phonons at multiple
      volumes (119.2) -> QHA thermodynamics (119.4) -> phase diagram (119.4.4),
      verifying Gibbs free energy construction and phase boundary detection

<!-- prettier-ignore-end -->
