from_gurobipy#

from_gurobipy(model)[ソース]#

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