Skip to content

Results are limited to the current section: Application solving tools

Product news

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]))