Comments

4 comments
  • Hello Masato,

    The qbsolv tool uses a tabu solver by default unless you specify a D-Wave QPU solver in the argument. The qbsolv.sample documentation lists which parameters you can choose.

    Here is some example code showing how you can use a D-Wave Sampler with qbsolv:

    from dwave_qbsolv import QBSolv
    from dwave.system.samplers import DWaveSampler
    from dwave.system.composites import EmbeddingComposite
    import itertools
    import random

    # Make a small QUBO
    Q1 = {(0,0):1,(1,1):1,(0,1):1}

    # Make a large QUBO
    qubo_size = 200
    Q2 = {t: random.uniform(-1, 1) for t in itertools.product(range(qubo_size), repeat=2)}

    # Set up a composite QPU sampler
    sampler = EmbeddingComposite(DWaveSampler())

    # Solve the small QUBO
    response1 = QBSolv().sample_qubo(Q1,solver=sampler)

    # Solve the large QUBO
    response2 = QBSolv().sample_qubo(Q2,solver=sampler)

    Note that qbsolv will only use the D-Wave QPU if the QUBO is large enough. In the above example, Q1 is small, so it will not require the QPU to solve. Q2 is large, so qbsolv uses the QPU to solve it.

    We also recently released D-Wave Hybrid, which is a more powerful tool suite for solving large QUBOs with decomposition. I recommend using this if you are interested in hybrid applications.

    3
    Comment actions Permalink
  • Hi Masato,

    As Luca has mentioned, although you are welcome to use QBSolv, we have a tool called D-Wave Hybrid that we would recommend using instead.

    One major difference is that QBSolv does not process sub-problems asynchronously, which causes some noticeable slowdown. 

    After QBSolv breaks the problem into pieces and sends the pieces to the QPU to be processed, it waits for the response for each piece before continuing with the next one.

    D-Wave Hybrid has solved this problem by sending all of the parts of the problem to the QPU asynchronously, so they are made available much sooner.

    D-Wave Hybrid is very easy to install:

    https://docs.ocean.dwavesys.com/projects/hybrid/en/latest/installation.html

    Here is the reference documentation for using D-Wave Hybrid:

    https://docs.ocean.dwavesys.com/projects/hybrid/en/latest/

    3
    Comment actions Permalink
  • Thank your very useful informations!

    I didn't know D-Wave Hybrid.

    I have a large QUBO file. I want to solve it with D-wave.

    So, I think it useful for me.

     

    I'll try to use it soon.

    Thank you so much!

    1
    Comment actions Permalink
  • Hi Masato,

    Yesterday we launched Leap 2 and I am happy to tell you that it is now much easier to solve problems that are larger than the QPU.  Please try using our new hybrid solver, which you will see on your Leap Dashboard as hybrid_v1. It accepts problems of up to 10,000 variables fully connected!

    Submit the problem through Ocean as you would any other problem to the D-Wave system, but specify the new LeapHybridSampler in your Python program:

    from dwave.system import LeapHybridSampler

    Take a look at our Knapsack example in Github, which is designed to demonstrate the usage of the hybrid solver.

    Let us know how it goes, 

    Fiona

    1
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post