Comments

3 comments
  • Just an update, I read about the "D-Wave Hybrid" and seems that D-Wave recommends using it because is better than qbsolv, right?

    So, how to send a numpy.ndarray QUBO matrix (like the previous CVS) to dwave-hybrid? I found one example with a Dictionary {(x,y): value} (e.g.: Q1 = {(0,0):1,(1,1):1,(0,1):1} ), is this right?  This format is very different from the QUBO file that requires nCouplers and nNodes.

    I tried ``` bqm = dimod.BinaryQuadraticModel({}, qubo, 0, 'BINARY') ``` but I got this error: "ValueError: no self-loops allowed, therefore (0, 0) is not an allowed interaction"

    0
    Comment actions Permalink
  • Hi John,

    We have a convenience function for doing just this!

    Here is an example of the function call to use:
    bqm = dimod.BinaryQuadraticModel.from_numpy_matrix(array)

    I hope this was helpful!

    3
    Comment actions Permalink
  • Thank you, worked. ;)

    1
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post