from qiskit.optimization import QuadraticProgram
from docplex.mp.advmodel import AdvModel
from docplex.mp.model_reader import ModelReader

from qiskit.optimization.algorithms import MinimumEigenOptimizer

from dwave.plugins.qiskit import DWaveMinimumEigensolver
from dwave.system import DWaveCliqueSampler, LeapHybridSampler

import numpy as np

model = ModelReader.read(filename='QPLIB_DATA/QPLIB_3834.lp',model_name = "Test_QPLIB_Small", model_class=AdvModel)

qp = QuadraticProgram()
qp.from_docplex(model)

dwave_solver_hybrid = DWaveMinimumEigensolver(sampler =  LeapHybridSampler())
optimizer = MinimumEigenOptimizer(dwave_solver_hybrid)

result = optimizer.solve(qp) # Problem ID : 46e887a7-d787-4307-8443-c6d7c6b454a4

result