Dear Caasie,
thank you for bringing this up.
You can set individual boundaries through the "method_params" dictionary.
When initializing the optimizer make sure to select a (gradient free) scipy.minimize method that allows boundaries, e.g. "Nelder-Mead".
optimizer = cpo.create_pulse_optimizer(
system.system,
system.controls,
system.initial,
system.target,
alg="CRAB",
optim_method="Nelder-Mead",
method_params={
"bounds": [(-1, 1) for _ in range(num_params)], # must match the number of your |a|&|b| parameters to be optimized
},
)
However there is one caveat. Thanks to your request I found a bug in the current version, that prevents this way of setting individual parameter boundaries. I would kindly ask you to wait until the master has been updated with
this patch.
Btw: We are about to release a the new qutip-qoc package (very) soon, where you will have easy control over initial and boundary values for CRAB.
Best regards,
Patrick
On 07.05.24 at 20:00, caasie mike wrote: