File size: 5,167 Bytes
63f98e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d368c45
 
 
 
 
 
 
 
 
 
63f98e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
tags:
  - physics
  - electromagnetic-simulation
  - photonics
  - silicon-photonics
  - fdtd
  - pde
size_categories:
  - 10K<n<100K
---

# PIC-Flow Dataset

22,500 frequency-domain FDTD electromagnetic-field simulations for parameterized
silicon-on-insulator photonic devices at λ = 1.55 µm. Used as the training,
validation, and test data for the [PIC-Flow](https://huggingface.co/RizzoLab/PIC-Flow)
neural surrogate model.

Code, documentation, and inference notebooks live in the GitHub repo:
[Rizzo-Integrated-Photonic-Systems-Lab/PIC-Flow](https://github.com/Rizzo-Integrated-Photonic-Systems-Lab/PIC-Flow).

## Contents

| Path | Description |
|---|---|
| `shards/shard_*.npz` | Packed FDTD samples (~225 shards). Each shard contains many slots `s0/`, `s1/`, ... |
| `shards/index.json` | Manifest mapping `(device, geometry_id, split, augment) → (shard, slot)`. |
| `geometries.jsonl` | One line per simulated device: family, geometric parameters, port count. |

## Per-sample fields

Each slot inside a shard carries:

| Key | Shape | Description |
|---|---|---|
| `eps` | `(160, 480)` float32 | Relative permittivity ε_r (Si core ≈ 5.8, SiO₂ cladding ≈ 2.09). |
| `Ez_real`, `Ez_imag` | `(160, 480)` float32 | Real and imaginary parts of the complex E_z field, source-anchored phase. |
| `src_mask` | `(160, 480)` float32 | Binary mask marking the active eigenmode-source port. |
| `port_masks` | `(N_ports, 160, 480)` float32 | Per-port binary masks (e.g., 4 ports for MMIs/DCs, 3 for Y-branches). |
| `port_ids` | `(N_ports,)` int32 | Integer port labels matching `port_masks`. |
| `input_port` | int | Which port was excited by the eigenmode source. |
| `wavelength_um` | float | Free-space wavelength in µm (1.55 throughout this dataset). |
| `dx_um`, `dy_um`, `Lx_um`, `Ly_um` | float | Grid resolution and physical extent. |
| `device` | string | Family: `mmi`, `ybranch`, or `directional_coupler`. |
| `geometry_id`, `split` | string | Unique geometry id and `train` / `val` / `test` membership. |
| `params/<name>` | float | Geometric parameters for this device (varies by family — see below). |

## Devices and parameter sweep

5-dimensional Latin-hypercube sweep per family, quantized to a half-pixel grid
(0.025 µm at 20 pixels/µm):

- **2×2 MMI** (4 ports, 7,500 samples): waveguide width [0.40–0.575], MMI width [4.5–5.5],
  MMI length [8.0–15.0], taper width [0.575–1.5], taper length [1.0–3.0] µm.
- **Y-branch** (3 ports, 7,500): waveguide width [0.40–0.575], junction length [1.0–3.0],
  bend length [4.0–7.0], arm offset [0.575–2.5], output length [1.0–4.0] µm.
- **Directional coupler** (4 ports, 7,500): waveguide width [0.40–0.575], gap [0.10–0.35],
  coupling length [5.0–8.0], bend length [4.0–6.0], port separation [0.825–2.0] µm.

## Splits

Index-based, shared across all PIC-Flow ablation runs:

| Split | Samples |
|---|---|
| train | 18,000 |
| val | 2,250 |
| test | 2,250 |

> **Note on the Hugging Face dataset viewer.** The viewer at the top of this page
> labels every shard as "train" because it auto-detects splits from filename
> patterns (`train-*`, `test-*`, `validation-*`). This dataset uses a different
> convention: splits are encoded **per sample** in `shards/index.json` (each entry
> has a `split: "train" | "val" | "test"` field), and a single `.npz` shard can
> contain samples from any of the three splits. The PIC-Flow dataloader
> ([`Model/dataset.py`](https://github.com/Rizzo-Integrated-Photonic-Systems-Lab/PIC-Flow/blob/main/Model/dataset.py))
> reads `index.json` and partitions samples accordingly. The 18,000 / 2,250 / 2,250
> split is what the dataloader actually serves — the viewer label is cosmetic.

## How to download

```bash
pip install huggingface_hub
hf download RizzoLab/PIC-Flow-Dataset --repo-type dataset --local-dir Data/unified_sweep_mmi_ybranch_dc_7500_each_1p55um
```

The dataloader in the GitHub repo
([`Model/dataset.py`](https://github.com/Rizzo-Integrated-Photonic-Systems-Lab/PIC-Flow/blob/main/Model/dataset.py))
expects this layout under `Data/unified_sweep_mmi_ybranch_dc_7500_each_1p55um/`.

## Generation

The data was produced with the Meep FDTD solver via
[`FDTD/unified_sweep.py`](https://github.com/Rizzo-Integrated-Photonic-Systems-Lab/PIC-Flow/blob/main/FDTD/unified_sweep.py)
in the GitHub repo. Each sample uses an eigenmode source exciting the fundamental TE
mode at the selected input port; fields are extracted at λ = 1.55 µm via discrete
Fourier transforms. The vertical 220 nm SOI slab mode is pre-solved into an effective
core index n_eff ≈ 2.4 used for the 2D scalar Helmholtz simulation.

To regenerate from scratch (~24 hours on one CPU node, 16 threads):

```bash
python FDTD/unified_sweep.py --output-dir Data/ \
    --devices mmi,ybranch,directional_coupler \
    --num-samples 7500 --wavelengths 1.55
```

## Citation

```bibtex
@article{Quaratiello2026PICFlow,
  author  = {Joseph Quaratiello and Anthony Rizzo},
  title   = {Physics-Based Flow Matching for Full-Field Prediction of Silicon Photonic Devices},
  journal = {arXiv},
  year    = {2026}
}
```

## License

MIT.