Bounded

Bounded#

class blochsim.optim.Bounded[source]#

Bases: object

An initial value and the interval a designed parameter stays in.

The limits are enforced exactly by optimizing a logit-transformed variable, so no iterate leaves them.

initial#

Starting value, in the parameter’s units; its shape is the shape the cost receives.

Type:

array-like

lower, upper

Limits, scalar or broadcastable to initial, in the parameter’s units. lower must be below upper at every element; initial is clamped just inside them.

Type:

float or array-like