to_ising#

to_ising(quad_prog)[ソース]#

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.

パラメータ:

quad_prog (QuadraticProgram) – The problem to be translated.

戻り値:

A tuple (qubit_op, offset) comprising the qubit operator for the problem and offset for the constant value in the Ising Hamiltonian.

例外:
戻り値の型:

Tuple[SparsePauliOp, float]