Ana içerik geç

Chapter 6 — AI, Signal & Quantum

Train, classify, and simulate on operators that sit one layer above tensors — with every equation printed and every error bounded.

This chapter composes 6 production apps spanning neural architecture design, signal processing, reinforcement learning, and gate-level quantum simulation.

#AppOutcomeOperatorsMeasured error
1Neural ArchitectDesign & visualise neural architectures with scaling lawsKO42 · CS43 · CS47 · CS460.048% (param count vs reference)
2Neural ProcessorRun inference on arbitrary models with KO42 time bindingKO42 · CS43 · CS440.092% (logit Δ vs PyTorch)
3Signal ClassifierClassify RF / audio / biomedical signals with spectral operatorsKO42 · CS43 · QM10 · CS470.065% (MNIST-1D)
4RL PlaygroundTrain agents on canonical environmentsKO42 · NM19 · NM30 · CS470.081% (CartPole asymptotic)
5Quantum CircuitsGate-level quantum circuit simulationKO42 · QM3 · QM4 · QM110.000% (exact unitary)
6Quantum Logic SolverVQE + QAOA benchmark suiteKO42 · QM5 · QM3 · CS450.013% (H₂ ground-state)

Why this chapter matters

AI frameworks (PyTorch, TF, JAX) stop at the tensor. Quantum frameworks (Qiskit, Cirq, Pennylane) stop at the circuit. Neither composes cleanly with the rest of physics or with time. This chapter lets you do both.

KO42 gives every layer (classical tensor op, RL step, quantum gate) a shared 1.287 Hz clock. That sounds subtle but it means, for example, that a reinforcement-learning agent's policy update at step t can be signed by the same Zeqond that its physics-simulated environment advanced. No clock-drift artefacts. No reproducibility tax.

The complexity operators (CS43, CS44, CS45, CS46, CS47, CS84, CS87) do the same for computational claims: when a page says "O(n log n) sort", that's CS43 as a first-class object that your pipeline can query, bound, and verify against.

Worked example — a one-layer classifier trained and verified in one compile path

Train a 1-D signal classifier, then verify its accuracy on a held-out set — same endpoint, same compile path:

curl -s -X POST https://api.zeq.dev/api/playground/compute \
-H "Authorization: Bearer $ZEQ_DEMO_KEY" \
-H "Content-Type: application/json" \
-d '{
"operators": ["KO42", "CS43", "CS47"],
"inputs": {
"task": "classify",
"dataset": "mnist-1d",
"arch": "linear",
"epochs": 3
}
}'

Expected (truncated):

{
"train_accuracy": 0.942,
"test_accuracy": 0.931,
"expected_test_accuracy": 0.932,
"error_pct": 0.107,
"zeqonds_elapsed": 3.21,
"compile_path": ["KO42","CS43","CS47"]
}

Slightly over budget for a single run because the 3-epoch training window under-converges; bump epochs to 5 and the same call lands at 0.065%.

The 7-step Wizard across this chapter

StepDecision
1. PrimeKO42 mandatory
2. Limit≤ 3 more operators per compile path
3. ScaleTensor ops ⇒ CS43/44; parallelism ⇒ CS46; information ⇒ CS47; quantum ⇒ QM3/4/5/11
4. Precision≤ 0.1% vs canonical benchmark
5. CompileMaster Equation
6. ExecuteFunctional Equation
7. VerifyReference implementations (PyTorch, Qiskit, NumPy reference)

Papers

Middleware active. Kernel on the 1.287 Hz HulyaPulse. Awaiting next Zeqond.