Multiple Embedding Runs output Different optimal solutions
Hi I am using the below command lines to generate optimal solutions for a fixed problem instance. I set the chain_strength to be very large relatively. Somehow for each run of the program, the lowest energy level solutions are not the same with each other. Sometimes it has only A solution as the lowest. Sometimes it has only B solution as the lowest. Sometimes it has both A and B as the lowest.
embeddings = sapiFindEmbedding(J_oh, A, 'verbose', 1);
[h0, j0, jc] = sapiEmbedProblem(H_oh, J_oh, embeddings, A);
answer = sapiSolveIsing(solver, h0, j0 + jc * chain_strength,'num_reads',10);
ans_oh = sapiUnembedAnswer(answer.solutions, embeddings, 'minimize_energy', H_oh, J_oh);
Could anyone kindly advise on the situation? Could it be a problem that the physical chain between the logical qubits breaks as the chain strength is not strong enough? I notice that if I set the chain_strength to be very large, then the energy level from each solution will be the same and large.
Ideally if the embedding is good, multiple embedding runs will produce the same solution(range) as the lowest energy. Is that correct?
Thanks a million in advance
Comments
Jie,
Try increasing the num_reads. This will increase the likelihood that the lower energy level solutions will be included in a given run.
The key to working with the results of quantum annealing run is to remember that it is a probabilistic process. Just as rolling a pair of dice 10 times over and over again will give a different set of results for each group of 10 rolls, the quantum annealing process will too.
Even though with a correct problem formulation and embedding, a lower energy solution is more likely from a specific run, it is not guaranteed. So even if you have a pair of dice where the probability of rolling a one on a single die is higher, it is still possible to have a run where you roll a pair of dice 10 or even 100 times without getting both dice coming up ones.
I hope this helps. Moving from the deterministic world of classical computing to the probabilistic world of quantum computing is difficult, but the real power of quantum computing comes from this probabilistic aspect of it.
Ed
There is another issue that has been haunting over me... No matter how I adjust the chain_strength (large 100000000 or small 100, the J and H coefficients are just single digit integers), for some problem instances, the energy levels for all the returned solutions are the same. I wonder what has gone wrong.
Hello,
As has been mentioned, increasing num_reads can lead to finding more and better solutions.
A better embedding will produce better results.
Running the same problem multiple times with the same embedding will increase the chances of getting more low energy results in the distribution, given that the energy landscape of the problem is arranged in this way.
Running the embed function on each run will change the embedding to be random on each run, which can serve to remove some of the bias inherent in each qubit and coupler, which also can allow for more low energy results to show up in the results.
Since embedding comes with a time cost, as it is run locally on a classical computer, there are definitely advantages to reusing the same embedding.
The h and J values are actually able to be any number, just like the chain strength.
Before the problem is run on the QPU, the problem is auto-scaled to fit within the acceptable energy range for the qubits and couplers.
This is something to keep in mind when choosing a chain strength.
Since we need to work within these energy ranges, choosing a very large chain strength will scale down the overall problem. Therefore, the individual h and J biases will also be scaled down.
Here is a link to the documentation about scaling:
https://docs.dwavesys.com/docs/latest/c_gs_5.html#problem-scaling
In short, a large chain strength can just wash out the effects of other biases in the problem.
In addition, the chain strength that you mentioned as weak, 100, is actually quite large still.
A good way to start choosing chain strength is to start with the order of magnitude of the largest bias and then iterate from there.
I hope this helps!
Please sign in to leave a comment.