# Supplementary Information

Data and code for *"Programmable photonic implementation of nested Walsh
parity filters in an eight-mode single-photon register."* Everything
needed to reproduce the manuscript's tables and figures from the raw Belenos
measurements is included here; nothing is hosted externally.

## Layout

```
Supplementary/
├── dataset/     raw experimental data + decoders
│   ├── data/raw/quandela_exports/   raw Quandela job exports (payload + result JSON)
│   ├── data/processed/              decoded per-port counts, job summaries
│   ├── data/manifest/               row→job manifest, job index, backend metadata
│   └── scripts/                     decode + validate the exports
├── analysis/    Python pipeline that reproduces the tables, figures, benchmarks
│   └── data/                        per-port and summary count CSVs
└── figures/     standalone TikZ/pgfplots sources + compiled PDFs of the figures
```

## Quick start

```sh
# 1. Validate the raw dataset and regenerate the decoded counts
cd dataset
python3 scripts/validate_package.py
python3 scripts/decode_quandela_results.py

# 2. Reproduce the paper (needs numpy, scipy, matplotlib)
cd ../analysis
pip install -r requirements.txt
python3 verify_package.py     # every table row, recomputed from the raw counts
python3 reproduce_all.py      # tables + simulation benchmarks + figures
```

## What is here

- **Raw data** (`dataset/data/raw/quandela_exports/`): the Quandela/Perceval
  `result.json` and `payload.json` exports for every manuscript table row, plus
  additional completed jobs from the same campaign. `decode_quandela_results.py`
  turns the `:PCVL:zip:` BSCount payloads into per-output-port single-photon
  counts.
- **Manifest** (`dataset/data/manifest/`): `job_manifest.csv` maps each table row
  to its job; `backend_metadata.json` records the Belenos backend/software stack
  and performance metadata (`Clock 4.94 MHz`, `HOM 91.0%`, transmittance
  `4.84%`, `g2 1.9%`) queried from the live Perceval API.
- **Analysis** (`analysis/`): statistical estimators (Wilson intervals,
  log-ratio suppression ratios, the error-injection fit), the operator algebra
  of the construction, the simulation benchmarks (Table I), and figure
  generation. `verify_package.py` recomputes every reported number directly from
  the raw counts.
- **Figures** (`figures/`): standalone LaTeX sources and compiled vector PDFs
  for the three manuscript figures (`fig1_cube`, `fig2_workflow`,
  `fig3_exp4_core_depth`); each compiles on its own with
  `pdflatex <file>.tex`.

See `dataset/README.md` and `analysis/README.md` for details.
