Datasets:
Formats:
json
Languages:
English
Size:
< 1K
Tags:
mathematical-physics
arrow-of-time
temporal-irreversibility
time-reversal-symmetry
quantum-information
quantum-foundations
Download run_verification.py from PureOne/Neixarua-Operational-Temporal-Orientation: direct link, hf CLI and curl.
- Browser
- Download file 3.82 kB
-
https://huggingface.co/datasets/PureOne/Neixarua-Operational-Temporal-Orientation/resolve/main/run_verification.py
- Command line
-
hf download hf://datasets/PureOne/Neixarua-Operational-Temporal-Orientation/run_verification.py
-
curl -L -o run_verification.py https://huggingface.co/datasets/PureOne/Neixarua-Operational-Temporal-Orientation/resolve/main/run_verification.py
3.82 kB
| #!/usr/bin/env python3 | |
| """Run the reproducible model demonstrations from any working directory.""" | |
| from pathlib import Path | |
| import importlib.metadata | |
| import json | |
| import platform | |
| import subprocess | |
| import sys | |
| ROOT=Path(__file__).resolve().parent | |
| scripts=["verify_classical.py","verify_quantum.py","archive_exact.py","verify_geometry.py", | |
| "verify_v2_classical.py","verify_v2_quantum.py","verify_v2_geometry.py", | |
| "verify_v2_hmm.py","verify_v2_ordered_completion.py", | |
| "v3_quantum/verify_quantum_extension.py","v3_boundary/verify_boundary.py", | |
| "v3_gravity/verify_counterexamples.py"] | |
| commands=[] | |
| for name in scripts: | |
| p=subprocess.run([sys.executable,str(ROOT/"verification"/name)], | |
| cwd=ROOT,text=True,capture_output=True) | |
| commands.append({"script":name,"returncode":p.returncode}) | |
| if p.returncode: | |
| print(p.stdout);print(p.stderr,file=sys.stderr) | |
| raise SystemExit(f"Verification failed: {name}") | |
| print(f"Passed: {name}") | |
| figure_commands=[] | |
| for name in ["make_figures.py","make_v2_figures.py","make_v3_figure.py"]: | |
| p=subprocess.run([sys.executable,str(ROOT/"verification"/name)], | |
| cwd=ROOT,text=True,capture_output=True) | |
| figure_commands.append({"script":name,"returncode":p.returncode}) | |
| if p.returncode: | |
| print(p.stdout);print(p.stderr,file=sys.stderr) | |
| raise SystemExit("Figure generation failed") | |
| c=json.loads((ROOT/"verification/results/classical_results.json").read_text()) | |
| q=json.loads((ROOT/"verification/quantum_results.json").read_text()) | |
| a=json.loads((ROOT/"results/archive_exact_results.json").read_text()) | |
| g=json.loads((ROOT/"verification/results/geometry_results.json").read_text()) | |
| counts={"classical":c["check_count"],"quantum":q["verification"]["named_checks"], | |
| "archive":a["check_count"],"geometry":g["demonstration_count"]} | |
| v2c=json.loads((ROOT/"verification/results/v2_classical_results.json").read_text()) | |
| v2q=json.loads((ROOT/"verification/v2_quantum_results.json").read_text()) | |
| v2g=json.loads((ROOT/"verification/results/v2_geometry_results.json").read_text()) | |
| v2h=json.loads((ROOT/"verification/results/v2_hmm_results.json").read_text()) | |
| v2e=json.loads((ROOT/"verification/results/v2_ordered_completion_results.json").read_text()) | |
| counts.update({"calibration_completion":v2c["demonstrations"], | |
| "quantum_records":v2q["count"], | |
| "record_janus_geometry":v2g["demonstration_count"], | |
| "hidden_histories":v2h["verification"]["named_checks"], | |
| "ordered_completions":v2e["verification"]["named_checks"]}) | |
| v3q=json.loads((ROOT/"verification/v3_quantum/quantum_verification_results.json").read_text()) | |
| v3b=json.loads((ROOT/"verification/v3_boundary/boundary_verification.json").read_text()) | |
| v3g=json.loads((ROOT/"verification/v3_gravity/verification.json").read_text()) | |
| assert v3q["passed"]==len(v3q["checks"]) and all(x["passed"] for x in v3q["checks"]) | |
| assert v3b["checks_total"]==v3b["checks_passed"] and all(x["passed"] for x in v3b["checks"]) | |
| assert v3g["all_passed"] and v3g["named_checks"]==len(v3g["check_names"]) | |
| counts.update({"normal_quantum":v3q["passed"],"quantum_boundary":v3b["checks_passed"],"gravity_audit":v3g["named_checks"]}) | |
| summary={"all_passed":True,"counts":counts,"total_named_demonstrations":sum(counts.values()), | |
| "additional_rational_composition_cases":c["randomized_rational_cases"], | |
| "python":platform.python_version(),"platform":platform.platform(), | |
| "packages":{x:importlib.metadata.version(x) for x in ("numpy","scipy","sympy","matplotlib")}, | |
| "commands":commands,"figure_commands":figure_commands, | |
| "scope":"Declared finite models and symbolic identities; no physical data and no proof-assistant certification."} | |
| (ROOT/"verification/results/summary.json").write_text(json.dumps(summary,indent=2)+"\n") | |
| print(json.dumps(summary,indent=2)) | |