The quantum-classical hybrid CQM solver was added to the Leap™ hybrid solver service in October 2021. Until this release, you could submit problems formulated as arbitrarily structured constrained quadratic models (CQMs) with binary and integer variables. This release enables these solvers, for example,
hybrid_constrained_quadratic_model_v1, to accept CQMs with real-valued variables (also known as "continuous variables").
Real variables are handled similarly to binary and integer variables:
>>> import dimod
>>> a = dimod.Real("a", upper_bound=5.5)
>>> cqm = dimod.ConstrainedQuadraticModel()
>>> cqm.add_constraint_from_model(a, ">=", 2.25, "Min a")
>>> cqm.constraints["Min a"].to_polystring()
'a >= 2.25'
Currently, quadratic interactions are not supported for such variables.
Leap’s IDE is now updated with an SDK version that supports real-valued variables in CQMs. If you have installed the Ocean SDK locally, upgrade to the latest version to enable formulating problems with variables of type real; see the Ocean documentation for details.