Skip to content
View twobombs's full-sized avatar
🌊
time draws the fractal of causality
🌊
time draws the fractal of causality

Organizations

@ThereminQ

Block or report twobombs

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
twobombs/README.md

🏠 Home of ThereminQ - QuantumOPS ⚛️ Cloud ☁️ Native Toolbox ⚒️ Quantum Workloads 👷 Visualisations 🖼️

Screenshot from 2026-01-01 15-36-30

ThereminQ: Horizontally Scaled Quantum Circuit Simulation, Post-Quantum Infrastructure and Local Ai Tooling on Commodity OpenCL Hardware

Aryan Jacques Blaauw (ORCID 0000-0002-5657-7824) Independent researcher, twobombs

Status report, revision of 28 November 2026. Covers repository activity from 1 August 2026 to 28 November 2026.


Abstract

ThereminQ is a containerised research stack for exact and approximate quantum circuit simulation built on the OpenCL-accelerated Qrack / PyQrack simulator [1], together with post-quantum cryptography (PQC) infrastructure and fully local agentic Ai tooling. Its working thesis is that quantum workloads scale more practically horizontally, as modular patches joined at seams, than vertically as one monolithic state vector. This report summarises the state of the project after the August to November 2026 cycle. The main results are: (i) a single consolidated 20,000+ line simulation tool that reproduces IBM Nighthawk random-circuit-sampling releases bit for bit [6] and extends them to multi-chip "cloverfield" models of the announced 520-qubit Nighthawk r3 and its two-chip 1,040-qubit system [7]; (ii) a quantitative account of seam behaviour under Automatic Circuit Elision (ACE), including GHZ fidelity, Shor-code and VQE transfer across seams, and a measured "quantum NUMA" cost for multi-hop chip links; (iii) a 1,080-site Kitaev Z₂ lattice-gauge emulation of a W7-X-like stellarator on 40 × 27-qubit manifolds, with its lattice facts machine-checked in Lean 4; (iv) the Wallfacer PQC enclave and a dual-stack ML-DSA web-ingress migration kit with 138 automated checks; (v) a geometric sparse-inference engine with a PyQrack execution path; and (vi) a local-only recursive self-improvement research pipeline. All acceleration targets OpenCL and Vulkan; CUDA is not required.

Keywords: quantum circuit simulation, Automatic Circuit Elision, modular quantum architectures, IBM Nighthawk, random circuit sampling, Kitaev model, post-quantum cryptography, ML-DSA, sparse inference, OpenCL


1. Introduction

Classical simulation of a quantum circuit with n qubits costs 2ⁿ amplitudes in the dense case. Qrack's ACE backend (QrackAceBackend) instead partitions a register into patches with long-range "seams", trading exactness at the seams for memory that grows with patch size rather than register size [1]. ThereminQ uses this as a laboratory for the question hardware vendors face as well: how much fidelity is lost, and where, when a device is built from linked modules rather than one die.

Research question Where it is studied Section
How faithfully can patched (ACE) simulation reproduce published hardware experiments? thereminq-examples/devices/released/nighthawk 3.1
What does a link between chips cost, and how does it grow with hop count? thereminq-examples/devices/announced/nighthawk-r3 3.2
Can a physically motivated lattice-gauge model be split into small exact manifolds and repaired at the seams? thereminq-examples/devices/announced/stellarator 3.3
What does a practical migration to NIST PQC primitives look like for an existing site or enclave? thereminq-pqc 3.4
Can quantum-inspired geometry reduce the work of dense LLM inference? thereminq-holoqubed 3.5
Can a research pipeline run entirely on local, metered hardware? thereminq-autoresearch 3.6

2. System Architecture

2.1 Components

Every component lives in its own repository and is built as one or more container images by this repository's Docker-in-Docker build system (Section 6).

Repository Role Last commit Commits since 2026-08-01 State
thereminq-examples Algorithms, applications, patch architectures and device studies 2026-11-28 374 Active, primary research output
thereminq-autoresearch Local multi-tier agentic research pipeline (RSI variant) 2026-11-15 195 Active
thereminq-desktop XFCE VDI base image, Mesa Rusticl / Vulkan GPU stack, ARM64 build 2026-10-08 56 Maintained
thereminq-tensors Quantum VDI images (PyQrack, Qiskit, Cirq, Mitiq), :jupyter workspace 2026-10-08 30 Maintained
thereminq-llama llama.cpp images with QC data and agent runtimes 2026-09-21 29 Maintained
thereminq-pqc Wallfacer PQC enclave, paper QR key-roll, PQC web ingress 2026-11-28 19 Active
thereminq-holoqubed Sparse holographic / geometric Ai inference engine 2026-11-11 8 Active
twobombs Build system for all images 2026-09-16 8 Maintained
thereminq-hpc HPC QC package: OpenCL (pocl), CUDA, Qiskit, AWS Braket backends 2026-02-24 0 Stable
thereminq-classiq Classiq integration, Sycamore-56 material 2026-01-10 0 Stable
thereminq-bonsai Bonsai visualisation for ThereminQ-Classic 2026-01-10 0 Legacy
thereminq Original ThereminQ stack 2026-01-17 0 Legacy

Models used by the Ai images are pulled at build and run time from the ThereminQ Hugging Face organisation, in some cases modified or quantised for their purpose.

2.2 Hardware and backend policy

Item Policy
Accelerator API OpenCL (Mesa Rusticl, pocl, clvk) and Vulkan; no CUDA dependency in current work
Reference host multi-die AMD Radeon Pro V340 (8 GB per die) on a many-core EPYC host; Google Colab L4 for notebooks
Sizing memory budgets read from detected RAM / VRAM at run time, not hard-coded card footprints
Ai workloads local only, containerised, resource- and egress-metered; no agentic cloud instances

3. Results and Status

3.1 Exact-reference studies of IBM Nighthawk

devices/released/nighthawk/ rebuilds the circuits of the 61-qubit ibm_phoenix random-circuit-sampling release [6] and runs them under exact and ACE backends. Each sub-folder carries METHODOLOGY.md and RESULTS.md (experiments E1 to E34, results as of 28 October 2026).

Sub-folder Focus
rcs-nighthawk mirror, patched, full and forward XEB; first cloverfield and loom
vqe-nighthawk VQE on two-patch ACE ladders, 16 to 28 qubits
ghz-nighthawk chip-wide GHZ fidelity, Walsh-echo (anti-OTOC) crosstalk refocusing for Shor order finding
shrs-nighthawk Shor order finding and Shor's 9-qubit code across seams
dual-nighthawk dual-chip maps, QrackBridge benchmark, 3D graphs
erepr-nighthawk traversable-wormhole Hamiltonian on two chips joined by the loom
bro-nighthawk Doped Clifford Sampling XEB toolkit for IBM's verifiable-fidelity experiment [2], [3]

Table 1. Selected measured results (source: RESULTS.md of the sub-folders).

Experiment Result
E1, E2: release reproduction all released circuits regenerated identically (angles within 10⁻⁹ rad); hardware XEB reproduced within 0.05 σ per (K, d)
E3: patch placement, n = 27, d = 8 XEB 0.008 with device placement, 0.321 with tiled placement
E7, E8: 61 qubits, three patches 2.3 × the device's fidelity at d = 4 to 6, 1/160 at d = 20
E9: seam cost about 0.025 per replica coupler per cycle; two patches outperform three at 49 qubits
E11: two patches, 61 qubits level with the device at d = 4 to 6 on its own circuits
E18: mirror Hamming-weight signal, 16 to 57 qubits 0.95 to 1.11 × the reference model at d = 4 to 6 from 36 to 57 qubits
E19: VQE across a seam, 16 to 28 qubits optimised angles transfer (88 % to 99.7 % of the correlation energy); the seam acts as local dephasing and never undershoots E₀
E21: GHZ units vs seam distance F = 1.000 at distance ≥ 1 from a seam qubit; 0.77 with one seam CX, 0.43 with two
E24: seam error correction replica repetition code restores every unit held by one simulator to the exact reference
E31: loom as a hard cut every GHZ unit across a hard cut sits at the separable bound 0.50, confirming no hidden coherence crosses the loom
E32: QrackBridge instead of the loom exact at max_bonds = 6; below demand it carries max_bonds whole units per circuit

Shot-based XEB, Quantum Volume and postselection are treated as observables with known limitations [4], [5]; following the analysis in E16, the mirror Hamming-weight signal is the primary observable for the ACE ladder.

3.2 Consolidated tool and multi-chip Nighthawk r3 models

devices/announced/nighthawk-r3/ merges all of Section 3.1 (except the DCS toolkit) into one entry point, nighthawk_qrack.py, with a Colab notebook (open in Colab).

Property Value
Size 20,680 lines; five command groups (main, ghz, field, erepr, lab)
Backends QrackSimulator, QrackAceBackend, QrackBridge; OpenCL or CPU
Self-tests selftest 14/14, ghz selftest 20/20, field selftest 15/15, lab --selftest 10/10
Inter-chip models ghost loom, mean-field loom, hard cut, QrackBridge

Table 2. Device presets aligned to IBM's stated roadmap (IBM newsroom 11 Nov 2026; [7]).

Preset Qubits Represents
r2 120 Nighthawk r2, one chip
r1x2 240 IBM's two-chip r1 l-coupler demonstration (4 l-couplers)
r3 520 Nighthawk r3, one chip; lattice inferred as 20 × 26 from IBM's 2,034 physical qubits
r3t 520 r3 as four tiles woven by the loom, same 994 couplers
r3x2 1,040 two r3 chips, 10 l-couplers: the system planned for 2027
r3x2s 240 r3x2 scaled to 120-qubit chips for small hosts
clover6, clover12 720, 1,440 hypothetical six- and twelve-chiplet fields (not IBM devices)

Table 3. Quantum NUMA: Bell-pair cost between chips on a six-chip field (lab --bell).

Topology l-couplers Mean / max hops CX per pair Pairs readable in an end chip
grid 7 1.67 / 3 6.7 7 of 15
ring 6 1.80 / 3 7.5 6 of 15
wheel (all-to-all) 15 1.00 / 1 1.0 15 of 15

With IBM's measured r1 distant-CZ fidelity and an assumed 0.3 % per on-chip CX, estimated pair survival is about 0.95 at one hop, 0.83 at two and 0.73 at three. Single-hop all-to-all chip connectivity removes the multi-hop penalty; the planned two-chip r3 system corresponds to the one-hop row.

Table 4. clover6 measured on CPU (mean loom, Hamming signal 1 - 2h).

Depth Woven links Links cut
4 0.730 0.843
6 0.419 0.631
8 0.219 0.422

Status. Until IBM publishes architectural, topological and performance figures for r3, the r3 presets test circuit mechanics, not device function. A NaN in QrackAceBackend with error detection enabled beyond about four cycles is open upstream; runs use --no-ace-error-detection meanwhile. A virtual ER=EPR device specification (ER-GATE) is formalised as erepr stargate with resource budgets and 13/13 self-tests, and lives at devices/virtual/stargate/.

3.3 Kitaev Z₂ stellarator on 40 × 27-qubit manifolds

devices/announced/stellarator/ maps a five-field-period, W7-X-like helias geometry onto a 3-valent, 3-edge-colourable Kitaev lattice [8] and decomposes it into dense 27-qubit PyQrack blocks (1 GiB each in complex64), repaired at the seams by Gaussian entanglement-Hamiltonian terms.

Quantity Value
Sites / bonds 1,080 / 1,620 over 5 nested flux shells
Manifolds 40 × 27 qubits, 4 canonical block types under D₅ symmetry
Ground energy, true minimum flux sector (Candidate H) E₀ / site = -0.7731725623
Edge Majorana zero modes 2, bulk gap 0.211, 95.4 % weight on the two outer shells
Validation rungs F1 to F4 (16 q to 1,080 q) pass; full machine kick error 1.4 % vs 109.2 % uncoupled
Cat-entangler seams teleported circuit exact on complex128 (RMS 2.2 × 10⁻¹⁴)
Lean 4 certificate lattice, colouring, partition and resource lemmas; headline theorem Stellarator.modular_kitaev_stellarator, no sorry

Status. Exploratory. The lattice and resource facts are machine-checked; the stellarator-physics interpretation (Shafranov shift, MHD limit and related criteria) is a model mapping, and the directory README marks its text as generated and unreviewed.

3.4 Post-quantum infrastructure: ThereminQ-PQC

thereminq-pqc targets OpenSSL 3.5 on Debian 13 with ML-DSA, ML-KEM, SLH-DSA and Classic McEliece (via Rosenpass).

Deliverable Content Verification
Wallfacer enclave four layers: WireGuard + Rosenpass dark perimeter, offline ML-DSA-87 PKI, fail-closed artifact and GGUF signature checks, semantic LLM gatekeeper; 8 container images 29 gatekeeper unit tests
Paper QR key-roll out-of-band A4 QR relay for PQC keys and PSKs (Base45 frames, CRC32, SHA3-256 manifest), replacing the radio layer 15 unit and end-to-end tests
PQC web ingress dual-stack classical + ML-DSA certificates for nginx, Apache, edge containers and Kubernetes; readiness grader pqc-eval (L0 to L3), atomic config migration with rollback 138 checks: 54 host, 33 edge, 18 Chromium 156, 33 Kubernetes

3.5 Sparse and geometric inference: ThereminQ HoloQubed

thereminq-holoqubed explores replacing dense MLP evaluation with geometric routing. The Atlas engine builds a low-rank chart of MLP inputs and skips neurons whose pre-activation cannot plausibly become positive for a given token; it serves an OpenAI-compatible API.

Measurement Result
QrackBridge weight landscape, OPT-125m layer 0, 12 qubits fidelity 1.000 and top-8 recall 100 % at 6 bonds; 0.934 / 78.1 % at 5 bonds
4-bit scalar tiles, Qwen3-0.6B (qconvert) perplexity 29.61, top-1 agreement 88.0 % with dense; model 1.50 GB to about 0.85 GB
Same with qneuron (quantum-format) gating perplexity 29.53, top-1 agreement 84.1 %
One layer executed in PyQrack 6 greedy tokens identical to emulation, max logit difference 6.1 × 10⁻⁵
Unitary model (holoqubed_unitary.py) natively unitary character-level sequential Born machine, OpenCL gradients; in progress

Status. Prototype. Full-model PyQrack execution is estimated at about 4.7 hours per token on a 2-vCPU VM; the quantum path is a measurement instrument, not a production inference path.

3.6 Local agentic research: ThereminQ-Autoresearch

thereminq-autoresearch runs a prompt, document or repository through a swarm of local quantised models (llama.cpp, Vulkan) and returns a tested, executed project with a grounded write-up.

Item State
Current pipeline autoresearch-rsi-onefile.py: two tiers (apex + workers), mechanical consolidation, recursive self-improvement of the exploration policy after Dream-RSI
Verification layer grounded runs, negative controls, shortcut detection, routed findings, cross-round iteration; a metric counts only if it responds to a negative control
Infrastructure six-GPU swarm launchers, VRAM-aware tier launcher, OpenAI-to-Gemini gateway for hardening runs, PyQrack MCP server
Latest change (Nov 2026) Qwen 3.8 model downloads and revised llama-server launch parameters

3.7 Container platform

Change (Aug to Oct 2026) Repository
Mesa Rusticl FP16 build script with Vulkan, AMD, Intel (iris) and nouveau / NVK support; clvk installer thereminq-desktop
ARM64 desktop image (Dockerfile-arm, Ubuntu 26.04) built on-device with proot-distro in Termux thereminq-desktop, twobombs
:jupyter workspace: PyQrack complex128, OR-Tools, OpenAI client, port 9931, ARM variant thereminq-tensors
Qrack and PyQrack sources cloned into the builder twobombs
NVIDIA Docker path deprecated thereminq-desktop

4. Other Active Lines in thereminq-examples

Path Content
algorithms/ 19 modules (ER=EPR, HHL, Shor variants, QAOA, QEC, OTOC echoes, QFT condensate, QLLM backdoor audit, RCS nn_qab, SDRP-parameterised ZNE, VQE, VQLS); bibliography verified against arXiv on 2026-11-10
architecture/cloverleaf-fences/ distributed ACE engines, SU(2)/XYZ ground states by topology up to 4,096 qubits, K4 hyperoctagon embeddings via CP-SAT
architecture/sk-qd-early-cloverfield/ SKQD Krylov ground-state refinement for TFIM, ZeroMQ orchestrator and workers
applications/ factoring, HPC runners, Ising / TFIM, peaked circuits, holographic tensor networks

5. Limitations and Open Problems

Area Limitation
ACE seams fidelity loss concentrates on seam units; no amplifier scales it, so zero-noise extrapolation does not recover it (E23)
Inter-chip links the loom is a hard cut by design; coherence across it is only available through QrackBridge, bounded by max_bonds
Quantum NUMA multi-hop links between chiplets dominate error on far chip pairs; topology, not simulation, is the open problem
Nighthawk r3 no public topology or performance data; presets are inferred from IBM's totals
Upstream QrackAceBackend NaN with error detection on deep circuits; OpenCL async dispatch handled by the opt-in QRACK_OCL_SYNC switch
Stellarator, HoloQubed prototype status; physics and model-quality claims need independent review

6. Build System and Usage

The build system is self-contained and uses Docker-in-Docker.

File Function
Dockerfile builder image from cruizba/ubuntu-dind with docker-buildx and git; clones every component repository plus Qrack and PyQrack into /build
buildall.sh starts a local registry and web UI, builds the twobombs/twobombs image, then runs each component build in its own detached container
runfiles/*.sh per-component docker build logic (thereminq-hpc.sh, thereminq-llama.sh, ...)
thereminq-desktop-arm.sh Termux / proot-distro build of the ARM64 desktop image
publish-*.sh retag images from the local registry and push them to Docker Hub
git clone https://github.com/twobombs/twobombs.git
cd twobombs
docker build --no-cache -f Dockerfile . -t twobombs/twobombs
docker run -ti --privileged --net=host twobombs/twobombs bash buildall.sh
Step Command
Monitor builds docker ps, then docker logs -f <container_name>
Browse the local registry http://localhost
Publish one component (Docker Hub credentials required) ./publish-thereminq-tensors.sh

--privileged is required for Docker-in-Docker; --net=host lets the build containers share the host network.

Quick start for the research workspace:

docker run --gpus all --device=/dev/dri:/dev/dri -d twobombs/thereminq-tensors:jupyter [-m 16g --memory-swap 320g]

How to Cite

See CITATION.cff. ThereminQ builds on Qrack [1]; please cite it alongside this software.


References

[1] D. Strano, B. Bollay, A. Blaauw, N. Shammah, W. J. Zeng, and A. Mari, "Exact and approximate simulation of large quantum circuits on a single GPU," Proc. IEEE QCE, pp. 949-958 (2023), arXiv:2304.14969.

[2] S. Martiel, J.-U. Chung, A. Seif, S. Ghosh, I. Hincks et al., "Sampling hard circuits with verifiably high fidelity," (2026), arXiv:2607.25941.

[3] H. Manabe, H. Gu, and F. Pan, "Classical Simulation and Design Frontiers for IBM's Doped Clifford Sampling Experiment," (2026), arXiv:2608.13110.

[4] B. Barak, C.-N. Chou, and X. Gao, "Spoofing Linear Cross-Entropy Benchmarking in Shallow Quantum Circuits," (2020), arXiv:2005.02421.

[5] B. Ware, A. Deshpande, D. Hangleiter, P. Niroula, B. Fefferman et al., "A sharp phase transition in linear cross-entropy benchmarking," (2023), arXiv:2305.04954.

[6] T. Sedrakyan, Y. Zhang, H. Karapetyan, J. D. Baktay, H. Gharibyan et al., "Quantum computational advantage in random-circuit sampling on IBM superconducting quantum computers," (2026), arXiv:2609.28657.

[7] IBM Quantum, l-couplers between two Nighthawk r1 chips, (2026), arXiv:2610.29986; IBM newsroom, Nighthawk r3 announcement, 11 November 2026.

[8] A. Kitaev, "Anyons in an exactly solved model and beyond," Annals of Physics 321, 2-111 (2006), arXiv:cond-mat/0506438.


Contact

Working on horizontally scaled circuit simulation, post-quantum infrastructure and local Quantum + Ai research
Ask me about Quantum Ai agents, quantum chemistry and fast scrambling for Great Benefit of Glorious Iterations
Reach me Twitter, Discord (modern BBS)
Advice on ThereminQ QuantOPS QC/Ai integrations book a slot
Fun fact Twobombs is a BBS handle and derives from an arcane exception on the AtariST

Twobombs's GitHub stats

ThereminQ is a software and hardware simulation stack made from a large number of open source projects; any and all rights belong to their respective owners. If your code resides in any of these container images and you do not want it there, please let me know.

Code of conduct: Contributor Covenant

Pinned Loading

  1. thereminq-tensors thereminq-tensors Public

    ThereminQ-Tensors is a comprehensive suite of Docker images designed for Quantum computing research and development. It provides a VDI (Virtual Desktop Infrastructure) environment with a wide range…

    Python

  2. thereminq-holoqubed thereminq-holoqubed Public

    An experimental, quantum-inspired, sparse holographic AI inference engine

    Python

  3. thereminq-autoresearch thereminq-autoresearch Public

    The nexus for agentic automation in the ThereminQ project: repo ingestion, deep research, recursive self-improvement, unit-test telemetry and generative reporting, over a local Vulkan-backed llama.…

    Python

  4. thereminq-examples thereminq-examples Public

    Experimental configurations & examples for use and development on the ThereminQ platform

    Jupyter Notebook

  5. thereminq-hpc thereminq-hpc Public

    ThereminQ HPC QuantumOPS

    Python 1

  6. thereminq-llama thereminq-llama Public

    ThereminQ - LLama QuantOPS : dedicated to interaction and training LLaMa's with QC data

    Python 2