Spsa#

SPSA Optimizer (Antithetic + Adaptive)#

Simultaneous Perturbation Stochastic Approximation with antithetic sampling and simple power-law decays for learning rate and perturbation magnitude. Cost: ~2 evaluations per step, independent of parameter dimension.

Interface:
  • initialize(params) -> state

  • step_params(model, params, context) -> (new_params, state)

class qmlhc.optim.numpy_optim.spsa.HCSPSAOptimizer(lr0=0.05, eps0=0.1, decay_lr=0.101, decay_eps=0.102, antithetic=True, clip=None, seed=12345)[source]#

Bases: object

Robust optimizer for noisy, low-shot regimes.

initialize(params)[source]#
Return type:

Dict[str, Any]

step_params(model, params, context)[source]#
Return type:

Tuple[Dict[str, Any], Dict[str, Any]]