IntegerToBinary.encode¶
- IntegerToBinary.encode(op, name=None)[source]¶
Convert an integer problem into a new problem with binary variables.
- Parameters
op (
QuadraticProgram
) – The problem to be solved, that may contain integer variables.name (
Optional
[str
]) – The name of the converted problem. If not provided, the name of the input problem is used.
- Return type
- Returns
The converted problem, that contains no integer variables.
- Raises
QiskitOptimizationError – if variable or constraint type is not supported.