from_gurobipy#

from_gurobipy(model)[fuente]#

Translate a gurobipy model into a quadratic program.

Note that this supports only basic functions of gurobipy as follows:

  • quadratic objective function

  • linear / quadratic constraints

  • binary / integer / continuous variables

Parámetros:

model (Model) – The gurobipy model to be loaded.

Devuelve:

The quadratic program corresponding to the model.

Muestra:

QiskitOptimizationError – if the model contains unsupported elements.

Tipo del valor devuelto:

QuadraticProgram