I'm currently trying to work on a minimization problem using D-Wave hybrid and quantum machines.

The problem is, shortly, an energy optimization for a network of switches and servers, linked as a binary tree, with the servers as leaves. The tree is tested with various depth, but the problems I'll list below show as soon as a depth of 2 or 3.

Being new on the SDK (and in Quantum Computing in general) I'm having some difficulties on the resolution of it, 2 things in particular:

  • Apparently the problem is too large to be computed by the full quantum machine, so I've been directed towards a decomposer, which should decompose the problem in a way it becomes solvable. I've trying to read the docs but the examples are a bit vague and when i try to apply them to other problems besides the ones showed in the examples I get no real solutions. Moreover I don't understand if it takes a second phase after the decomposition and solution where I should compose the problem with the composer
  • I've formulated the problem as a CQM, then converted it with the apposite function cqm_to_bqm() to a BQM. From what I've understood from D-Wave videos and tutorials, the BQM should take less time than the CQM, instead it takes 40-50 times more and returns a way worse energy solution. Is there some hidden problem in converting from CQM to BQM or maybe is it still linked to the previous problem with too much variables to be computed efficiently?

I'm sorry if these could be silly questions, but I'm really new to this whole world, and it's not easy to learn.


1 Answer 1


First of all, it is possible that your problem has really too many variables (you did not specify the number). I also exprimented with D-Wave and found out that problmes with more than 100 binary variables can be infeasible on purely quantum annealer. This is not caused by small number of qubits but poor connectivity among them. As a result, the problem has to be embedded to structure of qubits in D-Wave quantum processor using ancilla qubits. For large problems, this task can take very long time (actually, the emedding problem is solved classically and as far as I know, it is in NP!). Instead, I rather used hybrid solver which combines QPU with classical solvers. In this case, I was able to solve problems with almost 400 binary variables quickly and succesfully (according to D-Wave, it would be possible to solve problems with thousands or even million variables but I did not try).

Concerning conversion from continuous problem to binary one, you probably face the same issue as with embedding binary problem to structure of D-Wave QPU. All real variables in the probles have to be binarized. Number of binary variables depends on accuracy you require. From problem having tens of variables, you can easily come to binary one withou hundreds or even thousands binary variables. And then you have to again embed the problem to QPU.

Here you can find my codes I used in my project with D-Wave. The project involved portfolio optimization which is continuous quadratic problem. Hence, I had to binarize it (I came up with my own approach, see the codes). In the codes, you can also see how to call different types of solvers (quantum, classical and hybrid ones). I hope this codes would be helpful, at least as a study material. To be honest, D-Wave documentation and tutorials are not very user-friendly.

And here is my paper where results and issues with solving QUBO on IBM and D-Wave quantum computers are discussed.

  • 1
    $\begingroup$ Thank you for your answer! The number of variables is (4 + l)/2 * n^2 + n Where l is the number of leaves and n is the number of nodes. I'll surely read your paper and look at your code, hopefully it'll help me solve my problems and learn something about this world. Thank you very much! $\endgroup$ Aug 2, 2023 at 13:01

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.