English
Languages
English
Shortcuts



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

Parameters

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

Return type

QuadraticProgram

Returns

The quadratic program corresponding to the model.

Raises
  • QiskitOptimizationError – if the model contains unsupported elements.

  • MissingOptionalLibraryError – if gurobipy is not installed.