| name | quantum-hypothesis-simulation |
| description | Use when evidence arrives in an ORDER that matters, when hypotheses interfere/are non-commuting, when you need the Schmidt coupling criterion for the cross-reference engine, or when a classical Bayes model may be missing order-effects â quantum-hypothesis-tracker.mjs does real-valued Hilbert-space hypothesis tracking (superposition until measurement, order-aware sequential evidence, QQ-equality), gated to beat classical Bayes on order-sensitive data without spurious control wins. Tier 3 of YURI's 4-tier simulation arsenal. |
| triggers | ["/quantum-sim","/qsim","quantum sim","quantum simulation","order effect","hypothesis superposition","quantum vs bayes","schmidt coupling","non-commuting evidence","simulation arsenal","decide under uncertainty"] |
| scope | harness |
| invocation | ability |
Quantum Hypothesis Simulation
The quantum-probability layer for YURI's claim/pulse machinery, and tier 3 of the simulation arsenal. It models hypotheses as a superposition in a real-valued Hilbert space (â^N) that only projects (collapses) when evidence is applied â so the ORDER evidence arrives in changes the posterior. That is the one thing a classical order-blind Bayes update structurally cannot represent, and it is the whole point: when P(H | A then B) â P(H | B then A), this is the right instrument.
Engine: _SYSTEM/Scripts/quantum-hypothesis-tracker.mjs (313 lines, 19 exports). Falsification gate: _SYSTEM/Scripts/quantum-vs-bayes-benchmark.mjs. GATE re-verified PASS 2026-06-14 on current code (G1âG4 all true; tracker unit tests 5/5; eval-processing 11/11; validated at a 15M-eval scale). Wired as an instrument of probabilistic-decision-core. Living system â actively being built; the public export API is stable (method-map below intact) but internals + the surrounding arsenal keep moving, so re-read the source before relying on a fine detail.
The simulation arsenal (where this sits) â faeb5b67 (arsenal) â 15cfc088 (learn-loop closed)
A decision-under-uncertainty pipeline: measure â robustify â commit â learn.
izanagi-simulator (/izanagi) â qualitative 3-branch commit (EV Ă reversibility Ă blast). The fast "should I even branch" front.
decision-sim.mjs â robust optimization: robustScore (0.5·mean + 0.5·CVaR), minimaxRegret, pgdWitness (flip-rule), crossEntropyOptimize, infoGapHorizon, multiverse, + halton/sobolish QMC. Reproducible (seeded makeRng). 7/7 green.
quantum-hypothesis-tracker.mjs â you are here â order-aware evidence (below).
izanagi-bridge.mjs (@capability: izanagi-decision-bridge) â turns measured/MC option values into a robust ruling: CVaR + minimax-regret + PGD with an AUTOMATIC corner-law vertex guard (enumerates paramSpace vertices where an affine/multilinear worst case hides from interior sampling) + per-axis flip thresholds. Demo-validated (runDemo), no unit test yet. This is izanagi made computational.
- Learn-loop edge:
izanagiRuling(âŠ, {record:true}) writes the prediction to prediction-ledger.mjs (opt-in, off by default). CLOSED 2026-06-13 (15cfc088): prediction-outcome-resolver.mjs (@capability) re-runs propagation-scan on aged unresolved predictions, scores predicted-vs-observed, records outcomes + populates calibration â idempotent, execFileSync-safe, REPO_ROOT-anchored, live-verified (resolved=1, calibration n=2) + guard test. Remaining edge: a SCHEDULED age-sweep cadence (the resolver runs on-demand; a cron/launchd beat to sweep aged predictions is owner-config).
Reach for izanagi-bridge for "which option do I build / commit under uncertainty"; reach for this quantum tier when the evidence order itself carries information.
Use When (quantum tier specifically)
- Evidence is sequential and order-sensitive â a later observation reframes an earlier one (question-order, framing, anchoring, path-dependent diagnosis).
- Hypotheses interfere / are non-commuting (the projectors don't commute), so a product-of-likelihoods Bayes update loses information.
- You need the Schmidt coupling test â the cross-reference engine's mathematical criterion for whether two subsystems are genuinely coupled vs separable.
- You suspect a classical model is silently missing an order-effect and want a falsifiable test of it.
Skip When
- Evidence is order-independent and exchangeable â plain Bayes (
bayesSequential) is correct and cheaper; don't reach for quantum to look sophisticated.
- You want robust optimization over options, not order-effects â that's
decision-sim / izanagi-bridge.
- The phases need to be complex (full â^N interference) â this engine is â^N only, phases 0 or Ï. Adequate for real-valued projectors; not a complex-interference model.
Method â question map (quantum tracker)
| You want⊠| Function | What it gives |
|---|
| Posterior after an ORDERED evidence sequence | hypothesisPosteriors(state, hypotheses, evidence) | applies each projector in order (collapsing the state), then reads P(H) â order-dependent |
| The raw sequential measurement | measureSequential(projectors, psi) | the order-effect core: project, renormalize, repeat |
| The falsifiable order-effect signature | qqEquality(state, P_A, P_B) | QQ statistic sAB â sBA; the quantum model guarantees â 0 â the Wang-Busemeyer test |
| Are two subsystems genuinely COUPLED | schmidtDecomposition(psi_AB, m, n) | Schmidt spectrum (Jacobi SVD) â the cross-ref engine's coupling criterion (separable â uncoupled) |
| The classical baseline you must BEAT | bayesPosterior / bayesSequential | order-blind posterior â the control |
| Run the whole falsification gate | runBenchmark() (benchmark module) | G1âG4 verdict |
Plus the â^N primitives (dot/norm/normalize/matVec/matMul/projector/diagonalProjector/measure/stateVector). Pure, dependency-free, owner-gate-free â run as a throwaway harness or wire into a sim test.
Eval-processing â turning a million-eval budget into a decision (eval-processing.mjs, NEW)
Reframe (the juicy part): an eval count is a sampling budget, not a result. Needing millions usually means you allocated badly â good design resolves most decisions at thousands; millions are only for rare tails, fine grids, or hi-dim corners. "Processing" collapses N evals â one decision + flip rule + residual CI. The funnel (4 capabilities, 11/11 green as of 15cfc088, all surface via capability-recall); 15cfc088 added residuals â pairedDelta computeUnpaired:false (skip the 2Ă baseline in hot loops) + confidenceSequence sub-Gaussian fallback (range:null for unbounded data, α-control validated on a Gaussian null):
mkAggregator (streaming-aggregator) â Welford moments + Vitter reservoir, O(1) memory, never store the rows.
pairedDelta (crn-paired-delta) â common-random-numbers â variance-reduced A/B delta CI (the biggest free win; computes the unpaired CI too as proof).
confidenceSequence / sequentialDecide (sequential-stopping) â empirical-Bernstein confidence sequence, peek-valid (α-control empirically validated, not just cited; distinct from quantum measureSequential).
heldOutSplit / kFold / conformalQuantile / inSampleVsHeldout (heldout-split) â kills the in-sample ECE=0 optimism trap.
The CI width + flip location are what made the 16M-eval cap-sim honest â not the count.
The proof discipline (this is the precision, not decoration)
A model that "wins everywhere" is overfitting, not an effect. Gates are domain-blind and two-sided â both halves must hold:
- G2 (earns its keep): on real order-effect data (Gallup Clinton/Gore marginals: Clinton 50â57%, Gore 68â60%) quantum RMS must be â„50% below the best classical static model.
- G3 (honesty/control): on synthetic NO-order-effect data quantum must NOT beat classical by more than 0.005 RMS. A win on the control = laundering flexibility as signal â reject.
- G1 machinery recovery; G4 QQ residual on the real joint < 0.05.
- DATA FLAG: the Clinton/Gore JOINT cells are literature-recalled (Wang & Busemeyer 2013) â
OWNER-VERIFY; the marginals are robustly attested and carry G2 on their own.
- Corner law (automated downstream): for an affine/multilinear objective the worst case sits at a VERTEX an interior Dirichlet/uniform sampler hits with probability 0 â
izanagi-bridge.cornerAwareReadout enumerates vertices so a flip can't hide. See [[feedback-affine-objective-enumerate-corners]].
- Promotion path: must beat the classical Bayes baseline on order-sensitive logged sequences before touching any live organ. Until then, advisory.
Boundaries
- Output is advisory until verified against live evidence â the falsification gate IS the verification; don't claim a quantum win without the two-sided G2+G3 pass.
- â^N real-valued only; don't claim complex-interference behavior it doesn't have.
- The arsenal is still being built â value models / bridge constants are hand-encoded (advisory, not measured truth); the learn loop is closed on-demand (
prediction-outcome-resolver scores predictionsâoutcomes), with only a SCHEDULED sweep cadence still owner-config.
Pair with
izanagi-bridge.mjs (@capability: izanagi-decision-bridge) â the measureârobustifyâcommit step; corner-law-guarded ruling from option values.
decision-sim.mjs â robust optimization tier (CVaR / regret / flip-rule / info-gap / multiverse).
eval-processing.mjs â the funnel that turns a quantum/MC sim's evals into an honest decision+CI.
prediction-outcome-resolver.mjs (@capability) â closes the learn loop: scores recorded predictions against observed outcomes (re-runs propagation-scan), populates calibration. Pairs with izanagi-bridge's {record:true} ledger writes.
probabilistic-decision-core (/pdc) â the EV/calibration discipline the tracker sharpens.
cross-reference-navigation (/xref) â the Schmidt coupling test is the cross-ref engine's coupling criterion; use together when judging whether two mechanisms are truly linked.
izanagi-simulator (/izanagi) â the qualitative 3-branch front.
- Recall surface: memory
[[ref-simulation-arsenal]] (the 4-tier map + roadmap) · [[ref-capability-first-wiring]].
Session Notes
2026-06-14
- session: 101m | peak ctx: 0% | compacts: 0
- tools: BashĂ455, ReadĂ142, EditĂ74, WriteĂ44, WebSearchĂ31, WebFetchĂ19, StructuredOutputĂ17, ToolSearchĂ8, TodoWriteĂ5, WorkflowĂ3, AskUserQuestionĂ2, SkillĂ2, TaskStopĂ1
- corrections: Base directory for this skill: /Users/marcelspatz/.claude/skills/cross-reference-navigation
Cross-Reference Navigation (XREF)
The GROUND step of the work loop, made reflexive. One question asked a | Base directory for this skill: /Users/marcelspatz/.claude/skills/quantum-hypothesis-simulation
Quantum Hypothesis Simulation
The quantum-probability layer for YURI's claim/pulse machinery. It mode | Base directory for this skill: /Users/marcelspatz/.claude/skills/cross-reference-navigation
Cross-Reference Navigation (XREF)
The GROUND step of the work loop, made reflexive. One question asked a