run_all.py — src/22-quantum

The script src/22-quantum/run_all.py of the validation package of the paper 22-qm, rendered with an anchor per line. ▶ run the predicates on Google Colab.

22-quantum ledgersrc/22-quantum/run_all.py · 1.3 KBrun_all.pyColab
1"""2run_all.py — the 22-quantum validation package, end to end3===========================================================4Runs the seventeen suites through the registry (qmcommon), writes results.json — one record per family, carrying the5paper's ledger row(s) it witnesses — and exits nonzero if any family fails. Python ≥ 3.10 with numpy and sympy;6≈ 1 minute (intersubject and decoherence dominate).78    python3 run_all.py910Families (one per suite, in the README's order):11    validate sorkin dispersion composite synchronisation renou bmv decoherence equivalence granularity stratum12    gravfraction gleason emulation omega intersubject transport13"""14import sys, time15import qmcommon1617FAMILIES = ["qm." + s for s in [18    "validate", "sorkin", "dispersion", "composite", "synchronisation", "renou", "bmv", "decoherence", "equivalence",19    "granularity", "stratum", "gravfraction", "gleason", "emulation", "omega", "intersubject", "transport"]]2021def main():22    t0 = time.time()23    for fam in FAMILIES:24        print(f"\n— {qmcommon.script_of(fam)}.py")25        qmcommon.run_block(fam)26    ok = qmcommon.summary(write=True)27    print(f"{len(qmcommon.RESULTS)} families, {len(qmcommon.MICRO)} micro-checks, {time.time() - t0:.0f} s; results.json written")28    sys.exit(0 if ok else 1)2930if __name__ == "__main__":31    main()32