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. Digital twins and planetary-scale models are thin domain layers over this kernel, and the framework dispatches to external simulation engines (ANSYS Cloud, COMSOL Server, LAMMPS, OpenFOAM, BOUT++) through the external engines API.
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:
- Pulse-locked. The integration step is modulated by the 1.287 Hz HulyaPulse (KO42 metric tensioner,
dt = dtSim·R(t),R(t) = 1 + α·sin(2π·1.287·t + φ₀),α = 1.29×10⁻³). The metric breathes with the pulse; averaged over one zeqond it recovers the base step. - Prints every zeqond. A state snapshot is emitted on every
0.777 sboundary — the differential master equation "prints" its evolved state once per zeqond. - 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. - 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.
- 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
| Engine | Class | What it integrates | Use it for |
|---|---|---|---|
| Field ϕ | ZeqNanoEvolver | The HULYAS master equation core □ϕ = ∇²ϕ − μ²ϕ − λϕ³, as a 1-D differential field | Continuum / field problems, the canonical "prints every zeqond" demonstrator |
| Molecular dynamics | ZeqMdEngine | F = ma (NM19) under a shifted-truncated Lennard-Jones potential + harmonic NM30 bonds, minimum-image periodic boundaries, NVE | Materials, chemistry, biology digital twins — real particle trajectories |
| GPU deep-nano | ZeqGpuField | The 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
| Member | Returns | Notes |
|---|---|---|
advance(dtWall, B) | print | null | Advance 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() | object | Live readout: { steps, simTime, masterSum, energy, driftPct, phase, pulse, … }. The GPU engine adds cells, gridN, cellUpdates. |
prints | array | Rolling log of every per-zeqond print. |
phase() | [0,1) | Zeqond phase of the wall clock. |
.steps, .simTime, .wallT | number | Step 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:
| Check | Result |
|---|---|
| Lennard-Jones force vs analytic | max abs error 7×10⁻¹³ (machine precision) |
| LJ potential vs analytic | max 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 drift | 0.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:
- Web — the Nano-Zeqond app, in the Zeq Store.
- VS Code — the
Zeq: Nano-Zeqond Simulatorcommand (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.
Building on the substrate
This kernel is the substrate. The domain applications — digital twins, 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 external engines API dispatches that contract to the commercial and open-source simulators engineers already use.