.. _cqm_sdk: ============================ Constrained Quadratic Models ============================ The constrained quadratic model (CQM) are problems of the form: .. math:: \begin{align} \text{Minimize an objective:} & \\ & \sum_{i} a_i x_i + \sum_{i \le j} b_{ij} x_i x_j + c, \\ \text{Subject to constraints:} & \\ & \sum_i a_i^{(m)} x_i + \sum_{i \le j} b_{ij}^{(m)} x_i x_j+ c^{(m)} \circ 0, \quad m=1, \dots, M, \end{align} where :math:`\{ x_i\}_{i=1, \dots, N}` can be binary\ [#]_, integer, or continuous\ [#]_ variables, :math:`a_{i}, b_{ij}, c` are real values, :math:`\circ \in \{ \ge, \le, = \}` and :math:`M` is the total number of constraints. .. [#] For binary variables, the range of the quadratic-term summation is :math:`i < j` because :math:`x^2 = x` for binary values :math:`\{0, 1\}` and :math:`s^2 = 1` for spin values :math:`\{-1, 1\}`. .. [#] Real-valued variables are currently not supported in quadratic interactions. The :class:`dimod.ConstrainedQuadraticModel` class can contain this model and its methods provide convenient utilities for working with representations of a problem.