Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

IsingToQuadraticProgram

class IsingToQuadraticProgram(linear=False)

GitHub

Convert a qubit operator into a quadratic program

Parameters

linear (bool) – If linear is True, x2x^2 is treated as a linear term since x2=xx^2 = x for x{0,1}x \in \{0,1\}. Else, x2x^2 is treat as a quadratic term. The default value is False.


Methods

encode

IsingToQuadraticProgram.encode(qubit_op, offset=0.0)

Convert a qubit operator and a shift value into a quadratic program

Parameters

Return type

QuadraticProgram

Returns

QuadraticProgram converted from the input qubit operator and the shift value

Raises

Was this page helpful?
Report a bug or request content on GitHub.