Quadratic Models#
Quadratic models are polynomials with one or two variables per term. A simple example of a quadratic model is,
where \(A\), \(B\), and \(C\) are constants. Single-variable terms—\(Ax\) and \(By\) here—are linear with the constant biasing the term’s variable. Two-variable terms—\(Cxy\) here—are quadratic with a relationship between the variables.
Quantum computers solve hard problems by minimizing an objective function. Quadratic models are useful objective functions because the quantum processing unit (QPU) can represent binary variables as the states of the qubits and linear and quadratic coefficients as, respectively, the physical biases and couplings applied to these qubits. Hybrid quantum-classical samplers, which minimize some parts of the objective function using classical heuristics and some by using the QPU, enable the further abstraction of problem representation.
Ocean supports various quadratic models:
Binary Quadratic Models are unconstrained, have binary variables, and are contained by the
dimod.BinaryQuadraticModel
class.Constrained Quadratic Models can be constrained, have real, integer and binary variables, and are contained by the
dimod.ConstrainedQuadraticModel
class.Discrete Quadratic Models are unconstrained, have discrete variables, and are contained by the
dimod.DiscreteQuadraticModel
class.
Ocean also provides support for higher order models, which are typically reduced to quadratic for sampling.