dwavesystems / dwavesystems/dwave-system

How to sample 5000 variables with EmbeddingComposite.sample_qubo()?

Open
#369 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
98
Forks
67
Avg merge
7m
Merged PRs (30d)
1

Description

https://github.com/dwavesystems/dwave-system/blob/32e9065cddeb123106b43d947877043c1a2ccc78/dwave/system/composites/embedding.py#L47

This code produces a correct solution. It is basically a very simple **Max-Cut Problem** of 256 vertices with a known solution.

```
num_vars = 256

graph_list = list()
for i in range(num_vars-1):
graph_list.append((i, i+1))

G = networkx.Graph()
G.add_edges_from(graph_list)

Q = defaultdict(int)
for i, j in G.edges:
Q[(i,i)]+= -1
Q[(j,j)]+= -1
Q[(i,j)]+= 2

sampler = EmbeddingComposite(DWaveSampler() )
response = sampler.sample_qubo(Q, chain_strength=4, num_reads=10000)
```

Unfortunately, however, as soon as more vertices, say, `num_vars = 1024`, are used, the program will never produce the theoretically correct result, which is supposed to have `num_vars - 1` cut edges, and `num_vars/2` vertices in each set.

Could you please help me reach the goal of as many vertices as possible, say, 5000? After all, it is claimed that D-Wave hardware is capable of handling more than 5000 variables.

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.