# SiO2-clad 100 nm SiN atom-strip Q/V campaign

Campaign: `sin100_sio2clad_xyz_y_atom_strip_16x2_temporal_q_over_v_v1`

## Purpose

This clean restart asks a deliberately simple question: how large can the
atom-local Purcell enhancement become when the optimizer may put the resonant
mode mostly in SiN, while a one-micron vacuum access channel through the atom
remains an exact hard constraint?  The campaign discovers a pole with the
established absolute temporal target, maximizes the same pole's measured Q/V,
then converts the stalled gray topology into a fabricable smooth boundary
without surrendering the Q/V already earned.  It does not reward waveguide
beta or add a geometry term to the electromagnetic Q/V objective.

## Physical and numerical geometry

- The full design region is 16 um along x and 2 um along y on a 50 nm grid.
- A y-oriented atom sits at the origin.  The full strip
  `-0.5 um < x < +0.5 um` is vacuum for every y and every z cell.  The
  optimizer cannot place either SiN or SiO2 in it.
- The device uses x/y/z mirror symmetry `(1,-1,1)`, so only one octant is
  simulated.  The y parity is the electric-wall parity appropriate to the
  centered y dipole.  Reported modal energy is unfolded by the factor eight.
- The initial core is 100 nm thick.  Every trainable in-plane density is 0.5
  outside the hard strip; this is the exact midpoint of the SiO2-to-SiN
  permittivity interpolation, not the earlier density-zero air-mode seed.
- The SiN index is 2.0 and the symmetric SiO2 cladding index is 1.45.  Each
  initial SiO2 layer is 300 nm thick.  The fixed source/feedthrough stack keeps
  these nominal dimensions while the design stack becomes tunable after the
  handoff.
- The non-PML z interior is 3.5 um.  This contains the largest permitted
  2.5 um material stack plus 0.5 um of air between each outer oxide face and
  the PML.  Ten 50 nm PML cells follow on each full-domain side.
- The mode source is the fundamental y-polarized mode of the nominal cladded
  feedthrough.  Two coherent symmetry-related inputs each carry amplitude
  `1/sqrt(2)`, so the unfolded bright input has unit total power.

## Three-material differentiable map

Let `rho(x,y)` be a raw box-constrained topology coordinate, `s` the normalized
SiN thickness coordinate, and `c` the normalized per-side SiO2 coordinate.
There is no conic filter or density projection.  At the handoff,

```
t_SiN(s) = 0.050 um + s (0.500 - 0.050) um,
t_SiO2(s,c) = t_SiN(s) + 0.050 um
              + c [1.000 um - t_SiN(s) - 0.050 um].
```

Thus every legal proposal has
`t_SiO2 >= t_SiN + 0.050 um`; the cladding on each side is always strictly
thicker than the full SiN slab.  The initial coordinates reproduce
`t_SiN=0.100 um` and `t_SiO2=0.300 um` per side exactly.

On the retained positive-z half-domain, differentiable planar fill fractions
`F_core(z)` and `F_stack(z)` represent boundaries at `t_SiN/2` and
`t_SiN/2+t_SiO2`.  Outside the immutable vacuum strip,

```
epsilon(x,y,z) = 1
  + (epsilon_SiO2 - 1) F_stack(z)
  + rho(x,y) (epsilon_SiN - epsilon_SiO2) F_core(z).
```

Bulk cells are exact materials.  Only cells cut by a planar thickness boundary
are gray subpixel fill cells.  A one-sided custom derivative selects the cell
entered by an increasing boundary at exact grid faces, avoiding the ambiguous
subgradient of a clipped fill.

## Stage A: temporal pole discovery

The source is a broadband Gaussian pulse centered at 780 nm.  The fixed target
is the exact discrete causal response at the atom of that pulse driving one
Q=10,000, V=0.1 um3, beta-one pole, including both the prompt feedthrough field
and the finite-Q cavity convolution.  The sole Stage-A scalar is normalized
full-vector temporal error,

```
J_time = - sum_t ||E_sim(t)-E_target(t)||^2 / sum_t |E_target,y(t)|^2.
```

Raw Adam uses learning rate 0.01.  It changes only the 50 nm topology pixels;
both thicknesses stay at their nominal values.  Stage A runs for at least 50
updates and hands off only when independent field-amplitude and total-energy
ringdown fits are trustworthy, agree within 25%, and give Q at least 100.

## Stage B: pure atom-local Q/V

The pulse is recentered on the measured pole whenever its frequency moves by
at least one pulse spectral width.  Field and energy fits refer to that same
tracked pole.  The atom-oriented mode volume is computed from the fitted local
y-field and the total unfolded modal energy, and is normalized as
`Vn = V/(lambda_pole/n_air)^3` at the fitted pole wavelength.

Stage B jointly exposes every raw topology pixel, the SiN thickness coordinate,
and the per-side SiO2 thickness coordinate.  Its entire scalar objective is

```
J_QV = log(Q_harmonic) - log(Vn),
Q_harmonic = 2 Q_field Q_energy / (Q_field + Q_energy).
```

This is pure same-pole Q/V at the atom.  There is no frozen-volume constraint,
guided-mode multiplier, binarization term, frequency penalty, or
source-amplitude projection in this discovery stage.

An adaptive-trust L-BFGS-B controller proposes one joint move from one fresh
forward/adjoint pair.  A proposal is committed only when a forward replay has a
trustworthy pole fit and strictly increases `J_QV`.  The trust radius shrinks
after a failed replay and grows after a well-predicted boundary-reaching move.
Rejected replays reuse the cached adjoint direction.  Curvature is restarted
only at the trust floor or after a pole-recentering checkpoint; it is not reset
on ordinary accepted updates.

## Stage C: staged beta continuation of Q/V

The Stage-B incumbent at accepted update 393 reached `Q/Vn = 694.1518`
(`Q = 3263.2`, `Vn = 4.7018`) and then produced more than one thousand rejected
trust replays.  This is a controller plateau, not evidence of a physical
maximum: the trainable topology still had binarity score 0.3874 and 81.7% gray
pixels.  Frozen forward replays at density motions 0.001, 0.003, 0.01, and 0.03
all increased both binarity and Q/V; at motion 0.01 the score rose to 0.4002
and Q/V rose by 2.3%.  A tangent-space binarity continuation initially escaped
the plateau, reaching `Q/Vn = 724.63`, but then stalled because its one
binarity direction produced a small negative second-order Q/V change at every
trust radius.  That branch is preserved as useful evidence rather than treated
as the final fabrication method.

Stage C now uses the conventional centered tanh projection

```
rho_physical(p; beta) =
  [tanh(beta/2) + tanh(beta (p - 1/2))] / [2 tanh(beta/2)].
```

There is no conic or other spatial filter.  At the handoff, an analytical
inverse projection at beta=1 initializes the latent controls `p` so the
physical density is unchanged to numerical precision.  At each fixed beta the
sole differentiated objective remains the Stage-B same-pole `log(Q/Vn)` over
the latent pixels. The already-optimized SiN and SiO2 thicknesses are frozen
during beta continuation so the two global coordinates cannot consume a
nominally pixel-binarization step; both become trainable again in Stage D. One fresh
forward/adjoint pair proposes one adaptive-trust L-BFGS-B step and one forward
replay accepts only a trustworthy strict Q/V improvement.

Beta is held fixed for six Q/V trials, then raised by 0.5.  This repeats from
beta=1 to beta=32; beta=32 is subsequently held while Q/V optimization
continues indefinitely.  The small increments deliberately allow temporary
projection-induced changes to be repaired by Q/V optimization.  Existing
L-BFGS curvature pairs survive a beta increment, while the single secant that
would span two different beta maps is skipped.  Binarity score and gray
fraction are telemetry and handoff diagnostics, not terms in the objective.

## Stage D: cubic-spline level-set boundary

Once beta is at least 16, `B >= 0.95`, and at most 10% of trainable pixels lie
between density 0.05 and 0.95, the binary islands may be fitted by a
signed-distance level set.  A
topology-guarded tensor-product cubic-spline chart with 81 by 11 controls moves
only a 0.2 um band around the interface.  Each local chart permits at most
0.1 um physical displacement; four-times subpixel quadrature and a 12.5 nm
interface width convert the smooth boundary into FDTD cut-cell fill fractions.
Thus bulk cells are exactly binary while only genuine interface cells are
gray.  The hard vacuum strip and port masks are reapplied after every decode.

The handoff is committed only if an exact forward replay remains above both
the current incumbent Q/V and the same fixed Stage-C floor.  Stage D then returns to the Stage-B same-pole
`log(Q/Vn)` objective, jointly optimizing spline controls and both thicknesses
with adaptive-trust L-BFGS-B.  Candidate boundaries must preserve the fitted
component/hole topology and strictly improve trustworthy Q/V.

## Layout export

The live dashboard publishes a current GDS bundle.  Before Stage D it is a
clearly marked thresholded preview of the gray topology; after the handoff its
SiN outline is the zero contour of the smooth level-set boundary and is the
authoritative planar mask.  GDS stores planar layers only, so the accompanying
manifest records the optimized SiN and per-side SiO2 thicknesses, material
indices, symmetry unfolding, hard air strip, pole metrics, and layer map.

## Persistence and interpretation

The optimizer and dashboard run indefinitely under restartable user services;
there is no scheduled terminal update.  The current artifact is written
atomically.  A complete immutable optimizer snapshot is created every 50 accepted parameter updates and must never overwrite an earlier snapshot.

The dashboard reports linear-scale Q, physical and normalized atom mode volume,
Q/V, the corresponding ideal-alignment Purcell estimate
`3 Q/(4 pi^2 Vn)`, pole wavelength, both fitted Q estimators, both thicknesses,
geometry/difference maps, x-y and full-domain x-z fields, the measured and ideal
temporal traces, binarity/gray fraction, parameterization, trust behavior,
acceptance history, and layout downloads.  Purcell is a local Q/V estimate,
not a claim of beta to the feedthrough.
