Q-Code v1.7
A participatory quantum coding language. The observer is part of the program.
Free and open source (MIT). No quantum hardware. No account. No cost. Released November 6, 2026.
Download Q-Code v1.7 (.zip, 4.57 MB)
Looking for an older version? All versions — v1.0, v1.1, v1.2, v1.3, v1.4, v1.5, and v1.6 stay available. Patch notes for v1.7.
What it is
Q-Code is a programming language that breaks the spectator assumption — the idea that the observer stands outside the system. In Q-Code, asking a question collapses a possibility. Paying attention reshapes the odds. Two observers can hold different views of the same field until they ask. Information lives in relationships, not in things. Storage is a wave, not a place.
The same program runs on five backends: a participatory field model, exact statevectors (dense or sparse), and real Qiskit circuits, with an optional IBM Quantum backend for real hardware. It has a real interpreter, control flow, functions, a REPL, a debugger, and a standard library of quantum systems.
What's new in v1.7
- Applied optimizers — eight real optimizers on one generic QAOA engine: delivery routes (TSP), portfolio optimization, scheduling, lottery and fair randomness (replay-verifiable draws), supply chain, traffic flow, energy grid, and fraud / anomaly detection. Every result reports the gap against the brute-force optimum — an approximate answer is never silently presented as optimal.
python3 examples/qopt_demo.py
- QRAM as a brain — ten machines on one shared amplitude wave: a memory that learns what you care about, a QRAM that dreams, associative memory that thinks sideways, a QRAM trained by being watched, forgetting as a feature, a shared mind entangled through real Bell pairs, a QRAM that writes its own index, dream-logic search, a memory that argues with itself, and a subconscious.
python3 examples/qbrain_demo.py
- QRAM as infrastructure — planetary memory, the internet's memory, a QRAM-powered AI, a market that prices in superposition, a power grid balanced by QRAM, a QRAM for all science, a global sensor net with no center, a QRAM as a constitution, a supply chain with no database, and a QRAM that runs the world-twin.
python3 examples/qinfra_demo.py
- The field model IS the computer — a generic field-program executor that solves triangle 3-coloring with no circuit anywhere, the synthesizer as a discoverer (it found a program for the Benford first-digit distribution), a computer that needs a human (it refuses to step with no observer attached), a QRAM that proves things without leaking addresses, time as a query, a QRAM that can't be censored, the language as the hardware, a QRAM economy, and a memory that outlives its hardware by teleportation.
python3 examples/qfield_demo.py
Full details: patch notes.
Run it in 60 seconds
python3 qinterp.py examples/hello.qc
python3 qinterp.py examples/friend.qc
python3 qinterp.py examples/grover_demo.qc
python3 qinterp.py examples/killer_demo.qc
python3 examples/shor_demo.py
Python 3.10+ only. Field, state, and sparse backends need nothing else. The quantum backend needs pip install -r requirements.txt (Qiskit + Aer). The IBM backend needs your own token — see docs/ibm-backend.md. Full instructions are in QUICKSTART.md inside the zip.
What is inside
- The language — fields, entangle, attend, ask, declare, become, observers, control flow, functions, recursion.
- Wave memory — text and images stored as waves, readable from a random half of the points; entangled and teleported memory where bits live only in relationships.
- Quantum error correction — bit-flip and phase-flip codes, every error position corrected exactly.
- Q-RAM + Grover search — a quantum RAM you query in superposition; Grover finds a value in 12 oracle calls where classical search needs 128.5.
- GhostDB — a database in signals and waves: tables, Grover search, superposed aggregation, and data hidden in Wi-Fi beacons, Bluetooth names, SSIDs, and sound.
- BB84 quantum key distribution — a home quantum network over an audio carrier; Eve caught at 24.2% error (theory 25%).
- Quantum compression — Schumacher compression, amplitude encoding, a quantum autoencoder, a quantum JPEG, and quantum sound compression.
- Superdense coding, photons, many worlds, shared QRAM, and a server — your phone sends a program, your laptop runs it and sends the answer back.
918 of 922 tests pass across 66 suites. The only failures are 4 known fixture-state failures in the parked vault module, unchanged from v1.0. Every number in the README is backed by a test you can run yourself.
How it breaks classical assumptions
- Information must live inside things — broken. Entangled waves, GHZ memory, and teleportation store bits in relationships; no part holds the bit alone.
- The observer stands outside the system — broken. Asking collapses. Attention reweights. Observers hold different views until they ask.
- Storage means addressed places — broken. A wave memory returns text exactly from a random half of its points.
What it is not — the honest limits
Q-Code is a simulator. The states are computed on a classical CPU. There is no quantum hardware, no wall-clock speedup, and it cannot break encryption. Shor's algorithm here is a simulator demo on small numbers, not a threat to RSA. The sparse backend only wins when the state stays sparse — a dense superposition over all 2^n basis states is not helped. It does not send signals faster than light, it does not let you choose which branch of the multiverse you land in, and it cannot compress random data — nothing can. Holevo's bound is a theorem: n qubits give back n bits. What compresses is structure. The README states every limit plainly, with the numbers.
Source and license
MIT License, copyright 2026 Cameron Mooklal. The zip contains the full source, all 66 test suites, the examples, the specs, and the README. See LICENSE in the zip. All versions · Patch notes
Q-Code v1.7 — built November 6, 2026. The language's name is Q-Code. The "all 200+" program is complete.