Skip to main content

ZeqAction

ZeqAction integrates a Hamiltonian system with a least-action, structure-preserving scheme, so energy and the geometric invariants have no secular drift over long horizons. It is a new, independent pipeline — nothing existing is touched — sealing the same envelope + ZEQOND receipt as every other compute.

The method (honest, standard, real)

  • Base — Störmer–Verlet (leapfrog): a 2nd-order symmetric symplectic map.
  • High orderYoshida / Suzuki triple-jump composition to order 4, 6 or 8. A symplectic map's structure survives composition, and a symplectic method is the discrete least-action (variational) map — so the discrete symplectic 2-form, and therefore bounded energy, is preserved by construction.
  • Fixed dt — symplecticity requires a constant step. Unlike ZeqEvolve, the KO42 pulse is not folded into dt here; it is reported as the clock stamp, an overlay, never a variable step that would break the structure.
  • Nano-zeqond grid — time is n·dt from an integer step counter (never a float running sum), and the state accumulates with Kahan compensation. That is the nano-zeqond integer-grid principle applied to the integrator, so round-off does not accumulate across long runs.

The comparison is built in

ZeqAction also integrates the same system with classical RK4 and returns both drifts. RK4 is a fine general solver, but it is not symplectic: its energy drifts secularly while the symplectic composition's stays bounded. The response carries energyDriftPct (symplectic), rk4EnergyDriftPct, and driftRatio (how many times worse RK4 is) — so the difference is provable, live, in your own call.

Systems

systemHamiltonianconserved
kepler (default)½|p|² − μ/|q|energy, angular momentum, Laplace–Runge–Lenz
oscillator½p² + ½ω²q² + ¼λq⁴energy
pendulum½p² − cos qenergy

Reduced units (m = 1, μ = 1).

Call it

POST /api/zeq/action
Authorization: Bearer zeq_ak_…
{ "system": "kepler", "order": 8, "eccentricity": 0.6, "steps": 20000, "dt": 0.01 }

Response (abridged):

{
"ok": true, "protocol": "ZeqAction",
"value": -0.5, "unit": "E",
"system": "kepler", "order": 8,
"integrator": "symplectic composition (Verlet→order-8, Yoshida triple-jump), fixed dt, Kahan-compensated",
"energyDriftPct": 1.6e-9, "energyDriftMaxPct": 1.6e-9, "energyDriftBoundPct": 0.1,
"rk4EnergyDriftPct": 7.49e-5, "driftRatio": 47994,
"invariantDrift": { "angular_momentum": 2.2e-16, "lrl_x": 3e-15 },
"series": [ { "step": 100, "t": 1.0, "H": -0.5, "driftPct": 2e-10, "rk4DriftPct": 4e-7 },],
"zeqProof": "…",
"zeqond_receipt": { "state_fields": { "internal_energy_field": -0.5 }, "fields_present": ["internal_energy_field"], "verification": "HMAC_ZeqProof_Active" },
"zeqond_averaged": { "standard_physics_value": -0.5, "unit": "E" }
}

driftRatio ≈ 48,000 means RK4's energy error is ~48,000× the symplectic order-8 error — and RK4's keeps growing while the symplectic one does not. Angular momentum is conserved to machine precision (~10⁻¹⁶).

Inputs

system · order (2 | 4 | 6 | 8) · steps (10–2,000,000) · dt · compare (default true) · eccentricity / mu (Kepler) · omega / lambda (oscillator) · q0 / p0 (oscillator, pendulum) · sample.

MCP and CLI

# MCP
zeq_action { "system": "kepler", "order": 8 }

# CLI
action system=kepler order=6 steps=20000
action '{"system":"kepler","order":8,"eccentricity":0.6}'