Random 8×8 power-splitting matrix (30 × 45 µm)
3D adjoint inverse design of a Haar-random 8×8 power-splitting matrix in a 30 × 45 µm region with psinverse on PSFDTD. The design does not meet its target and is not robust; both are reported here.
The target is the squared modulus T = |U|² of a Haar-random 8×8 unitary matrix U (seed 2026): each of 8 inputs must distribute its TE0 power over 8 outputs in a different way, with entries between 0.15% and 39%. The device is designed with the same adjoint method as the 2×2 and 4×4 splitters, scaled to a 30 × 45 µm design region with 540 000 design variables. What is checked is whether the recipe that works at 5 µm still works at this scale.
It does not, fully. The best design reaches a 2.9% RMS ratio error and about 1.5 dB insertion loss in the optimizer's own model, but misses the 3% / 1.5 dB specification, degrades on a finer grid and fails after a 100 nm clean-up. See Limitations.
Setup
- Platform: 220 nm SOI, SiO₂ above and below (n_Si = 3.4757, n_SiO₂ = 1.444), 1550 nm, TE0. PSFDTD 3D FDTD, CUDA backend, single precision, one RTX 4090.
- Geometry: design region 30 µm (x, propagation) × 45 µm (y); 8 inputs on the left and 8 outputs on the right, port pitch 5 µm (y = ±2.5 … ±17.5 µm), 500 nm access waveguides.
- Grid: voxel = FDTD cell = 50 nm, 600 × 900 = 540 000 design variables; z is 44 nm inside the silicon layer (5 cells), graded to 100 nm outside, 0.6 µm of oxide above and below, 8 PML layers in z; 22.6 M cells including PML.
- Optimisation: 8 forward + 8 adjoint 3D simulations per iteration; amplitude objective, adaptive weighting, geometric length-scale constraint (R = 150 nm), ratio refinement at the end. During optimisation a run stops when the field energy has decayed to 1e-4; the final evaluation uses 1e-6.
- Specification: for every input, max absolute ratio error ≤ 3% and insertion loss ≤ 1.5 dB. The RMS error and the per-input splitting fidelity
F_i = (Σ_j √(r_ij t_ij))²are also reported. - Cost (RTX 4090, about 8.1 G cells·steps/s): one 3D simulation takes 33–95 s depending on the design (about 22 000 steps for the initial grey slab, about 11 000 once binarised); one iteration takes 9–25 min. Each run's design-region DFT field is 183 MB (HDF5).
Target matrix:
| Input | out0 | out1 | out2 | out3 | out4 | out5 | out6 | out7 |
|---|---|---|---|---|---|---|---|---|
| in0 | 0.0697 | 0.1418 | 0.1571 | 0.0972 | 0.0131 | 0.0759 | 0.1574 | 0.2879 |
| in1 | 0.2456 | 0.0700 | 0.0262 | 0.1711 | 0.1329 | 0.0015 | 0.0495 | 0.3032 |
| in2 | 0.1189 | 0.0917 | 0.1077 | 0.1644 | 0.0632 | 0.3323 | 0.0740 | 0.0477 |
| in3 | 0.0544 | 0.1918 | 0.0439 | 0.1397 | 0.0953 | 0.3375 | 0.0745 | 0.0629 |
| in4 | 0.0401 | 0.0532 | 0.2291 | 0.1687 | 0.2660 | 0.1936 | 0.0056 | 0.0436 |
| in5 | 0.0949 | 0.0232 | 0.1678 | 0.0678 | 0.1117 | 0.0309 | 0.3535 | 0.1502 |
| in6 | 0.3128 | 0.3908 | 0.0377 | 0.1835 | 0.0150 | 0.0257 | 0.0263 | 0.0082 |
| in7 | 0.0636 | 0.0374 | 0.2305 | 0.0075 | 0.3027 | 0.0027 | 0.2592 | 0.0963 |
Results
Round 1: β doubled every 15 iterations (105 iterations, 19.8 h on one RTX 4090)
β = 2, 4, 8, 16, 32, 64 for 15 iterations each, plus 15 iterations of ratio refinement at β = 64.
| Iteration | β | Max ratio error | RMS ratio error | Insertion loss mean / max (dB) | Greyness |
|---|---|---|---|---|---|
| 0 | 2 | 36.5% | 14.2% | 11.4 / 13.3 | 1.00 |
| 29 | 4 | 4.7% | 1.7% | 1.27 / 1.54 | 0.92 |
| 44 | 8 | 9.4% | 3.4% | 2.53 / 2.88 | 0.74 |
| 59 | 16 | 21.7% | 7.3% | 5.53 / 7.04 | 0.45 |
| 89 | 64 | 15.7% | 4.6% | 3.11 / 3.69 | 0.08 |
| 104 | 64 | 9.4% | 4.1% | 2.12 / 2.69 | 0.08 |
| after thresholding | ∞ | 15.5% | 5.6% | 3.75 / 4.45 (reflection up to 9.8%) | 0 |
The grey-scale stage was already good (iteration 29), but every doubling of β made the solution collapse and 15 iterations were not enough to recover. The final thresholding pushed the loss to about 3.8 dB.
Round 2: warm start from round 1, β ramped smoothly to 256 (60 iterations, 9.1 h on one RTX 4090)
β rises geometrically from 64 to 256 over 45 iterations (about 3% per iteration), then 15 iterations of ratio refinement at β = 256.
| Iteration | β | Max ratio error | RMS ratio error | Insertion loss mean / max (dB) | Greyness |
|---|---|---|---|---|---|
| 105 | 64 | 14.9% | 3.9% | 1.90 / 2.22 | 0.05 |
| 135 | 165 | 7.5% | 3.0% | 1.64 / 1.88 | 0.02 |
| 149 | 256 | 8.0% | 2.7% | 1.49 / 1.72 | 0.01 |
| 164 | 256 | 6.2% | 2.8% | 1.28 / 1.51 | 0.01 |
| after thresholding | ∞ | 6.4% | 2.9% | 1.46 / 1.74 (reflection ≤ 1.1%) | 0 |
In the optimizer model the final design has an RMS error of 2.9% over all 64 ratios (max 6.4%), a per-input fidelity of 0.948–0.987 and an insertion loss of 1.23–1.74 dB, with three inputs slightly above 1.5 dB.
A flux-box diagnostic at iteration 115 for input in3 shows where the power goes: 64% reaches the outputs as TE0, 0.9% is reflected, 17% each is radiated upward and downward out of the silicon layer, and about 0 leaks through the sides of the design region.

History of both rounds: max / RMS error of the 64 ratios, worst / mean insertion loss, and β with greyness; round 1 spikes at every β doubling, round 2 descends smoothly.

Final round-2 layout (600 × 900 voxels of 50 nm) with voxel-level zooms.

|E| at 1550 nm in the mid-plane of the silicon layer for each input of the round-2 design, overlaid on the layout: each input forms a routing tree to the 8 outputs.

Realised vs target ratios in five models, the error matrix of the final design, and the insertion loss and fidelity per input.
Comparison
There is no external reference; the round-2 design is compared against independent re-simulations of itself:
| Model | Grid | Max ratio error | RMS ratio error | Insertion loss mean / max (dB) |
|---|---|---|---|---|
| Optimizer model (50 nm voxels) | 50 nm | 6.4% | 2.9% | 1.46 / 1.74 |
| Same voxel pattern, refined grid (in3 and in6 only) | 25 nm | 7.7% (optimizer model 3.8%) | 3.8% | 3.12 / 3.70 (optimizer model 1.60 / 1.74) |
| Smooth 0.5 contour (area-averaged onto the Yee cells) | 50 nm | 9.7% | 3.9% | 2.36 / 2.97 |
| Smooth contour + 100 nm morphological clean-up | 50 nm | 34% | 9.6% | 6.1 / 8.2 |
The smooth-contour checks use verify --mode fine (the 0.5 contour rendered at 5 nm and area-averaged onto each E component's Yee cell), because the layout has 1148 polygons with 10⁶ vertices and polygon rasterisation on 22 M cells was not feasible. On the 2×2 splitter this mode differs from the polygon check by about 1.5 percentage points in power, with the same insertion loss.
Limitations
- The specification is not met. Even in the optimizer model the best design has a max ratio error of 6.4% against a 3% limit, and three inputs exceed the 1.5 dB loss limit.
- The design is not grid-converged. Refining the grid from 50 nm to 25 nm for the same voxel pattern adds about 1.5 dB of insertion loss (1.60 / 1.74 dB → 3.12 / 3.70 dB for the two inputs checked).
- The design is not fabricable as is. It relies on 50–100 nm details; after a 100 nm clean-up it fails completely (34% max error, 6.1 / 8.2 dB loss). The same recipe on the 5 µm 4×4 splitter changes by only about 2 percentage points under clean-up.
- Round 1 failed outright (15.5% max error, 3.75 / 4.45 dB after thresholding) because of the stepped β schedule.
- Round 3 has no result. The source report describes a third round (300 nm filter radius, single geometric β ramp from 2 to 256, 140 iterations, estimated at about 28 h) as still running; no numbers for it are available, so none are given here.
- Cost: each iteration is 16 simulations of 22.6 M cells (9–25 min on one RTX 4090), so a round of 100+ iterations takes about a day.
Reproduce
bash examples/simple_8x8/run.sh # generate the target (if config.json is absent) → optimise (resumable) → verify → figures → collect results/The verification steps inside run.sh (shown for round 2):
python -m psinverse.verify runs/s8x8_r2 --mode pixel --sub 1 --band 1550 1550 10 --shutoff 1e-5
python -m psinverse.verify runs/s8x8_r2 --mode fine --sub 1 --band 1550 1550 10 # smooth 0.5 contour
python -m psinverse.verify runs/s8x8_r2 --mode fine --sub 1 --mfs 0.1 --band 1540 1560 10 # + 100 nm clean-up
python -m psinverse.verify runs/s8x8_r2 --mode pixel --sub 2 --inputs 3 6 --band 1550 1550 10 # same voxels, 25 nm gridArbitrary-ratio 2×2 and 4×4 power splitters
Adjoint density-based inverse design of 2×2 and 4×4 arbitrary power splitters on 220 nm SOI with psinverse on PSFDTD (3D FDTD, RTX 4090), verified on fabricable geometry.
TE0 → TE1 mode converter
Broadband 3D inverse design of an in-line TE0 → TE1 converter in a 1.8 µm wide SOI waveguide with psinverse on PSFDTD, compared with the reported values of Dou et al., Opt. Express 2023.