Dark matter as a quantum wave, simulated two ways.
If dark matter is an ultralight boson (m ~ 10⁻²² eV), its de Broglie wavelength stretches across kiloparsecs — galaxies form solitonic cores wrapped in granular, interference-patterned halos. fdmsim attacks this physics from two directions at once: a differentiable spectral code that infers the boson mass from observables, and an adaptive-mesh code that resolves the cores from first principles. They meet in the middle.
Large scales, and the inverse problem: what boson mass does the universe imply?
A uniform-grid spectral Schrödinger–Poisson solver in JAX. Because it is fully differentiable, you can run it backwards — given a large-scale observable, gradient-descend onto the fuzzy-dark-matter mass that produced it.
Small scales, forward: resolve the solitonic core that uniform grids cannot reach.
An adaptive-mesh ELBDM code that refines exactly where the wavefunction is densest. It is the forward "truth" — the converged core–halo physics that the JAXiON inverse problem is calibrated against, reproduced honestly with in-progress items flagged.
The lanes are not parallel — they close a loop. GAMER resolves the core–halo relation from first principles; JAXiON paints that relation onto differentiable halos, builds the large-scale observable, and infers the mass back out. A closure test confirms the round-trip recovers the injected boson mass to ~1.3%.
The JAXiON lane — inferring the mass.
A uniform-grid, fully differentiable Schrödinger–Poisson solver. Its job is the large-scale forward atlas and, crucially, the inverse problem: gradient-descend from an observable onto the fuzzy-dark-matter boson mass. Each result below is a statement, its evidence, and an honest status.
FDM cosmic web forms from quantum fluctuations
✓ hero runTiny Gaussian fluctuations grow into the cosmic web, and the first soliton core condenses at a filament intersection. The 512³ double-precision hero run evolves a 1 h⁻¹Mpc box from z=127 to z=7; the 512³ / 1024³ / 2048³ toggle is a live convergence study. Initial conditions (CDM+FDM linear spectrum with a Zel'dovich phase) were built for this reproduction — JAXiON ships none.
Solitons are the FDM ground state — they assemble by wave mergers
✓ 3 simsCore–halo structure emerges from repeated wave mergers and condensation. Two solitons collide and interfere into one relaxed core; many solitons merge hierarchically into an idealized halo; and a soliton condenses spontaneously out of a turbulent granular sea (Bose–Einstein-like kinetic condensation).
FDM-specific dynamics
✓ 3 simsWave dark matter reshapes classical galactic dynamics. A soliton is tidally stripped into wave tails in an external potential; a moving soliton excites a trailing density wake that drags on it (dynamical friction in the Schrödinger–Poisson regime); and attractive self-interaction collapses a super-critical soliton in a 'bosenova'.
Baryons, stars & heating
✓ 5 simsFDM's granular fluctuations leave baryonic fingerprints. Granules gravitationally heat both an embedded isothermal gas and a stellar population; a black hole accretes ambient gas; soliton, gas and a star evolve together under mutual gravity; and two coupled axion fields share one gravity well — the full multi-physics coupling, each frame rendered on an L40S.
Uniform-grid core convergence is impossible
✓ quantifiedYou cannot resolve the soliton core on a uniform grid — and we measured exactly why. The fitted core radius simply tracks the cell size (~2 cells across an 8× resolution range) and the central density never plateaus. A converged uniform grid would need the hundreds-of-TB class. This is the empirical justification for adaptive mesh refinement and the entire lane split.
Differentiable FDM-mass inference
✓ validatedThe inverse problem works: the code recovers the boson mass to < 1.5%. Analytic gradients of the large-scale summary w.r.t. the mass match finite differences to ~10⁻⁶, and a closure test over many realizations recovers the injected m. Where the nonlinear forward model becomes chaotic and not cleanly differentiable, simulation-based inference (SBI) takes over and still closes.
Inference on real observables (prototypes)
✓ prototypes landPointed at real data proxies, the inference lands near the published constraints. Two independent observables, each a working prototype: the Lyman-α forest flux power (Obs-B) and Milky-Way satellite / subhalo counts (Obs-C).
The JAXiON program — how the results build.
A narrative, not a gallery: what we built, what we found, and how each result enabled the next. The throughline is a single question — can we infer the fuzzy-dark-matter boson mass from observables? — and the chain of work that answers it.
We built a differentiable Schrödinger–Poisson solver, ran a forward atlas with it, proved a uniform grid cannot converge the soliton core, then turned the solver around and used its gradients to infer the boson mass — first on synthetic closures, then on real-observable prototypes.
1 · buildA differentiable forward model
The foundation is a pseudo-spectral split-step Schrödinger–Poisson integrator written in JAX. Solving it forward reproduces the full phenomenology of wave dark matter — the 13-simulation atlas in the Results tab: a cosmological box collapsing into the cosmic web, solitons assembling by wave mergers, FDM-specific dynamics (tidal stripping, dynamical friction, bosenova collapse), and baryon/star coupling. Because the integrator is written in a differentiable framework, every one of those forward runs is also a function we can take gradients of.
2 · findUniform grids cannot converge the core
Running the convergence study — 512³ → 1024³ → 1536³ → 2048³ of a 1 Mpc box — surfaced the result that shaped the whole project. The fitted central density ρ_c keeps climbing at every resolution and never plateaus, while the core radius stays grid-locked at roughly two cells across. The soliton's size converges far faster than its peak density.
3 · invertDifferentiable mass inference, validated
With a trustworthy, unitary forward model, we turn it around. Reverse-mode autodiff backpropagates through the entire time-stepper to give ∂(large-scale summary)/∂m — the gradient of an observable with respect to the boson mass. The Results tab shows the closure: the analytic gradient matches finite differences to ~6×10⁻⁷, and over many realizations the injected mass is recovered to < 1.5% within 1σ. Where the nonlinear forward model turns chaotic and the gradient explodes, simulation-based inference takes over and the closure still passes.
4 · groundInference on real observables
The final step points the validated machinery at proxies for real data. Two independent observables, each a working prototype: the Lyman-α forest flux power (Obs-B), whose recovered posteriors land in the same regime as Rogers & Peiris 2021 (m₂₂ ≳ 20); and Milky-Way subhalo counts (Obs-C), where an injected m_true=29 gives a 95% lower bound m₂₂ ≳ 27.7 — consistent with Nadler et al. 2021 (m₂₂ > 29). Both charts are in the Results tab.
| grid | cells | precision | ρ_c | r_c | status |
|---|
The JAXiON method — split-step, differentiable.
JAXiON is a pseudo-spectral split-step integrator for the Schrödinger–Poisson system, written in JAX so the entire time-stepper is differentiable end-to-end. Here is exactly how it advances the wavefunction, and why that makes the inverse problem possible.
Fuzzy dark matter is a classical scalar field whose dynamics, in the non-relativistic limit, obey the Schrödinger–Poisson equations. JAXiON solves them on a periodic uniform grid using operator splitting in Fourier space.
The governing system
The complex field ψ evolves under its own self-gravity. The mass density is ρ = |ψ|², the gravitational potential Φ is sourced by the density fluctuation, and the field feels that potential:
The first equation has two pieces: a kinetic term (the Laplacian — quantum pressure / wave dispersion) and a potential term (gravity). The trick of split-step is that each piece is trivially solvable on its own — the kinetic part is diagonal in Fourier space, the potential part is diagonal in real space — so we alternate between them.
The split-step (Trotter) update
One time-step Δt is a symmetric kick–drift–kick (here half-kinetic / full-potential / half-kinetic), which is second-order accurate and, crucially, unitary — it conserves total mass exactly:
Because every operator is either a pure phase (modulus-preserving) or a unitary Fourier multiplier, the scheme conserves $\int|\psi|^{2}$ to machine precision — the |ΔL/L| = 0 over 301 checkpoints reported in Analysis. For cosmology the equations are written in comoving coordinates, with the scale factor a(t) absorbed into the propagators so the box co-expands with the universe.
Spectral accuracy, and its price
Differentiating ψ by multiplying $\hat\psi$ by $-k^{2}$ is spectrally accurate — no finite-difference truncation error — which is why the large-scale field and its power spectrum are clean. But the grid is uniform: resolution dx is the same everywhere. The soliton core is a tiny, ultra-dense feature, so a uniform grid is memory-bound — to halve dx you multiply total cells by 8. This is precisely why uniform-grid cores cannot converge (Analysis, step 2) and why the GAMER lane exists.
The differentiator: autodiff through time
The reason to write all of this in JAX is the inverse problem. Every step above is a differentiable primitive (FFTs, complex exponentials, element-wise products), so the whole time-stepper is one big differentiable function. Reverse-mode automatic differentiation backpropagates through every step of the evolution to compute the exact gradient of any final-state observable with respect to a parameter:
This $\partial\mathcal{O}/\partial m$ — the sensitivity of a large-scale observable to the boson mass — is what drives gradient-based and simulation-based inference. The forward solver and the inverse solver are the same code, run in two directions.
GPU-resident JAX gives spectral-accuracy forward physics and exact gradients for free. The cost is the uniform grid — which is exactly the limitation GAMER's adaptive mesh removes. GAMER (forward, resolves cores) ↔ JAXiON (inverse, infers m).
The GAMER lane — resolving the cores.
Where JAXiON's uniform grid can't reach. GAMER evolves the same fuzzy dark matter on an adaptive mesh (ELBDM) — the forward "truth" that resolves solitonic cores, and the source of the core–halo physics the JAXiON inverse problem is calibrated against. Each result below is a statement, its evidence, and an honest status.
The GAMER cosmic web (AMR ELBDM)
✓ forward runThe same wave dark matter, evolved on an adaptive mesh. GAMER's ELBDM solver grows the cosmic web from a Gaussian field, refining cells where the wavefunction is densest. This is the forward run whose densest peaks are then fit for solitons below.
Genuine Schive solitons
✓ validatedThe densest GAMER cores are real Schive solitons, not numerical artifacts. Fitting the Schive (2014) profile gives clean fits (residuals < 2.5%) and the soliton scaling holds: r_c ∝ ρ_c^−0.20 (Schive predicts −0.25), across 3 seeds.
Core–halo slope M_core ∝ M_halo^(1/3)
analysis in progressThe 2 Mpc box validates the solitons but is too narrow to pin the slope. Over only ~1.7 dex of halo mass the 3-seed fit gives a slope a = 0.04 ± 0.13 — consistent with 0, unable to confirm Schive's 1/3. The cause is geometric: too short a lever arm. The fix is a 20 Mpc zoom-in campaign for ≥3 dex of mass range.
FDM-vs-CDM halo mass function
qualitative · box-limitedThe ψDM high-mass suppression signature is visible — qualitatively. A matched FDM/CDM pair (same Gaussian field, same finder): CDM concentrates into one dominant ~2.2×10¹¹ M⊙ halo; FDM spreads its mass into 6–10 intermediate clumps with nothing above 8×10¹⁰. Quantitative needs a bigger box.
20 Mpc zoom-in campaign — Stage 1 catalog
running · z≈4The high-mass lever arm is being built now. Stage 1 of the 20 Mpc campaign identifies the halo catalog that Stage 2 will zoom and resolve. The current dump catalogs 150 halos in a 20 Mpc/h box at z≈4, spanning ~7.4×10⁸ – 1.5×10⁹ M⊙ — the seed list for the resolved-core run.
GAMER → JAXiON bridge
✓ closure passesThe two lanes connect end-to-end and the closure test passes. Paint the GAMER core–halo relation onto JAXiON's differentiable halos, build the large-scale observable, run the validated mass-inference engine — injected m recovered to ~1.2% within 2σ (~21 s wall).
The GAMER program — reproducing Schive 2014.
A narrative of a publication-grade reproduction in progress: what we set out to prove, what is already validated, and what is honestly still pending. The pending headline is the core–halo slope.
The goal is to reproduce the fuzzy-dark-matter core–halo relation M_core ∝ M_halo^(1/3) to publication grade with GAMER's adaptive-mesh ELBDM solver — and to feed that relation into the JAXiON inverse problem. The solitons are validated; the slope needs a bigger box, which is running now.
1 · goalReproduce the cube-root core–halo law
Schive et al. (2014) predict that the solitonic core mass scales with host halo mass as M_core ∝ M_halo^(1/3) — the cube-root law that is fuzzy dark matter's structural signature. Reproducing it independently, at publication grade, is the target. GAMER is the right tool because its adaptive mesh resolves the dense soliton core cheaply, exactly where JAXiON's uniform grid fails (see the JAXiON Analysis convergence result).
2 · validateThe solitons are real
In matched 2 Mpc/h boxes across 3 random seeds, the densest GAMER cores fit the Schive (2014) profile cleanly — residuals < 2.5% — and obey the internal soliton scaling r_c ∝ ρ_c^−0.20 (Schive predicts −0.25). The core radii cluster at 0.20–0.26 kpc and central density correlates with host halo mass (r = +0.72). The Results tab carries the fit. This establishes that GAMER's cores are genuine solitons, not mesh artifacts.
3 · find the wall2 Mpc is too narrow to pin the slope
Fitting M_core vs M_halo within the 2 Mpc boxes gives a slope a = 0.04 ± 0.13 — statistically consistent with zero, and unable to confirm 1/3. This is not a bug: the 2 Mpc box only spans ~1.7 dex of halo mass, far too short a lever arm to measure a slope against the intrinsic core-mass scatter. The same limitation shows up in the bridge prototype, where painting the 2 Mpc relation onto 12 halos and re-fitting under realistic scatter recovers an over-constrained slope — a direct echo of the narrow mass span.
4 · scale upThe 20 Mpc zoom-in campaign
The fix is a three-stage 20 Mpc/h zoom-in campaign for the lever arm the 2 Mpc box lacks:
5 · connectThe bridge to JAXiON
The reproduction is not an end in itself — its product feeds JAXiON's inverse problem. The bridge paints the GAMER core–halo relation onto JAXiON's differentiable halos, builds the large-scale observable, and runs the validated mass-inference engine. The closure test passes: injected m=0.85 recovers to 0.84 (1.2%), m=1.45 recovers to 1.43 (1.3%), both within 2σ, in ~21 s wall. The painter reproduces the input relation to machine precision and the cores are sub-grid, so painting shifts the large-scale observable bands by <0.002 dex — they carry the mass signal cleanly.
The GAMER method — adaptive-mesh ELBDM.
GAMER solves the same Schrödinger–Poisson system as JAXiON, but on a patch-based, block-structured adaptive mesh with finite differences. Refinement concentrates resolution exactly on the soliton core — the feature a uniform grid cannot afford.
ELBDM = Extremely Light Bosonic Dark Matter: the Schrödinger–Poisson wavefunction evolved on a fixed Eulerian mesh, but one that adapts its resolution in space and time.
Same equations, different discretisation
The physics is identical to JAXiON — ρ = |ψ|², gravity sourced by the overdensity, the field feeling the potential:
The difference is how the operators are applied. Where JAXiON multiplies by $-k^{2}$ in Fourier space (spectral, uniform), GAMER uses a finite-difference Laplacian on a hierarchy of nested grid patches.
The patch-based AMR hierarchy
The domain is tiled by a coarse root grid. Wherever a refinement criterion fires, GAMER overlays a finer patch with half the cell size, and this nesting recurses: each level ℓ has $dx_{\ell} = dx_0 / 2^{\ell}$. Refinement is triggered by:
OPT__FLAG_RHO): refine any cell whose
density exceeds a level-dependent threshold — solitonic cores, being the densest features, refine to the
deepest levels.The payoff: the fine mesh exists only where the core is, so resolving a 0.2 kpc soliton inside a Mpc box costs a small fraction of what a uniform grid at that resolution would (which would be the hundreds-of-TB machine of the JAXiON convergence result).
The wave scheme and the timestep wall
On each patch the kinetic term uses a 4th-order finite-difference Laplacian and the update is done as a phase rotation of the complex field (a finite-difference analogue of the split-step propagator). Because the wave operator must resolve the de Broglie oscillation, the stable timestep scales as the square of the cell size:
This $\Delta t \propto dx^{2}$ is the notorious low-redshift timestep wall: as structure collapses and the finest levels reach very small dx, the timestep collapses quadratically and the run grinds down. To beat it in the high-z, smooth, fluid-like regime, GAMER can switch to a hybrid GRAMFE spectral scheme (a Gram–Fourier extension) that relaxes the timestep constraint where the field is well-resolved — accelerating the early evolution while the FD wave scheme handles the sharp collapsed cores.
Gravity: SOR / multigrid + root-grid FFT
Poisson is solved by FFT on the periodic root grid (fast, global) and by SOR or multigrid relaxation on the refined patches (local, with boundary values interpolated from the parent level). Finer levels are sub-cycled in time — a level-ℓ patch takes more, smaller steps per coarse step, since its CFL timestep is shorter — and the levels are synchronised at coarse-step boundaries.
Forward-only — and that is the point
Unlike JAXiON, GAMER is not differentiable: the AMR bookkeeping (patch creation/destruction, interpolation, sub-cycling) is not a clean autodiff graph. That is by design. GAMER's job is not inversion — it is to resolve the cores from first principles and produce the converged core–halo relation. That relation is the input the JAXiON inverse problem consumes.
GAMER (forward, resolves cores) ↔ JAXiON (inverse, infers m). GAMER pays the adaptive-mesh cost to get the core–halo physics right; JAXiON pays the differentiability cost to invert it. Painting GAMER's relation onto JAXiON's halos and recovering the injected mass to ~1.3% is the round-trip that proves the two codes speak the same physics.