# Symmetric two-port dipole-waveform MSE campaign

## Physical experiment

This campaign uses the complete x/y/z mirror reduction of the even,
y-polarized cavity. In FDTDX the parity tuple is `(1,-1,1)`, giving a
194x42x42 reduced Maxwell grid and 160x20 = 3,200 independent 25 nm density
pixels for the physical 8 um x 1 um design region. The initial material is a
450 nm midpoint-permittivity guide: density 0.5 in the guide and zero outside.
There is no filter, projection, beta continuation, binarization, imposed
period, trust region, line search, or candidate replay.

The retained TE source lies at x=+4.25 um, propagates toward the cavity, and
has amplitude 1/sqrt(2). Reflection supplies the equal left source, so the
unfolded excitation is the unit-total-power symmetric bright port

\[
  s_+=(s_L+s_R)/\sqrt2,\qquad |s_L|^2=|s_R|^2=1/2.
\]

The desired cavity has total beta one and therefore beta_L=beta_R=0.5. The
odd port combination is absent by symmetry. A three-component electric-field
monitor is located at the central y-polarized dipole.

## Fixed physical target

The target values are

\[
  \lambda_0=780\ {\rm nm},\qquad Q_\star=10^4,\qquad
  V_\star=0.1\ {\rm um}^3,\qquad \beta_{\rm total}=1.
\]

For the midpoint dielectric index n_d=1.75512, the target total Purcell factor
is

\[
 F_{P,\star}=\frac{3}{4\pi^2}\left(\frac{\lambda_0}{n_d}\right)^3
 \frac{Q_\star}{V_\star}=666.997,
\]

split equally between the two traveling-wave ports. The actual discrete
Gaussian source waveform is delayed by the solved guide effective index and
drives the exact discrete pole recursion

\[
 r=e^{-\omega_0\Delta t/(2Q_\star)},\quad
 p=r e^{-i\omega_0\Delta t},\quad
 a_n=p a_{n-1}+(1-r)s_n.
\]

The fixed dipole target includes the prompt symmetric-guide field and cavity
response,

\[
 E_\star(t)=\Re\left[E_{+,y}s(t)+
 \sqrt{F_{P,\star}}E_{+,y}a(t)\right].
\]

There is no amplitude fit, phase fit, or per-geometry target rescaling.

## Sole optimization objective

The only loss is the normalized full-tape vector waveform error

\[
 L=\frac{\sum_n\left(|E_y(t_n)-E_\star(t_n)|^2+
 |E_x(t_n)|^2+|E_z(t_n)|^2\right)}
 {\sum_n|E_\star(t_n)|^2},\qquad J=-L.
\]

Displayed fidelity is `1/(1+L)`. Q, wavelength, mode volume, reciprocal
Purcell enhancement, and inferred beta are telemetry only and cannot alter a
gradient or Adam step.

## Why the tape is fixed at 2 ps

Gradient convergence with respect to the FDTD horizon cannot be established
from the ordinary single forward/adjoint pair: gradients for two different
terminal times have different adjoint terminal conditions. A rigorous direct
comparison therefore costs another reverse sweep, defeating the intended
one-pair-per-step accounting. Inspecting only residual field energy is not a
gradient-convergence test and created a threshold barrier in the superseded
campaign.

This first experiment consequently uses a static 2 ps tape, as explicitly
requested. Every dashboard update is exactly one 2 ps checkpointed forward
trajectory and one reverse sweep. Later horizon comparisons may be run as
separate audited ablations without silently changing the live objective.

## Telemetry

Three translated source-off windows provide field- and energy-decay pole fits.
Q is the conservative minimum of those two estimates. Mode volume is inferred
from full-device stored energy and the y field at the dipole,

\[
 V_{\rm eff}=\frac{U}{\epsilon_d |E_{y,\rm rms}(r_d)|^2},
\]

with the octant symmetry factor restored. The simulated cavity response is
projected onto the fixed target cavity waveform to estimate reciprocal
port-projected Purcell enhancement. Only after a pole fit passes does the
dashboard interpret

\[
 \beta_{\rm total}=\frac{F_{\rm reciprocal}}
 {(3/4\pi^2)(\lambda/n_d)^3 Q/V},\qquad
 \beta_L=\beta_R=\beta_{\rm total}/2.
\]

These beta values are diagnostic; a final dipole-source port-flux audit is the
authoritative measurement.

## Optimizer

Raw material-only Adam ascent uses learning rate 0.01, beta1=0.9, beta2=0.999,
and epsilon=1e-8, followed only by clipping density to [0,1]. One update is
committed unconditionally after its finite-gradient gate. The worker has no
iteration limit and checkpoints atomically after every update.
