D-Wave#
QLauncher is compatible with D-wave backends and many d-wave based algorithms.
Let’s start by defining a problem to be solved, we will use Exact Cover in this tutorial.
from qlauncher.problems import EC
pr = EC.from_preset("default")
pr.visualize()

D-wave Solver#
D-wave solver is an algorithm dedicated to work on d-wave computers, let’s initialize it:
from qlauncher.routines.dwave import DwaveSolver
alg = DwaveSolver()
QLauncher features local backends such as SimulatedAnnealingBackend, based on the simulated annealing heuristic algorithm and TabuBackend, based on the Tabu search algorithm. There is also DwaveBackend that connects to a real D-wave computer. Let’s try the simulated annealing backend:
from qlauncher.routines.dwave import SimulatedAnnealingBackend
backend = SimulatedAnnealingBackend()
Now we can use QLauncher to launch D-wave solver on the selected backend:
from qlauncher.launcher import QLauncher
launcher = QLauncher(pr, alg, backend)
result = launcher.run()
result
Result(bitstring=100101, energy=-9.5)
The results correspond to the following matching, since the solver is non-deterministic the result might be suboptimal:
pr.visualize(result.best_bitstring)
