0

I'm having some trouble when trying to use the LeapHybridCQMSampler in the connection with cloud.dwavesys.com. This is the error log:

SSLError: HTTPSConnectionPool(host='cloud.dwavesys.com', port=443): Max retries exceeded with url: /metadata/v1/regions/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))

I tried using the permissive_ssl parameter, but it doesn't make any difference. I also tried running it in several devices and couldn't solve it either.

Here is the code I'm using, where I just build a simple CQM and send it to the sampler:

import dwave.system 
from dimod import Integer, ConstrainedQuadraticModel

x = [Integer(f'x_{i}') for i in range(4)]

cqm = ConstrainedQuadraticModel()

H_Objective = -5*x[0] - x[1] + x[2] - x[3]

cqm.set_objective(H_Objective)

cqm.add_constraint(20 - 10*x[0] - x[1] - x[2] - x[3] >=0)

sampler = dwave.system.LeapHybridCQMSampler() 
sampleset = sampler.sample_cqm(cqm, num_reads=5000)
GuzmanCG
  • 1
  • 2

0 Answers0