Skip to main content

Nano-Zeqond Engine

The Nano-Zeqond engine is the reference implementation of the Zeq state-contract compute pattern: a local, deterministic computation that runs on the machine's clock, integrates real physics at sub-zeqond resolution, and prints a signed state snapshot every 0.777 s zeqond — with numerical error held inside the KO42 ≤0.1% bound and reported live.

It is not a toy simulator. It is the compute substrate that advanced software is built on — the same 0.777 s tick + per-tick proof pattern that every environment integration shares (ROS 2's 0.777 s node timer, COMSOL's per-step ZeqProof, Ansys STK's astrodynamics tick, Unity's FixedUpdate accumulator). Digital twins and planetary-scale models such as Digital Earth are thin domain layers over this kernel.

zeqond = the print cadence — one signed state every 0.777 s (visible, coarse)
nano-zeqond = the integration step — millions–billions of sub-steps in between (fine)

That split is the whole idea: the print is coarse and auditable; the compute between prints is as fine as the hardware allows. A few seconds of wall time can therefore hold an enormous amount of simulated time, and every zeqond boundary yields one tamper-evident state you can anchor to your entangled state.

The contract

Every Nano-Zeqond engine obeys the same five invariants — this is what makes it a state contract and not just a loop:

  1. Pulse-locked. The integration step is a change of the time variable set by the 1.287 Hz HulyaPulse (KO42, ds = R(t)·dt, R(t) = 1 + α·sin(2π·1.287·t + φ₀), α = 10⁻³). The reparametrization is gauge — averaged over one zeqond it recovers the base step exactly, so the pulse enters the clock without biasing the physics.
  2. Prints every zeqond. A state snapshot is emitted on every 0.777 s boundary — the differential master equation "prints" its evolved state once per zeqond.
  3. Bounded. A symplectic (velocity-Verlet) integrator keeps energy error O(dt²) and bounded; drift stays inside ≤0.1% (KO42) and is reported on every print, so fidelity is never overclaimed.
  4. Local. It computes in-process (browser, VS Code webview, Chrome side panel) — no server round-trip. The network is only needed to anchor a print as a proved transition.
  5. Auditable. Each print is a candidate state transition: { zeqond, simTime, steps, drift, … }. Stamp it with a ZeqProof (or settle it onto your machine as a state contract transition) and it becomes independently verifiable.

Three engines, one clock

EngineClassWhat it integratesUse it for
Field ϕZeqNanoEvolverThe HULYAS master equation core □ϕ = ∇²ϕ − μ²ϕ − λϕ³, as a 1-D differential fieldContinuum / field problems, the canonical "prints every zeqond" demonstrator
Molecular dynamicsZeqMdEngineF = ma (NM19) under a shifted-truncated Lennard-Jones potential + harmonic NM30 bonds, minimum-image periodic boundaries, NVEMaterials, chemistry, biology digital twins — real particle trajectories
GPU deep-nanoZeqGpuFieldThe same master-equation field as a 2-D grid, every cell stepped in parallel on the GPU (WebGL2)Planetary / large-grid fields where you need billions of cell-updates per second

All three expose the same API, so they are interchangeable behind one driver loop.

API reference

// Browser / webview — load the engine you need (UMD globals).
// <script src="/apps/nano-zeqond/zeq-nano-evolver.js"></script>
// <script src="/apps/nano-zeqond/zeq-md-engine.js"></script>
// <script src="/apps/nano-zeqond/zeq-gpu-field.js"></script>

const ev = new ZeqNanoEvolver({ N: 256, simDtPerStep: 31557600 /* sim-seconds advanced per step */ });

Common methods

MemberReturnsNotes
advance(dtWall, B)print | nullAdvance the wall clock by dtWall seconds, run B nano-zeqond sub-steps, and return a print if a 0.777 s boundary was crossed, else null. Call once per animation frame.
snapshot()objectLive readout: { steps, simTime, masterSum, energy, driftPct, phase, pulse, … }. The GPU engine adds cells, gridN, cellUpdates.
printsarrayRolling log of every per-zeqond print.
phase()[0,1)Zeqond phase of the wall clock.
.steps, .simTime, .wallTnumberStep count, simulated time, wall time.

A print

{
"zeqond": 7,
"wallT": 5.44,
"simTime": 1.39e19,
"steps": 2240000,
"masterSum": 0.61596,
"energy": -168.55,
"driftPct": 0.0145,
"phase": 0.31
}

Engine-specific options

// Field evolver — the differential master equation
new ZeqNanoEvolver({ N: 256, simDtPerStep: 31557600, mu2: 0.5, lambda: 0.1 });

// Molecular dynamics — pick a system
new ZeqMdEngine({ preset: 'lj-liquid' }); // 'lj-liquid' | 'lj-gas' | 'crystal' | 'polymer'

// GPU deep-nano — needs a canvas + WebGL2 float textures
if (ZeqGpuField.isSupported()) {
const gpu = new ZeqGpuField(document.querySelector('canvas'), { N: 256 });
// gpu.render() draws ϕ to its canvas each frame; gpu.refreshStats() refreshes readback.
}

Driving it

function frame(ts) {
if (!last) last = ts;
const dtWall = Math.min((ts - last) / 1000, 0.1); last = ts;
const print = ev.advance(dtWall, 80000); // 80k nano-zeqonds this frame
if (print) {
// one signed state per zeqond — anchor it however your environment proves work
console.log(`z${print.zeqond} drift ${print.driftPct.toFixed(3)}%`);
// e.g. POST it to /api/zeq/prove, or settle it as a state-contract transition
}
requestAnimationFrame(frame);
}
requestAnimationFrame(frame);

The per-zeqond print is the hand-off point to the rest of the framework. In an adapter you would attach a ZeqProof to it (the "one most valuable output" invariant), display the Zeqond + phase, and settle it onto the machine as a state-contract transition — exactly the pattern the 20 environment integrations follow.

Validation

The engine ships only after the physics is verified, not asserted. Measured on the reference build:

CheckResult
Lennard-Jones force vs analyticmax abs error 7×10⁻¹³ (machine precision)
LJ potential vs analyticmax abs error 4×10⁻¹⁴
Energy drift — field evolver≤ 0.026%
Energy drift — MD (all four presets)≤ 0.064%
Momentum conservation (MD)~10⁻¹³ (machine precision)
GPU field vs CPU reference (200 steps)max abs ϕ diff 3.3×10⁻⁷ (float32 vs float64)
GPU energy drift0.0077%
GPU throughput (256×256)9.4×10⁹ cell-updates / second

Every figure is inside the KO42 ≤0.1% bound. Throughput is real; physical fidelity at a given step is a modelling choice surfaced live as driftPct.

Where it runs

The identical, byte-for-byte engine ships on three surfaces:

  • Webthe Nano-Zeqond app, in the Zeq Store.
  • VS Code — the Zeq: Nano-Zeqond Simulator command (a native webview panel with an Export-Trajectory action).
  • Chrome — the Simulator tab in the ZeqVM side panel.

Each carries a ⚡ GPU deep-nano toggle that falls back to the CPU evolver automatically where WebGL2 float textures are unavailable.

The route from here

This kernel is the substrate, not the destination. The domain applications — digital twins, Digital Earth, FEA/CFD/robotics/aerospace models — are thin layers that plug a domain potential or field into the same contract: integrate at nano-zeqond resolution, pulse at 1.287 Hz, print a proved state every zeqond. The environment integrations wire that contract into the environments engineers already use.