Energy Functionals
functionals
Traceable (Array-returning) observables.
This module holds the implementations of the energy and stability diagnostics.
jaxlatt.observables.energy and jaxlatt.observables.stability are the eager layer
on top: their public functions are one-line float(...) wrappers around their
namesakes here, so the physics is written exactly once.
The rule is simple: same name as in energy.py / stability.py, returns an
Array. Use this module whenever an observable needs to appear inside jit,
grad, vmap or scan; use the eager modules for notebooks and printing.
Only the functions that needed a traceable twin live here. Much of
stability.py is already Array-returning and @jit-decorated
(compute_mass_matrix, compute_curvature_at_origin, compute_linear_response,
compute_fluctuation_spectrum_1d, mode_visibility); those stay where they are
rather than being moved for symmetry's sake.
Do not jit these directly
Several functions take a potential_func: Callable, which is not a valid JAX type.
Decorating them with @jit would fail at trace time. Wrap your outer loss in
jax.jit instead — the same guidance the leapfrog kernels need for a different
reason (donated buffers):
@jax.jit
def loss(phi):
lat = dataclasses.replace(lattice, phi=phi)
return functionals.compute_physical_energy_density(lat, a, dx, V)
grad_phi = jax.grad(loss)(lattice.phi)
Relation to operators.autodiff
jaxlatt.operators.autodiff has its own traceable energy functionals
(scalar_hamiltonian, coupled_hamiltonian, compute_all_energy_components, ...).
Those are a different convention and are not duplicates of these: they are
flat-space, volume-integrated, use a finite-difference gauge-covariant gradient,
and hardcode the quartic potential. The functions here are FRW-aware (explicit
scale-factor scaling), volume-averaged, use an FFT gradient, and take an
arbitrary potential callable. Pick by which convention you need.
EnergyHistory
Bases: Module
Fixed-size, traceable energy history — a valid pytree and scan carry.
The counterpart to
EnergyTracker, which accumulates
into Python lists and is therefore host-side by construction. This class
preallocates its buffers and record returns a new instance, so it can be
carried through lax.scan and differentiated through.
Attributes:
| Name | Type | Description |
|---|---|---|
times |
Array
|
Recorded times, shape |
components |
dict[str, Array]
|
Per-component buffers, each of shape |
index |
Array
|
Number of slots written so far. |
Example
history = EnergyHistory.empty(n_steps, ("kinetic", "gradient", "potential", "total"))
def step(carry, _):
lattice, history = carry
lattice = evolve_one_step(lattice)
history = history.record(lattice.tau, energy_components_averaged(lattice, V))
return (lattice, history), None
(lattice, history), _ = jax.lax.scan(step, (lattice, history), length=n_steps)
drift = history.conservation()["max_deviation"]
empty(capacity, keys=('kinetic', 'gradient', 'potential', 'total'), dtype=None)
classmethod
Allocate an empty history.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
capacity
|
int
|
Number of measurements to make room for. Must be a concrete Python int, since it sets the buffer shapes. |
required |
keys
|
tuple[str, ...]
|
Component names to track. Use the six physical-energy keys when
recording |
('kinetic', 'gradient', 'potential', 'total')
|
dtype
|
dtype | None
|
Buffer dtype; defaults to the current default float type, which
honours |
None
|
Returns:
| Type | Description |
|---|---|
EnergyHistory
|
A history with zeroed buffers and |
Source code in jaxlatt/observables/functionals.py
record(time, components)
Write one measurement and return the updated history.
Out-of-bounds writes are dropped by JAX's scatter semantics, so recording
more than capacity measurements silently keeps the first capacity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time
|
Array
|
Current simulation time. |
required |
components
|
dict[str, Array]
|
Energy components, with the same keys the history was allocated with. |
required |
Returns:
| Type | Description |
|---|---|
EnergyHistory
|
A new |
Source code in jaxlatt/observables/functionals.py
conservation()
Conservation metrics over the recorded 'total' series.
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
The dictionary described in |
dict[str, Array]
|
Source code in jaxlatt/observables/functionals.py
kinetic_energy_averaged(lattice)
Volume-averaged kinetic energy density, as an Array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice object with |
required |
Returns:
| Type | Description |
|---|---|
Array
|
\(\langle \rho_\mathrm{kin} \rangle = \frac{1}{2}\langle \dot{\phi}^2 \rangle\) |
Source code in jaxlatt/observables/functionals.py
gradient_energy_averaged(lattice)
Volume-averaged gradient energy density, as an Array.
Uses FFT-based gradient computation for spectral accuracy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice object with |
required |
Returns:
| Type | Description |
|---|---|
Array
|
\(\langle \rho_\mathrm{grad} \rangle = \frac{1}{2}\langle (\nabla\phi)^2 \rangle\) |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the field is not 1D, 2D or 3D. The check is on |
Source code in jaxlatt/observables/functionals.py
potential_energy_averaged(lattice, potential_func)
Volume-averaged potential energy density, as an Array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice object with |
required |
potential_func
|
Callable
|
Potential function \(V(\phi) \to V\). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
\(\langle \rho_\mathrm{pot} \rangle = \langle V(\phi) \rangle\) |
Source code in jaxlatt/observables/functionals.py
total_energy_averaged(lattice, potential_func)
Total volume-averaged energy density, as an Array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice object. |
required |
potential_func
|
Callable
|
Potential function \(V(\phi) \to V\). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
\(E_\mathrm{kin} + E_\mathrm{grad} + E_\mathrm{pot}\) |
Source code in jaxlatt/observables/functionals.py
energy_components_averaged(lattice, potential_func)
All volume-averaged energy components, as Arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice object. |
required |
potential_func
|
Callable
|
Potential function \(V(\phi) \to V\). |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with keys |
Source code in jaxlatt/observables/functionals.py
kinetic_energy_integrated(lattice)
Kinetic energy integrated over the box, as an Array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice state containing |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Total kinetic energy. |
Source code in jaxlatt/observables/functionals.py
potential_energy_integrated(lattice, potential)
Potential energy integrated over the box, as an Array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice state containing scalar field values. |
required |
potential
|
Callable
|
Potential function |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Total potential energy. |
Source code in jaxlatt/observables/functionals.py
total_energy_integrated(lattice, potential)
Total energy integrated over the box, as an Array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice state. |
required |
potential
|
Callable
|
Potential function |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Total energy. |
Source code in jaxlatt/observables/functionals.py
energy_components_integrated(lattice, potential)
All integrated energy components, as Arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice state. |
required |
potential
|
Callable
|
Potential function |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with integrated |
Source code in jaxlatt/observables/functionals.py
compute_physical_scalar_gradient_energy(field, scale_factor, dx)
Compute physical gradient energy density with scale factor scaling.
In expanding universe (conformal time):
where \(\nabla\) is the comoving gradient operator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
Array
|
Scalar field configuration |
required |
scale_factor
|
float
|
FLRW scale factor \(a(\tau)\) |
required |
dx
|
float
|
Lattice spacing (comoving) |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical gradient energy density (averaged over lattice) |
Note
Uses FFT-based gradient computation for spectral accuracy. For expanding universe, this should be called with comoving coordinates.
Source code in jaxlatt/observables/functionals.py
compute_physical_scalar_kinetic_energy(field_dot, scale_factor)
Compute physical kinetic energy density with scale factor scaling.
field_dot is the conformal time derivative \(\phi' = d\phi/d\tau\), which is what
the integrators store as \(\pi\) (see docs/api/units.md). Since \(\dot\phi = \phi'/a\):
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field_dot
|
Array
|
Time derivative of field (conformal time) |
required |
scale_factor
|
float
|
FLRW scale factor \(a(\tau)\) |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical kinetic energy density (averaged) |
Note
Convention depends on how field_dot is stored. Here we assume it's the conformal time derivative, giving \(a^{-2}\) scaling.
Source code in jaxlatt/observables/functionals.py
compute_physical_potential_energy(field, potential_func)
Compute physical potential energy density.
Potential energy has no scale factor dependence:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
Array
|
Scalar field configuration |
required |
potential_func
|
Callable[[Array], ndarray]
|
Potential function \(V(\phi)\) |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical potential energy density (averaged) |
Note
Deliberately not @jit-decorated: potential_func is not a valid JAX
type, so decorating this would fail at trace time. Wrap your outer loss in
jax.jit instead.
Source code in jaxlatt/observables/functionals.py
compute_physical_gauge_electric_energy(E_field, scale_factor)
Compute physical electric field energy density.
Electric field energy in expanding universe:
where \(E\) is the comoving electric field.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
E_field
|
Array
|
Electric field components (3, N, N, N) |
required |
scale_factor
|
float
|
FLRW scale factor \(a(\tau)\) |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical electric energy density (averaged) |
Source code in jaxlatt/observables/functionals.py
compute_physical_gauge_magnetic_energy(links, scale_factor, dx, g)
Compute physical magnetic field energy density.
Magnetic field energy in expanding universe:
where \(B\) is extracted from plaquettes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
links
|
Array
|
Gauge link variables (3, N, N, N) |
required |
scale_factor
|
float
|
FLRW scale factor \(a(\tau)\) |
required |
dx
|
float
|
Lattice spacing (comoving) |
required |
g
|
float
|
Gauge coupling |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical magnetic energy density (averaged) |
Note
Imports magnetic_field from operators.gauge to avoid circular dependency.
Source code in jaxlatt/observables/functionals.py
compute_physical_energy_density(lattice, scale_factor, dx, potential_func, g=None)
Total physical energy density for the Friedmann equation, as an Array.
This is the source term \(\rho_\mathrm{total}\) in:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
CoupledLattice
|
CoupledLattice with scalar and gauge fields |
required |
scale_factor
|
float
|
Current scale factor \(a(\tau)\) |
required |
dx
|
float
|
Lattice spacing (comoving) |
required |
potential_func
|
Callable[[Array], ndarray]
|
Scalar potential \(V(\phi)\) |
required |
g
|
float | None
|
Optional gauge coupling override. Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Total physical energy density \(\rho_\mathrm{phys}\) (averaged over lattice) |
Source code in jaxlatt/observables/functionals.py
compute_physical_energy_components(lattice, scale_factor, dx, potential_func, g=None)
All physical energy density components separately, as Arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
CoupledLattice
|
CoupledLattice state |
required |
scale_factor
|
float
|
Current scale factor \(a(\tau)\) |
required |
dx
|
float
|
Lattice spacing (comoving) |
required |
potential_func
|
Callable[[Array], ndarray]
|
Scalar potential \(V(\phi)\) |
required |
g
|
float | None
|
Optional gauge coupling override; see
|
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with keys |
dict[str, Array]
|
|
Source code in jaxlatt/observables/functionals.py
compute_comoving_energy_density(lattice, dx, potential_func, g=None)
Comoving energy density (no scale factor corrections), as an Array.
This is what standard (non-expanding) simulations compute.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
CoupledLattice
|
CoupledLattice state |
required |
dx
|
float
|
Lattice spacing |
required |
potential_func
|
Callable[[Array], ndarray]
|
Scalar potential \(V(\phi)\) |
required |
g
|
float | None
|
Optional gauge coupling override. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Comoving energy density (what you'd get with \(a=1\)) |
Source code in jaxlatt/observables/functionals.py
kinetic_energy(field_dot, dV)
Total kinetic energy \(E_\mathrm{kin} = \frac{1}{2} \int (\partial\phi/\partial t)^2\,dV\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field_dot
|
Array
|
Time derivative of the field |
required |
dV
|
float
|
Volume element (grid cell volume) |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Total kinetic energy (integrated, not averaged) |
Source code in jaxlatt/observables/functionals.py
potential_energy(field, potential, dV)
Total potential energy \(E_\mathrm{pot} = \int V(\phi)\,dV\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
Array
|
Field configuration |
required |
potential
|
Callable[[Array], ndarray]
|
Potential function \(V(\phi)\) |
required |
dV
|
float
|
Volume element |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Total potential energy (integrated, not averaged) |
Source code in jaxlatt/observables/functionals.py
compute_energy(lattice, potential)
Total energy of a field configuration (volume-integrated), as an Array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice object containing field and field_dot |
required |
potential
|
Callable[[Array], ndarray]
|
Potential function \(V(\phi)\) |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Total energy (integrated) |
Source code in jaxlatt/observables/functionals.py
compute_energy_components(lattice, potential)
All energy components separately (volume-integrated), as Arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lattice
|
Lattice
|
Lattice object containing field and field_dot |
required |
potential
|
Callable[[Array], ndarray]
|
Potential function \(V(\phi)\) |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with keys |
Source code in jaxlatt/observables/functionals.py
energy_density(field, field_dot, potential, dx)
Local energy density at each lattice point.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
Array
|
Field configuration |
required |
field_dot
|
Array
|
Time derivative of field |
required |
potential
|
Callable[[Array], ndarray]
|
Potential function |
required |
dx
|
float
|
Lattice spacing |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Energy density at each lattice point |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the field is not 1D, 2D or 3D. |
Source code in jaxlatt/observables/functionals.py
energy_conservation(E_tot)
Conservation metrics for a stacked total-energy series.
This is the traceable form of
EnergyTracker.energy_conservation,
and the one an energy-drift objective wants: it takes the stacked series that
the evolvers already return, so nothing has to round-trip through a Python list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
E_tot
|
Array
|
1D array of total energy at each recorded step. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with |
dict[str, Array]
|
|
Example
Source code in jaxlatt/observables/functionals.py
compute_mass_matrix(phi, m, lambda_)
Effective mass matrix \(\partial^2 V/\partial\phi\,\partial\phi^*\).
Convention: \(m_\text{eff}^2 = \text{sign}(m)\,m^2 + \lambda|\phi|^2\).
- \(m > 0\): quartic potential \(V = m^2/2\,|\phi|^2 + \lambda/4\,|\phi|^4\). Curvature at origin is \(+m^2\) (stable vacuum at \(\phi=0\)).
- \(m < 0\): double-well potential with tachyonic mass. Curvature at origin is \(-m^2\) (unstable vacuum, SSB).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
Array
|
Scalar field (N, N, N) complex. |
required |
m
|
float
|
Signed mass parameter. Positive → stable; negative → tachyonic at origin. |
required |
lambda_
|
float
|
Self-coupling. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Effective mass squared at each point (N, N, N) real. |
Source code in jaxlatt/observables/functionals.py
compute_curvature_at_origin(m, lambda_)
Compute \(\partial^2 V/\partial\phi^2|_{\phi=0} = \text{sign}(m)\,m^2\).
- If negative: symmetry broken (\(\phi = 0\) unstable).
- If positive: symmetric phase (\(\phi = 0\) stable).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m
|
float
|
Mass parameter. |
required |
lambda_
|
float
|
Coupling (unused; kept for interface symmetry). |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Curvature at the origin. |
Source code in jaxlatt/observables/functionals.py
detect_tachyonic_modes(phi, m, lambda_)
Detect tachyonic (unstable) modes where \(m_\mathrm{eff}^2 < 0\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
Array
|
Scalar field configuration. |
required |
m
|
float
|
Mass parameter. |
required |
lambda_
|
float
|
Self-coupling. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with counts and fractions of unstable sites, extrema of |
dict[str, Array]
|
effective mass-squared, and a boolean instability flag, all as |
Source code in jaxlatt/observables/functionals.py
compute_vev_estimate(m, lambda_)
Estimate the vacuum expectation value for symmetry breaking.
\(|\langle\phi\rangle| = \sqrt{m^2/\lambda}\) when \(m < 0\) and \(\lambda > 0\), and zero otherwise.
The guard matters for gradients as well as values: \(\lambda\) is sanitised before the division, so the unused branch never evaluates \(m^2/0\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
m
|
float
|
Mass parameter (negative for symmetry breaking). |
required |
lambda_
|
float
|
Self-coupling. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Estimated \(|\langle\phi\rangle|\). |
Source code in jaxlatt/observables/functionals.py
check_symmetry_breaking(phi, m, lambda_)
Check whether the field has a non-zero VEV (symmetry breaking).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
Array
|
Scalar field configuration. |
required |
m
|
float
|
Mass parameter. |
required |
lambda_
|
float
|
Self-coupling. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with measured field statistics, expected VEV, curvature at the |
dict[str, Array]
|
origin, and a symmetry-breaking indicator, all as |
Source code in jaxlatt/observables/functionals.py
estimate_effective_mass_from_spectrum(k_values, power_spectrum, dx)
Estimate the effective mass from a fluctuation spectrum.
For a free theory \(P(k) \approx 1/(k^2 + m_\mathrm{eff}^2)\), so the low-\(k\) plateau fixes \(m_\mathrm{eff}\).
The eager version selected the low-\(k\) modes with boolean-mask indexing, whose
output shape depends on the values rather than the shapes — untraceable. Since
k_values is ascending, the first retained mode is simply element 0, so the
mask is only needed for the "enough modes to fit" test, which becomes a
jnp.where. The two agree exactly: if element 0 is not below the cutoff then
no element is, and both return zero.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
k_values
|
Array
|
Momentum values, ascending. |
required |
power_spectrum
|
Array
|
\(P(k)\). |
required |
dx
|
float
|
Lattice spacing. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Effective mass estimate. |
Source code in jaxlatt/observables/functionals.py
estimate_bounce_action(phi_false, phi_true, m, lambda_)
Estimate the bounce action for tunnelling \(\phi_\mathrm{false} \to \phi_\mathrm{true}\).
with tunnelling rate \(\Gamma \sim \exp(-S_\mathrm{bounce})\). A crude estimate: the barrier is taken at \(\phi = 0\) when \(m < 0\), and absent otherwise.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi_false
|
float
|
False vacuum field value. |
required |
phi_true
|
float
|
True vacuum field value. |
required |
m
|
float
|
Mass. |
required |
lambda_
|
float
|
Coupling. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Bounce action estimate. |
Source code in jaxlatt/observables/functionals.py
generate_stability_report(phi, m, lambda_, dx)
Generate a comprehensive stability analysis report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
Array
|
Scalar field configuration. |
required |
m
|
float
|
Mass parameter. |
required |
lambda_
|
float
|
Self-coupling. |
required |
dx
|
float
|
Lattice spacing. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary combining mass-matrix statistics, tachyonic-mode diagnostics, |
dict[str, Array]
|
and symmetry-breaking indicators, all as |
Source code in jaxlatt/observables/functionals.py
compute_constraint_violation_norm(phi, pi, E, links, dx, scale_factor=1.0)
Norms of the Gauss-constraint violation, as Arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi
|
Array
|
Scalar field. |
required |
pi
|
Array
|
Conjugate momentum. |
required |
E
|
Array
|
Electric field. |
required |
links
|
Array
|
Gauge links. |
required |
dx
|
float
|
Comoving lattice spacing. |
required |
scale_factor
|
float
|
Scale factor \(a\). The FRW Gauss law is \(\nabla\cdot E + a^2\operatorname{Im}(\phi^*\pi)/dx = 0\), so this must be supplied for expanding runs; the default of 1.0 is the flat case. |
1.0
|
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with |
dict[str, Array]
|
|
Source code in jaxlatt/observables/functionals.py
check_constraint_preservation(phi_old, pi_old, E_old, links_old, phi_new, pi_new, E_new, links_new, dx, scale_factor=1.0)
Gauss-constraint drift across a time step, as Arrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phi_old
|
Array
|
Scalar field at the previous time. |
required |
pi_old
|
Array
|
Conjugate momentum at the previous time. |
required |
E_old
|
Array
|
Electric field at the previous time. |
required |
links_old
|
Array
|
Gauge links at the previous time. |
required |
phi_new
|
Array
|
Scalar field at the current time. |
required |
pi_new
|
Array
|
Conjugate momentum at the current time. |
required |
E_new
|
Array
|
Electric field at the current time. |
required |
links_new
|
Array
|
Gauge links at the current time. |
required |
dx
|
float
|
Comoving lattice spacing. |
required |
scale_factor
|
float
|
Scale factor \(a\); the default of 1.0 is the flat case. |
1.0
|
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary with |
dict[str, Array]
|
|