Skip to main content

Getting Started with Zeq OS

Zeq OS is an open-source scientific computing framework — a language-agnostic middleware platform — that takes verified physics equations and makes them callable as software functions. Pick your language and run your first computation in under a minute.

Choose Your Language

pip install zeq-os
from zeq_os import ZeqSDK, HulyaSync, OperatorRegistry

sdk = ZeqSDK()

# Earth-Moon gravitational force (NM21: F = G × m₁ × m₂ / r²)
result = sdk.execute(
"Calculate gravitational force between Earth and Moon",
operators=["KO42", "NM21"]
)
# G = 6.674e-11, m₁ = 5.97e24 kg, m₂ = 7.35e22 kg, r = 3.84e8 m
# Result ≈ 1.98e20 N, precision ≤ 0.1%
print(f"Force: {result.value:.3e} N")
print(f"Operators: {result.selected_operators}")
print(f"Precision: {result.precision}%")

# Access the operator registry — the Periodic Table of Motion
registry = OperatorRegistry.default()
print(f"\n{registry.count} operators across {len(registry.categories)} categories")

# Temporal synchronization
sync = HulyaSync()
print(f"Zeqond: {sync.get_zeqond()}")
print(f"Phase: {sync.current_phase():.4f}")

Core Concepts

Every Zeq OS SDK — regardless of language — provides the same four components:

1. HulyaSync — Temporal Synchronization

HulyaSync is the clock. It converts between Unix time and Zeqond time, calculates the current phase of the 1.287 Hz pulse, and applies modulation to physics values.

f = 1.287 Hz          Pulse frequency (derived from fundamental constants)
T = 0.777 s Zeqond duration (one period of the pulse)
α = 0.00129 Modulation depth

Key methods (names vary by language convention):

  • unix_to_zeqond(t) / zeqond_to_unix(z) — Lossless time conversion
  • current_phase() — Returns [0, 1) within the current Zeqond
  • modulate(value, t) — Apply HulyaPulse modulation: R(t) = S(t) × [1 + α × sin(2πft)]
  • ko42_automatic(t) — KO42.1 metric tensioner value
  • daemon_tick() — Current Zeqond announcement string

2. ZeqSDK — The 7-Step Wizard

ZeqSDK is the primary entry point. It runs the full 7-Step Protocol on a physics query. Give it a natural language query and optional domain hints, and it returns a ZeqState with selected operators, computed metrics, and precision verification.

Authentication required. sdk.execute() calls the server-side computation API. Pass your JWT token when initialising the SDK: new ZeqSDK({ token }) / ZeqSDK(token='...'). See Equation Auth to obtain a token.

3. OperatorRegistry — The Periodic Table of Motion

The registry is served via the API (GET /api/zeq/operators) and provides O(1) lookup by ID, category filtering, and full-text search.

Access tiers:

  • No auth: Core 42 operators (metadata only — id, name, description, category). No equations.
  • Authenticated: Core 42 operators with full equations included.
  • Backend registry: 1,576 operators across 64 categories (v6.3.0) — additional operators accessible via authenticated API queries.
Core public operators: 42 (QM1–QM17, NM18–NM30, GR31–GR41, KO42)
Full registry: 1,576 operators across 64 categories
API endpoint: GET /api/zeq/operators

4. ZeqState — Computation Snapshot

ZeqState is the output of every computation. It captures:

  • Timing — Unix timestamp, Zeqond count, phase
  • Query — Original query and detected domains
  • Operators — Selected operators (always includes KO42)
  • Metrics — Master sum, phase coherence, selection rate, domain coverage
  • Precision — Verified to ≤0.1% mean error

5. Equation Auth — Identity Without Passwords

Zeq OS uses mathematical equations as authentication keys. Your equation IS your password — the server never stores it, only a SHA-256 hash of the evaluated result at x = 1.287, y = 0.777.

import { ZeqAuthClient } from '@zeq-os/auth';

const auth = new ZeqAuthClient('/auth');

// Register
const { zid, token } = await auth.register('Alice', 'x^2 + sin(y*pi) + phi');

// Login (same equation = same identity)
const login = await auth.login('x^2 + sin(y*pi) + phi');

// Browser: check global auth from any page
if (window.ZeqAuth?.isLoggedIn()) {
const user = window.ZeqAuth.getUser();
console.log(user.id); // zeq-a1b2c3d4e5f6
console.log(user.displayName); // Alice
}

The global navigation bar provides a unified Sign In button across all 44+ apps. Install @zeq-os/auth for server-side integration, or use window.ZeqAuth in the browser.

6. Zeq Vault — Equation-Based Secret Storage

Zeq Vault extends the equation paradigm from identity to encryption. Your master equation derives a 256-bit AES key via PBKDF2 (100,000 iterations, SHA-256), and all secrets are encrypted client-side with AES-256-GCM. The vault never leaves the browser — zero-knowledge architecture by design.

// Vault key derivation (conceptual — runs inside Zeq Vault's Web Crypto layer)
const result = safeEvaluate('x^3 + sin(y*pi) - 42.7'); // x=1.287, y=0.777
const salt = crypto.getRandomValues(new Uint8Array(16));
const key = await crypto.subtle.deriveKey(
{ name: 'PBKDF2', salt, iterations: 100000, hash: 'SHA-256' },
await crypto.subtle.importKey('raw', encode(result), 'PBKDF2', false, ['deriveKey']),
{ name: 'AES-GCM', length: 256 },
false,
['encrypt', 'decrypt']
);

Zeq Vault uses the same recursive descent equation parser as Equation Auth, ensuring a single mathematical identity can authenticate across the ecosystem (Zeq Auth) and encrypt private data (Zeq Vault).

Next Steps