Skip to content

Results are limited to QUBO Solver v0.9.1

Product news
You are reading QUBO Solver v0.9.1, an older version of this documentation. Go to the latest version (v0.10.0)

Getting started

from __future__ import annotations
from qubosolver import (
Instance,
Solver,
analysis,
matrix,
)
# Define QUBO
Q = matrix.tensor(
[
[-0.2, 0.0, 1.0],
[0.0, -1.0, 1.5],
[1.0, 1.5, -0.1],
]
)
instance = Instance(Q)
# Solve it!
solver = Solver(instance)
solution = solver.solve()
print(analysis.to_dataframe([solution]))