Circuit.minimize

Circuit.minimize(cost, **kwargs)[source]

Minimize the circuit’s cost with respect to some CostFunction.

Attempts to change the parameters of the circuit such that the circuit’s cost according to cost is best minimized.

Parameters:
  • cost (CostFunction) – The cost function to use when evaluting the circuit’s cost.

  • minimizer (str) – The minimization method to use. If unspecified, attempts to assign best method. (kwarg)