class qctrl.dynamic.types.optimization.Result(*, cost=None, output=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.

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

  • output (dict) – 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.

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

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