-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsolvers_validators.html
More file actions
1198 lines (1088 loc) · 51.4 KB
/
solvers_validators.html
File metadata and controls
1198 lines (1088 loc) · 51.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Solvers & Validators - Albert Framework</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: #333;
max-width: 1400px;
margin: 0 auto;
padding: 20px;
background-color: #f5f5f5;
}
h1, h2, h3 {
color: #1976d2;
}
h1 {
font-size: 2.5em;
margin-bottom: 10px;
}
.subtitle {
font-size: 1.2em;
color: #666;
margin-bottom: 30px;
}
.stats-overview {
background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
color: white;
padding: 40px;
border-radius: 12px;
margin-bottom: 40px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 30px;
margin-top: 30px;
}
.stat-box {
text-align: center;
}
.stat-number {
font-size: 3em;
font-weight: bold;
display: block;
}
.stat-label {
opacity: 0.9;
}
.section-card {
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
margin-bottom: 30px;
}
.data-table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
.data-table th, .data-table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #eee;
}
.data-table th {
background-color: #f8f9fa;
font-weight: 600;
color: #1976d2;
position: sticky;
top: 0;
z-index: 10;
}
.data-table tr:hover {
background-color: #f8f9fa;
}
.pass {
color: #4caf50;
font-weight: bold;
}
.fail {
color: #e74c3c;
font-weight: bold;
}
.partial {
color: #ff9800;
font-weight: bold;
}
.test-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.85em;
font-weight: 500;
margin-right: 5px;
}
.analytical {
background-color: #e8f5e9;
color: #2e7d32;
}
.numerical {
background-color: #e3f2fd;
color: #1565c0;
}
.quantum {
background-color: #f3e5f5;
color: #6a1b9a;
}
.experimental {
background-color: #fff3e0;
color: #e65100;
}
.solver {
background-color: #fce4ec;
color: #c2185b;
}
.prediction {
background-color: #e8eaf6;
color: #3f51b5;
}
.constraint {
background-color: #ffebee;
color: #c62828;
}
.observational {
background-color: #e8f5e9;
color: #2e7d32;
}
.separator-row td {
padding: 10px !important;
font-size: 0.95em;
letter-spacing: 0.5px;
}
.equation {
background-color: #f8f9fa;
padding: 15px;
border-left: 4px solid #1976d2;
margin: 15px 0;
font-family: 'Courier New', monospace;
overflow-x: auto;
}
.visualization-container {
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
margin-bottom: 30px;
text-align: center;
}
#validator-performance, #solver-comparison {
width: 100%;
height: 400px;
}
.method-card {
background: #f8f9fa;
padding: 20px;
border-radius: 8px;
margin-bottom: 15px;
border-left: 4px solid #ff9800;
}
.method-card h4 {
margin-top: 0;
color: #ff6f00;
}
.performance-metric {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid #e0e0e0;
}
.metric-label {
color: #666;
}
.metric-value {
font-weight: bold;
color: #333;
}
.best-value {
color: #4caf50;
}
.code-link {
background-color: #f0f0f0;
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
display: inline-block;
color: #1976d2;
text-decoration: none;
}
.code-link:hover {
background-color: #e0e0e0;
text-decoration: underline;
}
.test-score {
color: #2e7d32;
font-weight: 600;
font-size: 12px;
display: block;
margin-top: 4px;
}
.test-link {
color: #1976d2;
font-size: 11px;
text-decoration: none;
}
.test-link:hover {
text-decoration: underline;
}
.note {
background-color: #e3f2fd;
border-left: 4px solid #2196F3;
padding: 16px;
border-radius: 0 8px 8px 0;
margin: 20px 0;
}
@keyframes pulse {
0% { transform: scale(1); opacity: 0.8; }
50% { transform: scale(1.05); opacity: 1; }
100% { transform: scale(1); opacity: 0.8; }
}
.updating {
animation: pulse 2s infinite;
}
/* Mobile responsive styles */
@media (max-width: 768px) {
body {
padding: 10px;
font-size: 14px;
}
h1 {
font-size: 1.8em;
}
h2 {
font-size: 1.4em;
}
h3 {
font-size: 1.2em;
}
.subtitle {
font-size: 1em;
}
.stats-overview {
padding: 25px;
}
.stats-grid {
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 20px;
}
.stat-number {
font-size: 2em;
}
.stat-label {
font-size: 0.9em;
}
.section-card {
padding: 20px;
margin-bottom: 20px;
}
.data-table {
font-size: 12px;
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.data-table th, .data-table td {
padding: 8px;
min-width: 100px;
}
.data-table tbody {
display: table;
width: 100%;
}
.test-badge {
font-size: 0.75em;
padding: 3px 8px;
margin-right: 3px;
margin-bottom: 3px;
display: inline-block;
}
.equation {
padding: 10px;
font-size: 12px;
}
.visualization-container {
padding: 20px;
}
#validator-performance, #solver-comparison {
height: 300px;
}
.method-card {
padding: 15px;
margin-bottom: 10px;
}
.performance-metric {
font-size: 13px;
padding: 6px 0;
}
.code-link {
font-size: 11px;
padding: 3px 6px;
}
.note {
padding: 12px;
margin: 15px 0;
}
}
@media (max-width: 480px) {
body {
padding: 8px;
font-size: 13px;
}
h1 {
font-size: 1.5em;
}
h2 {
font-size: 1.2em;
}
.stats-overview {
padding: 20px;
}
.stat-number {
font-size: 1.5em;
}
.section-card, .visualization-container {
padding: 15px;
}
.data-table {
font-size: 11px;
}
.data-table th, .data-table td {
padding: 6px;
min-width: 80px;
}
#validator-performance, #solver-comparison {
height: 250px;
}
.method-card h4 {
font-size: 1em;
}
}
</style>
</head>
<body>
<h1>Solvers & Validators</h1>
<p class="subtitle">Comprehensive Testing and Integration Methods</p>
<div class="stats-overview">
<h2 style="color: white; margin-top: 0;">Current Test Results</h2>
<p>From comprehensive test run: 2025-08-03 22:53:02</p>
<div class="stats-grid">
<div class="stat-box">
<span class="stat-number">32</span>
<span class="stat-label">Theories Tested</span>
</div>
<div class="stat-box">
<span class="stat-number">192/224</span>
<span class="stat-label">Analytical Tests Passed</span>
</div>
<div class="stat-box">
<span class="stat-number">177/223</span>
<span class="stat-label">Solver Tests Passed</span>
</div>
<div class="stat-box">
<span class="stat-number">85.7%</span>
<span class="stat-label">Average Pass Rate</span>
</div>
</div>
</div>
<div class="section-card" style="background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%); border: 2px solid #1976d2;">
<h2>Framework Philosophy</h2>
<p style="font-size: 1.1em; line-height: 1.8;">
AlphaFold succeeded by creating specialized environments for training on protein structures.
Albert provides analogous infrastructure for physics—leveraging PyTorch as the computational foundation.
Express your theory as code—metric tensors and field equations—and Albert's solvers transform these
mathematical laws into differentiable computations. This extends PyTorch into a platform for physics
simulation, where Lagrangians can be implemented as differentiable operations yielding executable dynamics.
</p>
<p style="font-size: 1.1em; line-height: 1.8;">
The differentiable nature enables theories to learn from their own simulations through gradient-based
optimization. By providing this integrated infrastructure, Albert reduces the barrier to developing
physics learning systems, allowing researchers to focus on innovation rather than building validation
pipelines from scratch.
</p>
</div>
<h1 style="margin-top: 40px; margin-bottom: 10px; color: #ff5722;">Solver-Based Testing</h1>
<p class="subtitle">Geodesic Integration Methods and Test Coverage</p>
<div class="section-card">
<h2>Geodesic Solver Test Coverage</h2>
<p>The geodesic integrators undergo extensive testing through two primary test suites:</p>
<h3>1. Validator Comparison Tests (test_geodesic_validator_comparison.py)</h3>
<table class="data-table">
<thead>
<tr>
<th>Test Name</th>
<th>Description</th>
<th>Solvers Tested</th>
<th>Status</th>
<th>Key Metrics</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Circular Orbit Period</strong></td>
<td>Tests circular orbit period calculation at 100 Rs</td>
<td>ConservedQuantityGeodesicSolver</td>
<td class="pass">IMPLEMENTED</td>
<td>Error tolerance: 5%</td>
</tr>
<tr>
<td><strong>Mercury Precession</strong></td>
<td>Compares with analytical GR formula</td>
<td>ConservedQuantityGeodesicSolver</td>
<td class="pass">VALIDATED</td>
<td>43.98 arcsec/century (0.02% error)</td>
</tr>
<tr>
<td><strong>Light Deflection</strong></td>
<td>Solar gravitational lensing calculation</td>
<td>PhotonGeodesicSolver (theoretical)</td>
<td class="pass">VALIDATED</td>
<td>1.75 arcsec (0.03% error)</td>
</tr>
<tr>
<td><strong>Photon Sphere</strong></td>
<td>Black hole shadow radius verification</td>
<td>PhotonGeodesicSolver</td>
<td class="pass">VALIDATED</td>
<td>r = 1.5 rs (3M)</td>
</tr>
<tr>
<td><strong>PPN Parameters</strong></td>
<td>Post-Newtonian expansion coefficients</td>
<td>GeneralRelativisticGeodesicSolver</td>
<td class="pass">VALIDATED</td>
<td>γ = 1.0, β = 1.0</td>
</tr>
<tr>
<td><strong>COW Interferometry</strong></td>
<td>Quantum neutron phase shift in gravity</td>
<td>QuantumCorrectedGeodesicSolver</td>
<td class="pass">VALIDATED</td>
<td>Phase error: 0.12%</td>
</tr>
<tr>
<td><strong>GW Inspiral</strong></td>
<td>Binary system orbital decay</td>
<td>GeneralRelativisticGeodesicSolver</td>
<td class="pass">IMPLEMENTED</td>
<td>Waveform match with GR</td>
</tr>
<tr>
<td><strong>Trajectory Cache</strong></td>
<td>Performance optimization testing</td>
<td>All solvers</td>
<td class="pass">VALIDATED</td>
<td>1000x+ speedup on cached runs</td>
</tr>
<tr>
<td><strong>Quantum Geodesic Sim</strong></td>
<td>PennyLane quantum circuit validation</td>
<td>QuantumCorrectedGeodesicSolver</td>
<td class="partial">EXPERIMENTAL</td>
<td>2-qubit simulation</td>
</tr>
</tbody>
</table>
<h3>2. Theory Evaluation Tests (evaluation.py)</h3>
<table class="data-table">
<thead>
<tr>
<th>Test Function</th>
<th>Description</th>
<th>Solver Used</th>
<th>Integration Steps</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>test_circular_orbit_for_theory</strong></td>
<td>ISCO radius and orbital frequency</td>
<td>ConservedQuantityGeodesicSolver</td>
<td>10,000 steps</td>
</tr>
<tr>
<td><strong>test_quantum_geodesic_for_theory</strong></td>
<td>Quantum corrections to geodesics</td>
<td>QuantumCorrectedGeodesicSolver</td>
<td>1,000 steps</td>
</tr>
<tr>
<td><strong>test_trajectory_vs_kerr</strong></td>
<td>Compare trajectories with Kerr baseline</td>
<td>GeneralRelativisticGeodesicSolver</td>
<td>100,000-1M steps</td>
</tr>
<tr>
<td><strong>test_g_minus_2</strong></td>
<td>Muon anomalous magnetic moment</td>
<td>ChargedParticleGeodesicSolver</td>
<td>Variable</td>
</tr>
<tr>
<td><strong>test_scattering_amplitude</strong></td>
<td>Graviton exchange amplitudes</td>
<td>GeneralRelativisticGeodesicSolver</td>
<td>Variable</td>
</tr>
</tbody>
</table>
<div class="note" style="margin-top: 20px;">
<h4>📊 Performance Characteristics</h4>
<ul>
<li><strong>4D Solvers:</strong> ~10x faster than 6D for symmetric spacetimes</li>
<li><strong>Cache Hit Rate:</strong> >95% for repeated theory validations</li>
<li><strong>Typical Integration:</strong> 100k-1M steps for precision tests</li>
<li><strong>Step Size:</strong> h = 0.01-0.1 (geometric units), adaptive near horizons</li>
<li><strong>Memory Usage:</strong> ~100MB for 1M step trajectory (float64)</li>
</ul>
</div>
</div>
<div class="section-card" style="background: linear-gradient(135deg, #fff3e0 0%, #ffebee 100%); border: 2px solid #ff5722;">
<h2>⚠️ Geodesic Integrator Solvers - Detailed Analysis</h2>
<p style="color: #d84315; font-weight: bold; font-size: 1.1em;">
Critical: The geodesic integrator implementation in geodesic_integrator.py contains multiple specialized solvers
with varying dimensions and stability characteristics. Below is a comprehensive breakdown:
</p>
<table class="data-table" style="margin-top: 20px;">
<thead>
<tr>
<th>Solver Class</th>
<th>State Dimensions</th>
<th>State Variables</th>
<th>Infinity/Singularity Handling</th>
<th>Primary Use Case</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>ConservedQuantityGeodesicSolver</strong></td>
<td><span class="test-badge numerical">4D</span></td>
<td><code>[t, r, φ, dr/dτ]</code></td>
<td>
• Horizon check: r ≤ 2.01 → NaN<br>
• Adaptive step: max 5 attempts<br>
• Halves step size on NaN<br>
• Metric singularity: |det| < 1e-10<br>
• Safety radius: r > 2.1
</td>
<td>Schwarzschild, symmetric spacetimes</td>
</tr>
<tr>
<td><strong>GeneralRelativisticGeodesicSolver</strong></td>
<td><span class="test-badge numerical">6D</span></td>
<td><code>[t, r, φ, u^t, u^r, u^φ]</code></td>
<td>
• Horizon check: r ≤ 2.01 → NaN<br>
• Metric determinant: |det(g)| < ε<br>
• Christoffel cache: 1000 entries<br>
• Horizon crossing: stops at r ≤ 2.1
</td>
<td>Kerr, general metrics, no symmetry</td>
</tr>
<tr>
<td><strong>PhotonGeodesicSolver</strong></td>
<td><span class="test-badge quantum">4D</span></td>
<td><code>[t, r, φ, dr/dλ]</code></td>
<td>
• Horizon check: r ≤ 2.01 → NaN<br>
• Turning points: dr²/dλ² < 0 → 0<br>
• Critical b = 3√3 M<br>
• Special handling near r ≈ 3M
</td>
<td>Light rays, gravitational lensing</td>
</tr>
<tr>
<td><strong>ChargedParticleGeodesicSolver</strong></td>
<td><span class="test-badge numerical">6D</span></td>
<td><code>[t, r, φ, u^t, u^r, u^φ]</code></td>
<td>
• Inherits GeneralRelativisticGeodesicSolver<br>
• Finite check: torch.isfinite()<br>
• Symbolic charge detection<br>
• Coulomb singularity: F ∝ 1/r²
</td>
<td>Charged particle dynamics</td>
</tr>
<tr>
<td><strong>UnifiedGravityModelGeodesicSolver</strong><br><span style="color: #ff6f00; font-size: 0.9em;">(EXPERIMENTAL)</span></td>
<td><span class="test-badge experimental">6D</span></td>
<td><code>[t, r, φ, u^t, u^r, u^φ]</code></td>
<td>
• Tetrad determinant: det(e) ≠ 0<br>
• Metric determinant validation<br>
• Quantum corrections: 1 + α_g/(πr²)<br>
• Raises ValueError on singular metric
</td>
<td>UGM theory testing, gauge fields</td>
</tr>
<tr>
<td><strong>ConservedQuantityChargedGeodesicSolver</strong></td>
<td><span class="test-badge numerical">4D</span></td>
<td><code>[t, r, φ, dr/dτ]</code></td>
<td>
• Inherits ConservedQuantityGeodesicSolver<br>
• Same horizon/adaptive handling<br>
• Electromagnetic singularity handling
</td>
<td>Charged particles in symmetric spacetimes</td>
</tr>
<tr>
<td><strong>QuantumCorrectedGeodesicSolver</strong><br><span style="color: #ff6f00; font-size: 0.9em;">(EXPERIMENTAL)</span></td>
<td><span class="test-badge quantum">6D</span></td>
<td><code>[t, r, φ, u^t, u^r, u^φ]</code></td>
<td>
• Inherits GeneralRelativisticGeodesicSolver<br>
• Parameter normalization: r/10, v×10<br>
• Quantum correction factor: 0.01<br>
• PennyLane circuit stability
</td>
<td>Quantum gravity approximations</td>
</tr>
</tbody>
</table>
<div class="note" style="background-color: #ffebee; border-left-color: #f44336; margin-top: 20px;">
<h4>🔧 Key Technical Issues</h4>
<ul>
<li><strong>Dimension Mismatch:</strong> Some solvers claim to be 4D but actually handle 6D states internally</li>
<li><strong>Horizon Safety:</strong> All solvers use r > 2.01 (just outside Schwarzschild horizon) as safety threshold</li>
<li><strong>Adaptive Stepping:</strong> Only 4D solvers implement aggressive retry logic (up to 5 attempts)</li>
<li><strong>Cache Performance:</strong> Christoffel symbol caching provides ~10x speedup for repeated calculations</li>
<li><strong>Numerical Precision:</strong> All use float64 (double precision) for stability</li>
</ul>
</div>
</div>
<div class="section-card">
<h2>Numerical Integration Methods</h2>
<p style="color: #d84315; font-weight: bold;">⚠️ Current Implementation: Standard RK4 (4th order Runge-Kutta)</p>
<div class="method-card">
<h4>RK4 Integration - Primary Method</h4>
<div class="equation">
k₁ = f(y_n), k₂ = f(y_n + h·k₁/2), k₃ = f(y_n + h·k₂/2), k₄ = f(y_n + h·k₃)<br>
y_{n+1} = y_n + (h/6)·(k₁ + 2k₂ + 2k₃ + k₄)
</div>
<div class="performance-metric">
<span class="metric-label">Order</span>
<span class="metric-value">4th order accuracy</span>
</div>
<div class="performance-metric">
<span class="metric-label">Error Control</span>
<span class="metric-value">Adaptive step size (4D solvers only)</span>
</div>
<div class="performance-metric">
<span class="metric-label">Stages</span>
<span class="metric-value">4 function evaluations per step</span>
</div>
<div class="performance-metric">
<span class="metric-label">Implementation</span>
<span class="metric-value"><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/geodesic_integrator.py#L286" class="code-link" target="_blank">rk4_step() in geodesic_integrator.py</a></span>
</div>
</div>
<div class="method-card" style="border-left-color: #ff9800;">
<h4>Adaptive Step Size Control</h4>
<div class="equation">
if NaN detected: h → h/2, retry up to 5 times
</div>
<div class="performance-metric">
<span class="metric-label">Available In</span>
<span class="metric-value">ConservedQuantityGeodesicSolver (4D) only</span>
</div>
<div class="performance-metric">
<span class="metric-label">Horizon Safety</span>
<span class="metric-value">Stops integration if r < 2.1 (geometric units)</span>
</div>
<div class="performance-metric">
<span class="metric-label">Step Size Range</span>
<span class="metric-value">h = 0.01-0.1 typical, adaptive near singularities</span>
</div>
<div class="performance-metric">
<span class="metric-label">Implementation</span>
<span class="metric-value"><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/geodesic_integrator.py#L286" class="code-link" target="_blank">ConservedQuantityGeodesicSolver.rk4_step()</a></span>
</div>
</div>
<div class="note" style="background-color: #fff3e0; border-left-color: #ff6f00; margin-top: 20px;">
<h4>📝 Implementation Note</h4>
<p>The current geodesic integrators use standard RK4 methods, not the advanced solvers (Dormand-Prince, symplectic, implicit) mentioned in earlier documentation. While RK4 is sufficient for most tests, future enhancements could include:</p>
<ul>
<li>Higher-order adaptive methods (e.g., RK45, DOP853) for better accuracy</li>
<li>Symplectic integrators for long-term energy conservation</li>
<li>Implicit methods for stable horizon crossing</li>
<li>GPU acceleration for massive parallel integrations</li>
</ul>
</div>
</div>
<h1 style="margin-top: 60px; margin-bottom: 10px; color: #1976d2;">Validator-Based Testing</h1>
<p class="subtitle">Analytical and Observational Validation Methods</p>
<div class="section-card">
<h2>Validators Overview</h2>
<div class="note" style="background-color: #e8f5e9; border-left-color: #4caf50; margin-bottom: 30px;">
<h3 style="color: #2e7d32;">Currently Active Validators: 10 Core + 4 Extended</h3>
<p style="color: #424242;">The Albert framework currently runs <strong>10 core validators</strong> in production:</p>
<ul style="color: #424242;">
<li><strong>Phase 1 (Constraint):</strong> Conservation, Metric Properties</li>
<li><strong>Phase 2 (Analytical):</strong> Mercury Precession, Light Deflection, PPN Parameters, Photon Sphere, GW Waveform, COW Interferometry</li>
<li><strong>Phase 3 (Solver-Based):</strong> Trajectory vs Kerr, Circular Orbit, Quantum Geodesic Sim, g-2 Anomaly</li>
<li><strong>Phase 4 (Predictions):</strong> CMB Power Spectrum, Primordial GWs, Scattering Amplitude, PTA GW Background</li>
</ul>
</div>
<h3>Analytical Validators</h3>
<table class="data-table">
<thead>
<tr>
<th>Validator</th>
<th>Type</th>
<th>Tests</th>
<th>Pass Rate</th>
<th>Key Metrics</th>
<th>Code Reference</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Conservation Validator</strong></td>
<td>
<span class="test-badge constraint">Constraint</span>
<span class="test-badge analytical">Analytical</span>
</td>
<td>Energy, Angular momentum, Constraint conservation</td>
<td class="pass">100.0% (32/32)</td>
<td>Tolerances: 10^-12 (relative)</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/conservation_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Metric Properties</strong></td>
<td>
<span class="test-badge constraint">Constraint</span>
<span class="test-badge analytical">Analytical</span>
</td>
<td>Signature (-+++), Positive-definiteness, Asymptotic flatness</td>
<td class="pass">100.0% (32/32)</td>
<td>Lorentzian signature verified</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/metric_properties_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Mercury Precession</strong>
<span class="test-score">✅ PASSED (0.02% error)</span>
<a href="../physics_agent/solver_tests/test_geodesic_validator_comparison.py" class="test-link">test_mercury_comparison() →</a>
</td>
<td>
<span class="test-badge analytical">Analytical</span>
<span class="test-badge experimental">Experimental</span>
</td>
<td>Perihelion advance of Mercury</td>
<td class="pass">100.0% (32/32)</td>
<td>43.98 arcsec/century</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/mercury_precession_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Light Deflection</strong>
<span class="test-score">✅ PASSED (0.03% error)</span>
<a href="../physics_agent/solver_tests/test_geodesic_validator_comparison.py" class="test-link">test_light_deflection_comparison() →</a>
</td>
<td>
<span class="test-badge analytical">Analytical</span>
<span class="test-badge experimental">Experimental</span>
</td>
<td>Solar gravitational lensing</td>
<td class="pass">100.0% (32/32)</td>
<td>1.75 arcsec at solar limb</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/light_deflection_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Photon Sphere</strong>
<span class="test-score">✅ PASSED (r_ph = 1.5 r_s)</span>
<a href="../physics_agent/solver_tests/test_geodesic_validator_comparison.py" class="test-link">test_photon_sphere_comparison() →</a>
</td>
<td>
<span class="test-badge analytical">Analytical</span>
</td>
<td>Black hole shadow radius</td>
<td class="pass">100.0% (32/32)</td>
<td>r = 3M (Schwarzschild)</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/photon_sphere_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>PPN Parameters</strong>
<span class="test-score">✅ PASSED (γ=1.0, β=1.0)</span>
<a href="../physics_agent/solver_tests/test_geodesic_validator_comparison.py" class="test-link">test_ppn_comparison() →</a>
</td>
<td>
<span class="test-badge analytical">Analytical</span>
<span class="test-badge experimental">Experimental</span>
</td>
<td>Post-Newtonian expansion</td>
<td class="pass">100.0% (32/32)</td>
<td>γ = β = 1 (GR limit)</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/ppn_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>COW Interferometry</strong>
<span class="test-score">✅ PASSED (0.12% error)</span>
<a href="../physics_agent/solver_tests/test_geodesic_validator_comparison.py" class="test-link">test_quantum_interferometry() →</a>
</td>
<td>
<span class="test-badge quantum">Quantum</span>
<span class="test-badge experimental">Experimental</span>
</td>
<td>Neutron phase shift in gravity</td>
<td class="pass">100.0% (32/32)</td>
<td>Δφ = 2π mgLλ/h</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/cow_interferometry_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Gravitational Waves</strong></td>
<td>
<span class="test-badge analytical">Analytical</span>
<span class="test-badge experimental">Experimental</span>
</td>
<td>Waveform generation</td>
<td class="pass">100.0% (32/32)</td>
<td>LIGO/Virgo strain data</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/gw_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>PSR J0740</strong></td>
<td>
<span class="test-badge analytical">Analytical</span>
<span class="test-badge experimental">Experimental</span>
</td>
<td>Shapiro time delay</td>
<td class="pass">100.0% (32/32)</td>
<td>Δt observations</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/psr_j0740_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr class="separator-row">
<td colspan="6" style="background: #f0f0f0; text-align: center; font-weight: bold;">Solver-Based Tests</td>
</tr>
<tr>
<td><strong>Quantum Geodesic Sim</strong> <span style="color: #ff6f00; font-size: 0.9em;">(EXPERIMENTAL)</span></td>
<td>
<span class="test-badge quantum">Quantum</span>
<span class="test-badge numerical">Numerical</span>
</td>
<td>Quantum circuit simulation of geodesics</td>
<td class="pass">96.9% (31/32)</td>
<td>2-qubit quantum simulation</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/quantum_geodesic_sim_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Circular Orbit</strong></td>
<td>
<span class="test-badge analytical">Analytical</span>
<span class="test-badge numerical">Numerical</span>
</td>
<td>ISCO radius, Orbital frequency</td>
<td class="pass">93.8% (30/32)</td>
<td>r_ISCO = 6M (Schwarzschild)</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/circular_orbit_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Trajectory vs Kerr</strong></td>
<td>
<span class="test-badge numerical">Numerical</span>
<span class="test-badge solver">Solver-Based</span>
</td>
<td>Geodesic comparison with Kerr metric</td>
<td class="pass">100.0% (32/32)</td>
<td>Distance & divergence metrics</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/theory_engine_core.py#L2420" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>g-2 Muon Anomaly</strong></td>
<td>
<span class="test-badge quantum">Quantum</span>
<span class="test-badge experimental">Experimental</span>
<span class="test-badge prediction">Prediction</span>
</td>
<td>Tests anomalous magnetic moment (g-2)/2 of muon. Experimental: 116592061(41)×10^-11, SM: 116591810(43)×10^-11 (4.2σ discrepancy)</td>
<td class="fail">40.6% (13/32)</td>
<td>a_μ = 0.00116592061</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/g_minus_2_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Scattering Amplitude</strong></td>
<td>
<span class="test-badge quantum">Quantum</span>
<span class="test-badge analytical">Analytical</span>
</td>
<td>Tree-level graviton exchange</td>
<td class="partial">68.8% (22/32)</td>
<td>Unitarity bounds, High-energy behavior</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/scattering_amplitude_validator.py" class="code-link" target="_blank">Show code</a></td>
</tr>
<tr>
<td><strong>Primordial GWs</strong>
<span class="test-score">✅ PASSED (r = 0.010)</span>
<a href="../physics_agent/solver_tests/test_geodesic_validator_comparison.py" class="test-link">test_bicep_keck_primordial_gws() →</a>
</td>
<td>
<span class="test-badge experimental">Experimental</span>
<span class="test-badge prediction">Prediction</span>
</td>
<td>B-mode polarization power</td>
<td class="pass">93.8% (30/32)</td>
<td>BICEP/Keck constraints</td>
<td><a href="https://github.com/PimDeWitte/albert/blob/main/physics_agent/validations/primordial_gws_validator.py" class="code-link" target="_blank">Show code</a></td>