Lagrange multiplier


I am currently working on a problem and trying to understand what values work for the Lagrange parameters.

Therefore I implemented the problem as a BQM and as a CQM.

While the BQM has a Lagrange multiplier as a mandatory parameter, the CQM does not.

Therefore, I was wondering how the Lagrange multiplier is calculated and if it is possible to display it?

How does the CQM know which Lagrange parameters work to enforce the penalties just enough to get good and feasible solutions?

I thought that this question cannot be answered in general. Most of the time, I read that you should choose the Lagrange parameter to balance between enforcing the penalty and finding good and feasible solutions.

I would be very grateful for some insights into this.

Best Regards,




1 comment
  • Hi Lukas,

    The CQM solver is constraint aware, but the way that it enforces feasibility is proprietary. It is possible that CQM solver returns a sampleset of both feasible and infeasible solutions. 


    A sample from the returned sampleset is considered a feasible solution, only if all the constraints are satisfied.  Depending on the use case (application), you may filter out the infeasible samples. 

    feasible_sampleset = sampleset.filter(lambda d: d.is_feasible)

    I hope this helps. Please let us know if you have any further questions.


    Best Regards,


    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post