The Donkey on the Edge THE PAPER · APPENDIX B May MMXXVI
THE PAPER · APPENDIX B

Appendix B – Reproducibility

Seeds, environment, manifest. Every CSV reproduces bit-identically from master seed 707070.

Companion Pages

Complete documentation of the computational program behind this paper: software environment, seed conventions, sample sizes per data point, and the file manifest. All numerical results in the main text are reproducible from the artifacts documented here.


B.1 Software environment

All computations use the following package versions, pinned on a single Linux machine (Ubuntu 24.04 LTS, Python 3.12.3):

PackageVersionUse
numpy2.4.4linear algebra, random number generation
scipy1.17.1unitary_group (Haar-random unitaries), ortho_group (Haar-random orthogonals)
pandas3.0.2data tables and CSV I/O
matplotlib3.10.8figures
mpmath1.3.0exact evaluation of transcendental constants
sympy1.14.0analytic checkpoint computations
statsmodels0.14.6WLS and subleading-correction fits

Every pip install used --break-system-packages as required by Ubuntu 24 system Python; all results are reproducible under any equivalent install of the above versions.

B.2 Seed conventions

All Monte Carlo draws route through either numpy.random.default_rng(seed) or the project’s SeededRNG wrapper (which threads a single default_rng through both numpy and scipy.stats.unitary_group for a unified stream):

class SeededRNG:
    def __init__(self, seed: int = 0xBADC0DE):
        self.rng = np.random.default_rng(int(seed))
    def haar_unitary(self, n):
        return unitary_group.rvs(n, random_state=self.rng)
    def haar_state(self, d):
        # complex Gaussian then normalize
        ...
    def aehpv_map(self, d_eff, d_fund):
        # first d_fund rows of haar_unitary(d_eff)
        ...

Each phase uses a distinct BASE_SEED constant, with per-point seeds derived deterministically from BASE_SEED and the relevant dimension parameters so that every data point’s sample stream is fully determined by its nominal coordinates:

PhaseBASE_SEEDPer-point seed formula
Phase 1 (HUZ/Colorado tables)424242BASE + d_Ob*10000 + d_M*100 + d_fund
Phase 2 (HUZ error scaling)313131BASE + d_Ob*131 + d_M*11 + d_fund
Phase 3 (EGH reproduction)202020BASE + D_L*10000 + D_R*100 + D_C
Phase 4 (two-observer setup)414141BASE + d_OA*1000 + d_OB*100 + d_M*10 + d_fund
Phase 5 (money plot)505050BASE + d_B*10000 + batch_offset
Phase 6 (state-class scan)606060BASE + d_B*100 + class_code
Phase 7 (theorem verification)inline77700 + d_B or similar per-script

The seed-to-data correspondence is bit-identical across reruns under numpy >= 2.0: the same seed yields the same state vector, unitary, and statistics down to the last bit.

B.3 Sample sizes per data point

Note on file names in §§B.3–B.4. The phase-prefixed scripts and CSVs named below (e.g. phase5_boost_point.py, phase5_extended_scan.csv, phase5_money_plot.py) are historical development artifacts documenting how the data were produced; they are not part of the shipped reproducibility/ bundle, which contains the consolidated regenerators and data listed in §B.5. They are referenced here only to record the original sampling and wall-time methodology.

Phase 5 extended scan (Haar bulk)

Nine points with cumulative sample counts from merged batches:

dBd_BNNnotes
4300single batch
6300single batch
8300single batch
10300single batch
12300merged from 150 + 150 with phase5_boost_point.py
14200merged from 100 + 100
16240merged from 120 + 120
20190merged from 100 + 90
2460single batch (compute-bound at deff=2304d_{\rm eff} = 2304)

Batch-merge metadata preserved in phase5_extended_scan.csv. Batch offsets use independent seed streams (BASE_SEED + d_B*10000 + batch_index) to guarantee statistical independence across batches.

Phase 6 state-class scan

Haar and Product classes, six primary points plus Product extension:

dBd_BHaar NNProduct NN
4150150
6150150
8150150
10150150
12150150
16100150
2040 (out-of-sample extension)
2420 (out-of-sample extension)

Phase 7 theorem verification

Per-figure sample sizes:

Figure 3 (Theorem 1, Product):

Figure 4 (Theorem 2, Haar):

Structural identity verification (Figure 2)

Haar-VV averages at dB{4,6,8}d_B \in \{4, 6, 8\} with NV{500,300,200}N_V \in \{500, 300, 200\} Haar-VV draws per point, two bulk state classes. 18 diagonal entries compared per class (6 at dB=4d_B = 4, 6 at dB=6d_B = 6, 6 at dB=8d_B = 8).

B.4 Per-batch wall-time budget

The execution environment imposed a wall-time ceiling of approximately 5 minutes per bash invocation. This ruled out single-shot runs at large dBd_B (where per-sample cost scales as deff3=(dB2dM)3d_{\rm eff}^3 = (d_B^2 d_M)^3 for the full two-observer HUZ + VV simulation). Three workarounds enabled the large-dBd_B scan:

  1. Checkpoint-every-N-samples (phase5_boost_point.py): pickle partial results to phase5_cache/point_dB{N}.pkl every 25–50 samples so a timeout at sample kk loses at most 50 samples, not the full run.
  2. Independent batch seeds: each invocation uses BASE_SEED + d_B*10000 + batch_index so running the same command twice extends the sample count rather than duplicating samples.
  3. Efficient two-observer entropy computation (two_observer_entropies_fast in phase5_money_plot.py): replaces the naïve formation of the full joint density matrix (which would require 270\sim 270 GB at dB=16d_B = 16) with direct einsum contractions on the state tensor, reducing memory to 2\sim 2 MB at dB=16d_B = 16. Bit-identical to the naïve computation on five cross-checked test cases.

All Phase 5, 6, and 7 data was collected under these three mechanisms. A single fresh machine with no wall-time limits could reproduce the full scan in approximately 3–4 CPU-days on a single core.

B.5 File manifest (bundled reproducibility/ directory)

The accompanying package ships a consolidated, self-contained artifact set sufficient to regenerate every figure and Table 1 from the documented seeds. It does not ship the full phase-by-phase development tree; the files below are exactly what is included.

Backend

Figure generators (canonical seed 707070)

Proof-verification scripts

Data (one row per figure/table point)

B.6 Reproducibility verification

Two classes of checks were run. The first concerns the artifacts shipped in reproducibility/: each figure and Table 1 regenerates from the bundled CSVs and generators under the documented environment and seed, and the proof-verification scripts reproduce the quoted numbers (e.g. scratch_grouped_dirichlet.py reproduces the Lemma 3 moments to <1%<1\%, scratch_centered_C6.py the Lemma C.6 representation and scaling, and scratch_Fdiag.py the FdiagF_{\rm diag} ratios; scratch_Mdom.py is a diagnostic and supports no proof step).

The second class is a record of the broader development program (the historical phase scripts, which are not part of the shipped bundle): all non-trivial data points were spot-checked there for bit-identical reproducibility – integer rank predictions; error-scaling and EGH verifications to 1012\le 10^{-12}; the extended Haar scan within a batch (merged-batch means reproducible to 1010\le 10^{-10}); and the Dirichlet-variance check (Lemma 4) to 1013\le 10^{-13}. The one caveat there: merged-batch means are reproducible in aggregate but not strictly bit-identical across batch-execution orderings, as summation order shifts the accumulated mean by 1014\le 10^{-14}.

B.7 Data and code availability

The reproducibility artifacts are provided as supplementary material with this submission, in the reproducibility/ directory of the accompanying package: the unified backend bh_lab_backend.py (containing SeededRNG, aehpv_map, and the two-observer HUZ machinery), the figure-generation scripts, the verification scripts referenced in §B.5, and the CSV data files underlying every figure and table. A public archival deposit (Zenodo or equivalent) with a DOI is planned at time of journal submission; until then the bundled reproducibility/ directory is the authoritative artifact set. The phase-by-phase script names in §B.5 reflect the development history; the consolidated, self-contained scripts in reproducibility/ are sufficient to regenerate all figures and the Table 1 scan from the documented seeds.