PennyLane & photonics
Use per-channel response profiles as the measured input.
Use TrueLoop when the circuit or photonic system exposes a vector of per-channel measurements with a feasible desired profile. The runtime regulates that measured profile through the same five-line loop.
The useful regime includes drift and shot noise when each acquisition remains resolved enough to support stable control. Registered simulated response-profile cells remain scale-flat through 16,384 controls with a four-to-six-response floor.
Do not use this pattern to steer a variational search from one scalar energy, an edge-coupled QAOA objective, or an extremal target near response saturation.
def measure(x):
return qml.math.toarray(circuit(x)).tolist()
opt = SWCOptimizer(key, n=len(x0), mode="regulation", target=target)
x = opt.start(x0)
for _ in range(rounds):
x = opt.step(measure(x), target=target)
proof = opt.end()Run preflight, inspect the evidence scope, then compare the active default and your incumbent under one measured budget.