30-Second Quickstart
Install from PyPI
Section titled βInstall from PyPIβQubo Solver can be installed from PyPI (external) with your favorite pyproject-compatible Python manager.
Using pip, for example:
pip install qubo-solverYour first βοΈQuantumβοΈ solve
Section titled βYour first βοΈQuantumβοΈ solveβfrom qubosolver import Instance, Solver, matrix, analysis
# Define an Instance from a symmetric matrixQ = matrix.tensor( [ [-0.2, 0.0, 1.0], [0.0, -1.0, 1.5], [1.0, 1.5, -0.1], ])instance = Instance(Q)
# Instantiate the quantum solver (default)solver = Solver(instance)solution = solver.solve()
print(analysis.to_dataframe([solution])) labels bitstrings costs counts probs0 0 110 -1.2 988 0.9881 0 001 -0.1 12 0.012The solver returns a Solution instance holding the candidate bitstrings and their QUBO costs. As the quantum solver samples the solution space, it also reports each bitstring's count (how many times it was measured) and probability.
