qiskit.optimization.problems.QuadraticProgram.to_ising¶
-
QuadraticProgram.
to_ising
()[source]¶ Return the Ising Hamiltonian of this problem.
- Returns
The qubit operator for the problem offset: The constant value in the Ising Hamiltonian.
- Return type
qubit_op
- Raises
QiskitOptimizationError – If a variable type is not binary.
QiskitOptimizationError – If constraints exist in the problem.