hamover is a continuous-time quantum search library based on Hamiltonian evolution.
[Note: Under Development]
Use one API for all flows:
HamoverSearch(...).setup(...).solve()Requirements:
- Python
3.10+
Install in editable mode:
pip install -e .Optional extras:
pip install -e ".[simulation]" # QuTiP simulation backend
pip install -e ".[classiq]" # Classiq backend
pip install -e ".[hardware]" # SimuQ + D-Wave stack [Underdevelopment]
pip install -e ".[all]" # everythingNote: (schedule ="gap_power", p = 2.0) is the sweet spot for fixed-point behaviour and quadratic speedup
from hamover import HamoverSearch
result = (
HamoverSearch(N=1024, target=42)
.setup(
approach="adiabatic",
backend="none",
epsilon=0.5,
)
.solve()
)
print("found:", result.target_found)
print("probability:", result.probability)
print("runtime:", result.runtime)
print("diagnostics keys:", list(result.diagnostics.keys()))Approaches:
farhi_gutmannadiabaticnonadiabaticmonotoniccustom_su2
Backends:
none(theory-only solver)qutipsim_annealingclassiqionqquera
Run tests:
pytest -qRun notebooks:
hamoverSearch.ipynbcomparison.ipynb
-
ModuleNotFoundErrorfor optional backend packages: install the matching extra, e.g.pip install -e ".[classiq]"orpip install -e ".[simulation]". -
HamoverSearchimport issues after pulling new changes: rerunpip install -e .in the repo root. -
Notebook behavior looks stale or inconsistent: restart the kernel, then run cells top-to-bottom once.
-
Grover notebook path fails for non-power-of-two problem size: use
N = 2^n(for example4,8,16,32). -
Backend not available in your environment: start with
backend="none"to validate the model first, then switch to your target backend.
- Hamiltonian embedding and hamming encoding for solving optimization problems on quantum hardware
https://arxiv.org/abs/2401.08550 - Continuous-time quantum search and time-dependent two-level quantum systems
https://arxiv.org/abs/1903.11188