Tools
qcr:2604.56448.1

QHDOPT

Python package for nonconvex nonlinear optimization using Quantum Hamiltonian Descent (QHD), a quantum analogue of gradient descent that can outperform classical methods on nonconvex problems, made accessible to users without quantum-computing expertise. Problems are modeled symbolically with SymPy, compiled via the SimuQ framework, and run on quantum backends such as D-Wave annealers, with automatic result decoding and classical fine-tuning. Built in Python with a built-in Ipopt solver.
Optimization
Uploaded 2 months ago
70
Views
GitHub41
Citing this entry? Use this QCR ID
Uploaded by
QL
QCR Librarian

Overview

PhysOpt/QHDOPT
4110
README.md

QHDOPT

Unitary Fund
Python CI codecov Docs
QHDOPT (QHD-based OPTimizer) is a software package for nonlinear optimization.

QHDOPT implements a quantum optimization algorithm named Quantum Hamiltonian Descent (QHD) on available quantum computers (such as the D-Wave systems). QHD is a quantum-upgraded version of gradient descent (GD). Unlike the classical GD, QHD demonstrates a significant advantage in solving nonconvex and nonlinear optimization problems.

QHDOPT Workflow

Why QHDOPT?

QHDOPT is for everyone!

QHDOPT aims to eliminate the technical barrier of using QHD for the broader operations research (OR) community. We do not assume users to have prior knowledge of quantum computing, while we allow expert users to specify advanced solver parameters for customized experience. Our target users include:

  • Professionals pursuing an off-the-shelf nonconvex optimization solver to tackle problems in operations research (e.g., power systems, supply chains, manufacturing, health care, etc.),
  • Researchers who hope to advance the theory and algorithms of optimization via quantum technologies,
  • Experts in quantum computation who want to experiment with hyperparameters and/or encodings in QHD to achieve even better practical performance.
Fast compilation empowered by SimuQ

QHDOPT has a built-in compiler powered by SimuQ, a framework for programming and compiling quantum Hamiltonian systems.

Automatic post-processing

QHDOPT automatically post-processes the results returned by the quantum machines. The post-processing includes decoding the raw measurement results and improving their precision (i.e., fine-tuning) via a classical local solver. Users may disable the fine-tuning if needed.

Installation

QHDOPT has a dependency on Ipopt. You may install Ipopt in your conda environment by

conda install -c conda-forge cyipopt==1.3.0

To install QHDOPT, you can directly install with pip by

pip install qhdopt

If you prefer to install from sources, clone this repo and install by

git clone https://github.com/jiaqileng/QHDOPT.git
cd QHDOPT/
pip install ".[all]"

Usage

Two example notebooks for a jump start are examples/1_quadratic_programming.ipynb and examples/2_nonlinear_programming.ipynb. The following illustrates the basic building blocks of QHDOPT and their functionalities briefly.

Import QHDOPT by running

from qhdopt import QHD

You can create a problem instance by directly constructing the function via SymPy.

from sympy import symbols, exp

x, y = symbols("x y")
f = y**1.5 - exp(4*x) * (y-0.75)
model = QHD.SymPy(f, [x, y], bounds=(0,1))

Then you need to setup the solver and the backend device (D-Wave in this example).

model.dwave_setup(resolution=8, api_key="API_key")

Here resolution represents the resolution of the QHD algorithm, and api_key represents the API key of the D-Wave account obtained at D-Wave Leap.

Now you can solve the target problem.

minimum = model.optimize()

The minimal value of found by QHDOPT is then stored in minimum. To print more details in the process, you can run model.optimize(verbose=1).

Contact

Jiaqi Leng jiaqil@terpmail.umd.edu

Yuxiang Peng pickspeng@gmail.com

Contributors

Samuel Kushnir, Jiaqi Leng, Yuxiang Peng, Lei Fan, Xiaodi Wu

Citation

If you use QHDOPT in your work, please cite our paper

@misc{kushnir2024qhdopt,
  author    = {Kushnir, Sam and Leng, Jiaqi and Peng, Yuxiang and Fan, Lei and Wu, Xiaodi},
  publisher = {{INFORMS Journal on Computing}},
  title     = {{QHDOPT}: A Software for Nonlinear Optimization with {Q}uantum {H}amiltonian {D}escent},
  year      = {2024},
  doi       = {10.1287/ijoc.2024.0587.cd},
  url       = {https://github.com/INFORMSJoC/2024.0587},
  note      = {Available for download at https://github.com/INFORMSJoC/2024.0587},
}

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!

Indexed by QCR Librarian

This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.

Publication

doi:10.48550/arxiv.2409.03121
QHDOPT: A Software for Nonlinear Optimization with Quantum Hamiltonian Descent

Samuel Kushnir, Jiaqi Leng, Yuxiang Peng, Lei Fan, Xiaodi Wu

Versions

v1 Latest
Apr 14, 2026
qcr:2604.56448.1

Cite all versions? Use the base QCR ID to always reference the latest version of this entry.

You may also like2