Quantitative Type Theory · Mutable Value Semantics · Polyhedral Loops · Z3 SMT Prover
Naso: Non-aliasing Affine Systems Orchestrator
A provably safe systems language unifying QTT, MVS, polyhedral compilation, and Z3 verification for quantum & heterogeneous AI hardware.
🎯
Executive Summary: Closing the quantum/tensor safety gap. Naso unifies QTT, MVS, polyhedral compilation, and Z3 verification into a single zero-overhead language where memory leaks, aliasing bugs, and quantum decoherence are compile-time type errors.
Four Core Pillars
Tracks resource quantities ([0], [1], [N], [*]) directly in the type system. Prevents quantum state leaks and double-use at compile time with zero runtime overhead.
Pass-by-writeback with strict non-aliasing guarantees.
inout provides exclusive mutable access with copy-in/copy-out semantics—zero pointer borrowing overhead.Static iteration space bounds via affine schedules for optimal quantum/tensor kernel scheduling. Tiling, skewing, interchange, fusion, vectorization verified by Z3 before hardware lowering.
Embedded naso-verify generates SMT-LIB2 invariants to eliminate runtime panics, buffer overflows, race conditions, and quantum decoherence trace-outs at compile time.
Code / Syntax Preview
fn create_bell_pair(inout q0: [1] Qubit, inout q1: [1] Qubit) -> [0] Proof {
hadamard(inout q0);
cnot(inout q0, inout q1);
// q0, q1 now form a Bell pair |00⟩ + |11⟩
// Automatic uncomputation on scope exit
}Philosophy & FDR Teaser
🚫
Frequently Denied Requests (FDR) — Teaser
- FDR-001: Request for
anyorvoid*untyped pointers → Status: Permanently Denied. Z3 solver experienced existential dread and refused to generate SMT-LIB2 output. - FDR-002: Request to drop entangled ancilla qubits implicitly → Status: Permanently Denied. Schrödinger’s cat called our legal team.
- FDR-003: Request for background garbage collector thread → Status: Permanently Denied. Non-deterministic execution pauses violate the laws of physics and engineering decency.
- FDR-004: Request to suppress compiler errors on linear variable reuse → Status: Permanently Denied. The quantum no-cloning theorem is not a toggleable compiler flag.
Deep dive into the four architectural pillars, formal guarantees, and target execution ecosystem.
Complete formal grammar, type rules, operational semantics, and verification engine details.
The four axioms, ten aphorisms, explicit non-goals, and the full FDR list.
API reference for
std::quantum, std::poly, std::smt, std::mem, std::math.naso-verify SMT engine, error code matrix, soundness proofs, and workflow.
Deep dive into QTT quantities, semiring, typing judgments, and advanced examples.