QiHD implements Quantum-Inspired Hamiltonian Descent (QIHD), a quantum-inspired, GPU-enabled solver framework for mixed-integer quadratic programming (MIQP).
QIHD generates candidate solutions through Hamiltonian-descent dynamics and can optionally refine them with a classical local optimizer. The current solver pipeline is:
MIQP / QUBO / BoxQP / LCQP problem -> QIHD backend -> optional refiner -> Response
QiHD is the successor to OpenPhiSolve, originally developed by Artephi Computing. This repository keeps the original BSD 3-Clause license attribution while continuing development under PhysOpt.
The Python package namespace has changed from phisolve to qihd. The primary solver class is now MIQPSolver; the old PhiMIQP name remains available as a compatibility alias.
See MIGRATION.md for details.
MIQP is a classic optimization model characterized by a quadratic objective function defined over a feasible region with both continuous and binary variables:
pip install qihdFor CUDA 12 JAX support:
pip install "qihd[cuda12]"For local development:
git clone https://github.com/PhysOpt/QiHD.git
cd QiHD
pip install -e .import numpy as np
from qihd import MIQP, MIQPSolver, QIHD, PDQP
Q = np.array([[2.0, -1.0], [-1.0, 2.0]])
w = np.array([-1.0, -1.0])
problem = MIQP(Q=Q, w=w, n_binary_vars=2)
backend = QIHD(n_shots=100, n_steps=1000, seed=0)
refiner = PDQP()
solver = MIQPSolver(problem, backend=backend, refiner=refiner)
result = solver.solve()
print(result.minimum())
print(result.minimizer)qihd.problemscontainsMIQP,QUBO,BoxQP, andLCQPproblem classes.QIHDis the quantum-inspired Hamiltonian descent backend.qihd.refinerscontains classical refiners such asPDQP; additional refiners live in the same subpackage.MIQPSolverorchestrates problem compilation, sample generation, refinement, and response construction.Responsestores samples, objective values, timing details, and solution helpers.
Existing code using PhiMIQP can continue to work during the migration window:
from qihd import PhiMIQPThe recommended new import is:
from qihd import MIQPSolverQiHD is derived from OpenPhiSolve. See NOTICE and LICENSE for attribution and license details.
If you use QiHD or Quantum-Inspired Hamiltonian Descent in your work, please cite:
@misc{chaudhary2025quantum,
title = {Quantum-Inspired Hamiltonian Descent for Mixed-Integer Quadratic Programming},
author = {Chaudhary, Shreya and Cheng, Jinglei and Kushnir, Samuel and Leng, Jiaqi and Liu, Pengyu and Peng, Yuxiang and Wang, Hanrui and Wu, Xiaodi},
year = {2025},
howpublished = {Poster presented at the NeurIPS Workshop on GPU-Accelerated and Scalable Optimization},
note = {Workshop poster}
}For questions, issues, and contributions, please use the GitHub issue tracker.