to_docplex_mp#

to_docplex_mp(quadratic_program)[source]#

Returns a docplex.mp model corresponding to a quadratic program.

Parameters:

quadratic_program (QuadraticProgram) – The quadratic program to be translated.

Returns:

The docplex.mp model corresponding to a quadratic program.

Raises:

QiskitOptimizationError – if the model contains non-supported elements (should never happen).

Return type:

Model