from_ising#
- from_ising(qubit_op, offset=0.0, linear=False)[fuente]#
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.
- Parámetros:
- Devuelve:
The quadratic program corresponding to the qubit operator.
- Muestra:
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
- Tipo del valor devuelto: