Optimization helpers

inflation.sdp.optimization_utils.max_within_feasible(sdp: InflationSDP, symbolic_values: Dict[CompoundMonomial, Callable], method: str, return_last_certificate=False, **kwargs) Union[float, Tuple[float, Add]][source]

Maximize a single real variable within the set of feasible moment matrices determined by an InflationSDP. The dependence of the moment matrices in the variable is specified by an assignment of monomials in the moment matrix to arbitrary expressions of the variable. This is useful for finding (bounds for) critical visibilities of distributions beyond which they are impossible to generate in a given quantum causal scenario.

Parameters
  • sdp (InflationSDP) – The SDP problem under which to carry the optimization.

  • symbolic_values (Dict[CompoundMonomial, Callable]) – The correspondence between monomials in the SDP problem and symbolic expressions depending on the variable to be optimized.

  • method (str) – Technique used for optimization. Currently supported: "bisection" for bisection algorithms, and "dual" for exploitation of the certificates of infeasibility (typically much fewer iteration steps).

  • return_last_certificate (bool, optional) – Whether to return, along with the maximum value of the parameter, a separating surface that leaves the set of positive-semidefinite moment matrices in its positive side and evaluates to 0 in the maximum value reported.

  • **kwargs – Instructions on which extra symbolic values to assign numbers and options to be passed to the optimization routines (bounds, precision, tolerance, …).

Returns

  • float – The maximum value that the parameter can take under the set of positive-semidefinite moment matrices. This is the output when return_last_certificate=False.

  • Tuple[float, sympy.core.add.Add] – The maximum value that the parameter can take under the set of positive-semidefinite moment matrices, and a corresponding separating surface (a root of the function corresponds to the critical feasible value of the parameter reported). This is the output when return_last_certificate=True.