Reproduce the headline combinatorial results of the TrueLoop Compute runtime, on your own machine, against either the hosted endpoint or a licensed offline build -- with the same scripts and a single environment variable to switch between them.
The runtime is a model-free, retained-state feedback controller whose per-round cost is constant in problem size. These reproductions show what that buys on Max-Cut / Ising: under a real-time deadline at scale, it keeps returning usable solutions in the regime where classical digital search stalls to no-better-than-random.
Honest scope. This is not a claim that the runtime beats classical solvers at ample budget -- it does not, and the scripts will show classical methods winning when they have time. The claim is about the deadline-limited, large-n regime where digital search stalls. "Usable" means beats a random guess by >3 sigma, not optimal. And the cost model (one parallel measurement per round, constant in n) is the premise the hardware program is validating; on a CPU we charge each method its modelled cost to expose the crossover the hardware implies.
- Python 3.8+ (standard library only -- no third-party dependencies required).
- Access to the runtime, via one of:
- Endpoint: a free evaluation key from https://trueloopcompute.com (works for n <= 4096).
- Offline build: a licensed, watermarked offline build (any n, no cap).
You do not get the runtime/method in this repo -- see NOTICE. This repo is the
reproduction code; the runtime runs server-side (endpoint) or inside a separately
licensed compiled package (offline build).
export TRUELOOP_KEY=EVAL-xxxxxxxxxxxxxxxxxxxxxxxx # your evaluation key
export TRUELOOP_BACKEND=endpoint # (this is the default)
python3 reproductions/01_deadline_window.py
# or run all four:
./run_all.shUnzip your licensed offline build. It contains a trueloop/ package. Point Python at the
folder that contains that package, flip one variable, and re-run the exact same scripts:
export TRUELOOP_BACKEND=offline
export PYTHONPATH=/path/to/trueloop_offline # folder containing the 'trueloop' package
# (no key needed offline -- the build is licensed/watermarked itself)
python3 reproductions/03_scaling_ratio.py --sizes 5000,10000,100000That is the whole swap. Every script takes --backend endpoint|offline too, if you prefer
flags over environment variables. Where the two backends overlap (n <= 4096) they produce
the same result up to sampling noise.
| # | Script | What it shows |
|---|---|---|
| 1 | 01_deadline_window.py |
A deadline band where the runtime beats both blind parallel sampling and stalled digital search. Too tight: blind wins. Too loose: digital recovers. In the band: runtime wins on both fronts. The band widens and the margin grows with n. |
| 2 | 02_survival_frontier.py |
The survival frontier: at large n under a real-time deadline, digital methods stall (no better than random) while the runtime survives (returns a usable solution, >3 sigma over random). Use --backend offline --n 100000 to see it at massive scale. |
| 3 | 03_scaling_ratio.py |
The scaling law: SWC/digital rises with n (crossover ~n=3000), and digital touches a shrinking fraction of nodes as its per-flip cost grows -- it stalls while the runtime's rounds stay constant-cost. |
| 4 | 04_measurement_efficiency.py |
The original measurement-efficiency result: holding a drifting target under one measurement per round, the runtime tracks several times tighter than a finite-difference gradient method, and the gap widens with channel count. |
Each script has --help. Defaults are chosen to run in a few minutes on the endpoint and
to land inside the regime where the effect is clean.
The published survival result (SWC survives 6-7 of 7 instances at n=100,000 under an 8-16ms deadline while digital survives ~1 of 7) is an offline-build result, because the hosted endpoint caps sessions at n <= 4096:
export TRUELOOP_BACKEND=offline
export PYTHONPATH=/path/to/trueloop_offline
python3 reproductions/02_survival_frontier.py --n 100000 --deadline 16 --seeds 7(At n=100000 you may install numpy and it will be used if present to speed up scoring;
it is optional.)
swc_backend.py exposes one function, open_session(...), returning an object with
.step(measurement, score=, target=) and .end(). It dispatches to:
- endpoint -- raw HTTP to
/api/session/*(standard library only), or - offline -- the licensed compiled
truelooppackage in-process.
Every reproduction script calls only open_session, so none of them know or care which
backend is active. That is the seam that makes the swap seamless.
The reproduction code here is MIT (LICENSE). It grants you no rights to the runtime
itself -- see NOTICE. The runtime is proprietary and accessed under its own terms
(evaluation key or paid offline build).
Questions, or a result that does not reproduce on your setup? That is exactly what we want to hear: matthew@trueloopcompute.com