Skip to content

Results are limited to QUBO Solver v0.7.2

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

Tabu Search

Classical solver using Tabu Search. Designed to integrate with the solver factory.

class TabuSearchSolver(BaseClassicalSolver):
def solve(self) -> QUBOSolution

This solver applies a Tabu Search metaheuristic to escape local minima and explore the solution space. It is suitable for solving QUBO instances classically without relying on quantum hardware. The implementation is based on TabuSearchSolver from the Ocean SDK, and returns solutions compatible with the QUBOSolution interface used across the qubo-solver package.

Field Type Description
use_quantum bool Have to be False to uses a classical solver.
classical_solver_type str Set to "tabu_search" to use Tabu Search as the solving method.
tabu_x0 torch.Tensor | None The initial binary solution tensor.
tabu_tenure int Number of iterations a move (bit flip) remains tabu.
tabu_max_no_improve int Maximum number of consecutive iterations without improvement before termination.
from qubosolver import QUBOInstance
from qubosolver.solver import QuboSolver
from qubosolver.config import SolverConfig, ClassicalConfig
qubo = QUBOInstance(coefficients=[[-2.0, 1.0], [1.0, -2.0]])
config = SolverConfig(use_quantum = False, classical=ClassicalConfig(classical_solver_type="tabu_search"))
solver = QuboSolver(qubo, config)
solution = solver.solve()
print(solution)
QUBOSolution(bitstrings=tensor([[1, 0]], dtype=torch.int32), costs=tensor([-2.]), counts=tensor([1]), probabilities=tensor([1.]), solution_status=)
Notes
Recommended for classical heuristics when reproducibility and control over local search dynamics are desired.
var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))
{"annotate": null, "base": "../../../..", "features": ["content.code.annotate", "content.action.view", "content.action.edit", "navigation.tabs", "navigation.indexes", "navigation.sections", "content.code.copy"], "search": "../../../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"provider": "mike"}}