I need to submit a BQM to DWaveSampler. Since my problem has both objective and constraints, my understanding is that I need to add the latter as bqm to a composite BQM, which is then sent to the solver (this can be done via BQM.update(contraint_n), where contraint_n is a dimod.binary.binary_quadratic_model.BinaryQuadraticModel).

My constraints are quite complicated and include many variables, how would you suggest to proceed in order to convert them to BQM? 

Another possibility would be to use Pyqubo and use the .compile()_to_bqm method, but I could not find examples with complicated constraints and/or inequality constraints.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.