Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

IsingToQuadraticProgram

IsingToQuadraticProgram(linear=False)

GitHub(opens in a new tab)

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.