BoulderOpalController

class qctrlmloop.BoulderOpalController(interface, optimizer, test_point_count=None, learner=None, training_run_count=0, interleaved_run_count=0, **kwargs)

Controller for optimizations that uses Boulder Opal automated closed-loop optimizers.

You can use this controller to integrate an experiment managed by M-LOOP to a Boulder Opal automated closed-loop optimizer. Notice that you need to set up an M-LOOP Interface to your experiment, initiate a Boulder Opal session, and define your choice of Boulder Opal automated closed-loop optimizer prior to using this class.

Parameters

  • interface (mloop.interfaces.Interface) – The M-LOOP interface from where you obtain the cost value of the test points.
  • optimizer (boulderopal.closed_loop.ClosedLoopOptimizer or str) – The Boulder Opal automated closed-loop optimizer that you want to use. It must be a valid optimizer object (either an optimizer object or a str that represents the state from a previous optimization run), as described in the Boulder Opal reference documentation.
  • test_point_count (int or None , optional) – The requested number of test points that the Boulder Opal automated closed-loop optimizer generates at each step. If chosen, it must be greater than zero. This is a hint only. The Boulder Opal automated closed-loop optimizer might choose differently.
  • learner (mloop.learners.Learner or None , optional) – The M-LOOP Learner that this controller uses to obtain extra test points, before there are enough results to run a step of the Boulder Opal automated closed-loop optimizer. Defaults to None, in which case this controller uses a RandomLearner.
  • training_run_count (int , optional) – The minimum number of training points that the controller obtains before calling the Boulder Opal automated closed-loop optimizer. Defaults to 0, in which case the controller uses the minimum number of points that the Boulder Opal automated closed-loop optimizer requires.
  • interleaved_run_count (int , optional) – The minimum number of test points that the controller obtains from the learner between two calls of the Boulder Opal automated closed-loop optimizer, in addition to the points that Boulder Opal requested. Defaults to 0.
  • kwargs (dict) – All the extra arguments that the Controller class from M-LOOP accepts.

Methods

check_end_conditionsCheck whether any of the end contions have been met.
optimizeOptimize the experiment.
print_resultsPrint results from optimization run to the logs
save_archiveSave the archive associated with the controller class.

Was this useful?