-
Book Overview & Buying
-
Table Of Contents
A Practical Guide to Quantum Machine Learning and Quantum Optimization
By :
As we have just seen, the BinaryQuadraticModel class can be used to define both Ising and QUBO problems. But dimod also offers other models and utilities that will make our lives a little bit easier. Let’s start by studying how we can conveniently define problems with linear restrictions.
You surely remember that a problem like
is an instance of binary linear programming. In Section 3.4.1, we studied this family of problems in detail and we showed that they can be transformed into the QUBO and Ising models by using slack variables and penalty terms.
So, imagine that you want to solve the preceding problem in a quantum annealer. Do you need to perform all those boring transformations in order to obtain the QUBO coefficients and then use them to define a BinaryQuadraticModel object? No! Fortunately, dimod provides the ConstrainedQuadraticModel class, which simplifies...