classmethod BinaryQuadraticModel.from_ising(h: Mapping | Sequence, J: Mapping, offset: float = 0)[source]#

Create a binary quadratic model from an Ising problem.

  • h – Linear biases of the Ising problem, as either a dict of the form {v: bias, ...}, where v is a spin-valued variable and bias is its associated bias, or as a list of biases, where the indices are the variable labels.

  • J – Quadratic biases of the Ising problem.

  • offset – Constant offset.


A spin-valued binary quadratic model.