Docs

Per-domain quickstarts

The loop is identical across substrates — only measure() and the score change. Three common shapes:

Photonic IC

Tune phase shifters / heaters to maximize transmission or minimize loss; the measurement is an optical power reading per setting.

copyx = opt.step(read_power(x), score=read_power(x))   # maximize transmitted power

RF / microwave / analog

Tune bias points or a matching network to minimize reflection (maximize return loss); the measurement is an S-parameter or detector reading.

copyx = opt.step(read_s11(x), score=-abs(read_s11(x)))   # minimize reflection

Sensing & NDT

Tune array parameters (delays, gains, focus) to maximize usable signal per scan, when each scan is expensive.

copyx = opt.step(scan_features(x), score=snr(x))        # maximize SNR per scan

In every case: a writable configuration in, an expensive measurement out, a scalar score that rewards the outcome you want.