from_gurobipy#

from_gurobipy(model)[source]#

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

প্যারামিটার:

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

রিটার্নস:

The quadratic program corresponding to the model.

রেইজেস:

QiskitOptimizationError -- if the model contains unsupported elements.

রিটার্ন টাইপ:

QuadraticProgram