Result

class qctrl.dynamic.types.optimization.Result(*, cost=None, output=None, metadata=None, errors=None, action=None)

The result of an optimization. It includes the minimized cost \(C(\mathbf v_\mathrm{optimized})\), and the outputs \(\{s_j: F_j(\mathbf v_\mathrm{optimized})\}\) corresponding to the variables that achieve that minimum cost.

Variables
  • cost (float, optional) – The minimum cost function value \(C(\mathbf v_\mathrm{optimized})\) achieved across all optimizations.

  • output (dict, optional) – The dictionary giving the value of each requested output node, evaluated at the optimized variables, namely \(\{s_j: F_j(\mathbf v_\mathrm{optimized})\}\). The keys of the dictionary are the names \(\{s_j\}\) of the output nodes.

  • metadata (dict, optional) – Metadata associated with the optimization. No guarantees are made about the contents of this metadata dictionary; the contained information is intended purely to help interpret the results of the optimization on a one-off basis.

  • errors (List[qctrl.dynamic.types.Error], optional) – Related validation errors.

  • action (qctrl.dynamic.types.CoreAction, optional) – Metadata about the execution of the function.