setting parameter bounds for CRAB

26 views
Skip to first unread message

caasie mike

unread,
May 7, 2024, 2:00:41 PMMay 7
to QuTiP: Quantum Toolbox in Python
Hi all, 

I'm using CRAB optimal control algorithm with Fourier basis functions, and I was wondering if Qutip allows to set the upper and lower bounds on parameters of the Fourier function. That is to say, if f(t) = acos(wt) + bsin(wt) is my control ansatze, then is it possible to bound values of |a| and |b|? While I know we can bound the total maximum amplitudes of f(t), I'm not sure if it's possible to bound each parameters. 

Any help would be very much appreciated!

hopf.p...@gmx.de

unread,
May 13, 2024, 4:08:23 AMMay 13
to qu...@googlegroups.com, caasi...@gmail.com
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:
 
--
You received this message because you are subscribed to the Google Groups "QuTiP: Quantum Toolbox in Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qutip/d32c4777-0131-47b6-902e-54b9c5cd449cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages