Tabu Search
TabuSearchSolver
Section titled “TabuSearchSolver”Classical solver using Tabu Search. Designed to integrate with the solver factory.
Signature
Section titled “Signature”class TabuSearchSolver(BaseClassicalSolver): def solve(self) -> QUBOSolution
Description
Section titled “Description”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.
Fields
Section titled “Fields”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 QUBOInstancefrom qubosolver.solver import QuboSolverfrom 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)
Recommended for classical heuristics when reproducibility and control over local search dynamics are desired.