pygsti.optimize.optimize.create_objfn_printer

pygsti.optimize.optimize.create_objfn_printer#

create_objfn_printer(obj_func, start_time=None)#

Create a callback function that prints the value of an objective function.

Parameters:
  • obj_func (function) – The objective function to print.

  • start_time (float , optional) – A reference starting time to use when printing elapsed times. If None, then the system time when this function is called is used (which is often what you want).

Returns:

A callback function which prints obj_func.

Return type:

function