from_ising#
- from_ising(qubit_op, offset=0.0, linear=False)[source]#
Create a quadratic program from a qubit operator and a shift value.
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.
- প্যারামিটার:
- রিটার্নস:
The quadratic program corresponding to the qubit operator.
- রেইজেস:
QiskitOptimizationError -- if there are Pauli Xs or Ys in any Pauli term
QiskitOptimizationError -- if there are more than 2 Pauli Zs in any Pauli term
QiskitOptimizationError -- if any Pauli term has an imaginary coefficient
- রিটার্ন টাইপ: