QuadraticProgram.to_ising¶
- QuadraticProgram.to_ising()[fuente]¶
Return the Ising Hamiltonian of this problem.
Variables are mapped to qubits in the same order, i.e., i-th variable is mapped to i-th qubit. See https://github.com/Qiskit/qiskit-terra/issues/1148 for details.
- Devuelve:
The qubit operator for the problem offset: The constant value in the Ising Hamiltonian.
- Tipo del valor devuelto:
qubit_op
- Muestra:
QiskitOptimizationError – If a variable type is not binary.
QiskitOptimizationError – If constraints exist in the problem.