Commit graph

2 commits

Author SHA1 Message Date
f1a050277b feat(slos): eigenvalue products predict SLOS concentration ordering - verified with Spearman correlation, cross-validated with exact tensor network
48 test points across K=1..4 and 12 label sets (Sidon power sets,
Sidon constructions, dense non-Sidon, prime-based).

Results:
  K=1: ρ=-0.85 (products→SLOS), ρ=-0.94 (SLOS↔tensor)
  K=2: ρ=-0.88 (products→SLOS), ρ=-0.94 (SLOS↔tensor)
  K=3: ρ=-0.93 (products→SLOS), ρ=-0.98 (SLOS↔tensor)
  K=4: ρ=-0.93 (products→SLOS), tensor N/A (K>3)

Key: all Spearman correlations are negative and strengthen with K.
Sidon sets produce 1.5-2.3× higher KL divergence than same-size non-Sidon.
Primes are intermediate: partially Sidon-like but weaker.

DAG: 192 nodes, 96 edges, all individually checkpointed for resume.
Resume with: python3 scripts/perceval_slos_verify.py --resume

Receipt: docs/research/SLOS_SIDON_VERIFICATION_RECEIPT.md

Build: N/A (Python/perceval verification, no Lean build)
2026-07-03 17:55:26 -05:00
openresearch
30552681e4 Add Perceval SLOS verification with recoverable DAG
5-minute per-shot limit on Quandela cloud. Script handles this with:

1. RECOVERABLE DAG: each computation step is a DAG node
   - Checkpointed to disk after each node
   - If a shot times out, resume from last checkpoint with --resume
   - The DAG records HOW SLOS computes (the path, not just the result)
   - This is informative: the computation structure IS data

2. NODE TYPES:
   - eigenvalue_products: cheap (O(n^k)), always runs
   - slos_circuit: circuit built, about to sample
   - slos: the actual SLOS simulation (5-min limit)
   - compare: eigenvalue products vs SLOS output

3. EDGE TYPES:
   - products → compare (comparison depends on products)
   - slos → compare (comparison depends on SLOS)

4. CHECKPOINTS:
   - Each node saved to .openresearch/artifacts/slos_checkpoints/node_<id>.json
   - Full DAG state saved to slos_computation_dag.json
   - --resume flag loads DAG state and skips already-computed nodes

5. DAG REPORT:
   - slos_computation_dag.md: human-readable report of all nodes
   - Records: what was computed, when, how long, what it found
   - The computation path itself is data about how SLOS processes
     the Sidon structure

Usage:
  # Local
  python3 scripts/perceval_slos_verify.py

  # Quandela cloud (5-min/shot limit)
  PERCEVAL_TOKEN='token' python3 scripts/perceval_slos_verify.py --cloud

  # Resume after timeout
  python3 scripts/perceval_slos_verify.py --resume

Tests:
- T1: Sidon vs non-Sidon at K=2 and K=3
  - 4 test cases × 2 photon numbers = 8 SLOS shots
  - Each shot: ~5 min on cloud (or seconds local)
  - Total cloud time: ~40 min (8 shots)
  - DAG records the exact computation path for each shot
2026-07-03 22:22:00 +00:00