QUANTUM ENGINES
Reproducible RFQ decision laboratory | 28 October 2026

RUN THE SAVED APPLICATION
Extract source.zip. From its top-level directory run:
  python3 -m http.server 4791 --bind 127.0.0.1 --directory app
Open http://127.0.0.1:4791
The saved application needs no installation, account, API or network feed.

REPRODUCE THE EXPERIMENT
Requires Node.js 20+ and Python 3 for the optional preview server.
Measured reference runtime: Node v24.18.0 on Apple M1 Max, macOS arm64, 32 GB.
No third-party packages are required.
  node --test work/engine.test.mjs
  node work/build.mjs
This regenerates app/evidence.json, app/replay.json and work/synthetic-data.json.
Timing values and generatedAt naturally change. Seeded inputs and policy results
should agree, allowing normal floating-point variation between JS engines.
The original run is preserved in outputs/evidence.json in this bundle.

FILES
app/engine.mjs             Generator, filter, integration and decisions
app/ui.mjs                 Browser interface and rendering
app/benchmark-worker.mjs   Fresh dedicated browser benchmark worker
work/build.mjs             Chronological experiment and evidence generation
work/cold.mjs              Fresh-process benchmark entry point
work/engine.test.mjs       Numerical, causal and simulation checks
work/synthetic-data.json   All 6,000 reproducible observations and evaluator truth
outputs/evidence.json     Saved run with seed, input SHA-256, metrics and timings

PHONE DEMONSTRATION
Open /#demo for a continuous interactive walkthrough without changing sections.
Phones default to this view when no section is specified. The live quote controls,
outcome, evidence, benchmark and original proposal are available on one page.
The full laboratory also has a dedicated Research proposal view at /#research.

FIVE-MINUTE DEMONSTRATION
1. Choose Buying pressure. Explain the distinction between observations and the
   uncertain state estimate. Nothing after the RFQ is visible until revelation.
2. Move the quote towards zero. More fills can mean negative expected value.
   Use model quote to balance spread capture, conditional markout and costs.
3. Change inventory. A sale reduces a long position but deepens a short one.
   Reveal one outcome. A single random result differs from an expectation.
4. Open Evidence. The information comparison keeps the optimiser fixed.
   Then run the actual CPU benchmark. Precomputation changes runtime.
5. Under the hood gives the equations, limitations and two next experiments.

MODEL
This is an ask-only, one-step decision model with known, specified parameters.
Hidden directional state z is -1, 0 or +1, with a stationary Markov chain.
The policy receives two Gaussian observations and the current inventory.
It never receives realised z, private shocks, fills or future markouts.
The filter deliberately ignores additional information in past midpoint moves.
The Bayesian filter is an assumed-correct reference, not an empirically trained
model. Historical context from Finn's research was read only. No existing research
code, private RFQs, CV, portal or manuscript is included or reproduced here.

Fill probability is sigmoid(1.7 - 1.15*quote + 0.9*z + 0.9*e).
The five-second midpoint change is 1.5*z + 0.65*e + 0.65*epsilon.
e and epsilon are independent standard normal shocks before fill selection.
The shared private shock e makes conditional markouts adverse.
Execution and hedge cost is 0.16 + 0.04*abs(q-1) basis points per fill.
Inventory adjustment is 0.12*((q-1)^2-q^2) basis points per fill.
Candidate sell quotes are 0.0 to 4.0 basis points in steps of 0.1, plus decline.
The objective is expected fill times net marked value minus inventory adjustment.
These are relative price basis points per unit notional, with no currency-P&L claim.

PREVENTING LEAKAGE
Seed 271828 generates 6,000 RFQs in order. Training IDs 0-2999 choose the fixed
quote using realised training outcomes. Validation IDs 3000-3999 choose the
first Simpson resolution in [16,32,64,128,256] meeting 1e-7 bp error and zero
decision differences. Test IDs 4000-5999 are held out from both choices.
Filters carry observations forward causally across partitions. There is no
future normalisation, smoothing or fitted scaler. The precomputed table depends
only on stated model parameters and the selected numerical resolution.
RFQs are 10 seconds apart. Each markout arrives 5 seconds after its RFQ.
Examples in the UI are selected by pre-decision posterior, not outcome value.
Poisoned truth fields and future perturbation tests verify the policy boundary.

EVALUATION
State blind uses stationary state probabilities with the same inventory-aware
optimiser. The fixed-quote baseline is selected solely on training outcomes.
Expected values integrate future shocks conditional on held-out hidden states,
and therefore use truth only in evaluation. Realised counterfactuals share the
same fill uniform and price shocks across policies. This is possible because
the synthetic environment assumes no policy feedback on the market.
Inventories are independent snapshots sampled from -3 to +3. Consequently,
averages are one-step decision metrics, not a self-financing strategy P&L.
The paired 95% interval uses 1,000 block bootstrap resamples of 50 consecutive
RFQs with seed 90210. It does not include model uncertainty.
Fill calibration compares both predictors at the same training-selected quote.
Per-policy Brier fields in the JSON are diagnostic at different selected quotes
and should not be used as an apples-to-apples predictor ranking.

NUMERICS AND TIMING
Offline moments are A=E[fill] and B=E[fill*markout] for each of 3 states and
41 quotes. Online value is sum_z posterior[z]*(A*(quote-cost-risk)-B).
Composite Simpson integration uses private shocks from -9 to +9.
Normal tail probability excluded is below 2.3e-19. Validation selected 64 panels.
The independent test reference recomputes the integrals with 1,024 panels.
Tests also compare independent midpoint quadrature and seeded Monte Carlo.
State uncertainty is unrelated to the small observed numerical discrepancy.

Each saved timing method runs in a separate fresh Node process. Each browser
method runs in a separate fresh worker. The first measured calculation is cold.
It includes table creation for cached computation, then filtering, scanning
41 candidate quotes and selecting the best action for 128 consecutive RFQs.
One untimed warmup precedes nine warm timed batches. Median and descriptive p95
are reported. The speed comparison uses direct and cached 64-panel computation
at the same validated accuracy. The 1,024-panel result is an accuracy reference.
Data generation, input decoding, module loading, rendering and network are
excluded from calculation timing. The Node launch-to-exit duration is retained
separately and includes the full multi-batch benchmark process.
Batch time divided by 128 is average computation per RFQ, not tail latency or
an individual request latency guarantee. This is CPU precomputation, not a GPU
measurement, quantum speedup or fastest-possible classical implementation claim.

PROPOSED EXTENSIONS
No quantum circuits, physical QPU access or NVIDIA GPU execution are implemented.
Quantum: compare small deterministic simulated-circuit features with strong
classical/nonlinear/random features on identical splits, including total cost.
GPU: test batches of 128, 1,024 and 16,384 scenarios on authorised hardware.
Include compilation, allocation, transfer, synchronisation, precision, memory,
decision error, amortisation and cold/warm total timing. Report a slowdown if seen.

PRIMARY SOURCES
https://arxiv.org/html/2509.17715v1
https://arxiv.org/html/2508.20225v6
https://arxiv.org/html/2608.02002v2
https://arxiv.org/html/2407.04510
https://arxiv.org/abs/2511.02136
https://arxiv.org/html/2412.19027v3
https://developer.nvidia.com/cuquantum-sdk
https://developer.nvidia.com/cuda-q
The first paper was read in full, including architecture, 4.2, 4.3 and appendix.
Its hardware-noise and processing-order concerns are not solved by this toy.
The demonstration does not reproduce those papers or establish algorithmic novelty.

DEPLOYMENT
Only the app directory is deployed to an isolated static Cloudflare Pages project.
There is no server function, database, credential, analytics SDK or recurring job.
The simulator and benchmark run on the visitor's CPU. Existing private sites,
root site, email records and access boundaries are separate and unchanged.

EXISTING GPU RESEARCH PROPOSAL
research/GPU_Research_Proposal.pdf is Finn Smith's exact three-page research
proposal and discussion draft of 27 October 2026, published with his authorisation.
The PNG pages are renderings for convenient reading inside the application.
The source manuscript has not been edited. It proposes adaptive precision,
iterative refinement and factorisation refresh across sparse/KKT system sequences.
The current HMM, quote grid and scalar Simpson moments do not implement or
validate that method. Future constrained quote/hedge problems might supply such
system sequences, subject to an explicit formulation and fair accuracy checks.
The proposal's first study remains control or engineering constrained optimisation.
