1 of 44

STEP-BY-STEP GUIDE TO NONLINEAR OPTIMIZATION WITH QUANTUM COMPUTERS

JIAQI LENG (UC BERKELEY), YUXIANG PENG (PURDUE)

LEI FAN (UH), XIAODI WU (UMD)

TUT 25 | SESSION 1

1

9/3/2025

TUT 25 | SESSION 1 (1:00 – 2:30 MDT)

2 of 44

SESSION 1 | AGENDA

TUT 25 | SESSION 1

2

9/3/2025

  1. Quantum Hamiltonian Descent (QHD)
    • Derivation & Theory
    • Implementation on Quantum Hardware
  2. Software Library: QHDOPT
  3. Step-by-Step Guide to QHDOPT
    • Example code
    • Applications in energy systems

3 of 44

A SURVEY ON AUDIENCE BACKGROUND IN QC (TBA)

TUT 25 | SESSION 1

3

9/3/2025

4 of 44

INTRODUCTION TO �QUANTUM HAMILTONIAN DESCENT

Presenter: Jiaqi Leng (University of California, Berkeley)

5 of 44

  •  

TUT 25 | SESSION 1

5

9/3/2025

Nonlinear Optimization

 

 

6 of 44

TUT 25 | SESSION 1

6

9/3/2025

Nesterov’s Accelerated GD (NAG)

 

NAG & Hamiltonian Dynamics

7 of 44

TUT 25 | SESSION 1

7

9/3/2025

Nesterov’s Accelerated GD (NAG)

NAG & Hamiltonian Dynamics

 

8 of 44

TUT 25 | SESSION 1

8

9/3/2025

Hamiltonian Mechanics: From Classical to Quantum

 

Classical Hamiltonian Mechanics

Quantum Hamiltonian Mechanics

9 of 44

TUT 25 | SESSION 1

9

9/3/2025

 

Quantum Hamiltonian Descent (QHD)

 

 

Nesterov’s Accelerated GD (NAG)

 

10 of 44

TUT 25 | SESSION 1

10

9/3/2025

 

Quantum Hamiltonian Descent (QHD)

Quantum Hamiltonian Descent, the general form

[arXiv:2303.01471, 2503.15878]

 

Gradient Descent (GD)

 

 

 

(Accelerated) Gradient Flows

QHD

11 of 44

 

TUT 25 | SESSION 1

11

9/3/2025

Physical Interpretations

A Quantum Heavy Ball Method

A quantum “heavy ball” that overcomes local minima before it becomes “classical”

 

 

12 of 44

QHD FOR CONVEX PROBLEMS

TUT 25 | SESSION 1

12

9/3/2025

 

 

13 of 44

LARGE QUANTUM SPEEDUPS (PART 1)

TUT 25 | SESSION 1

13

9/3/2025

 

 

14 of 44

LARGE QUANTUM SPEEDUPS (PART 2)

TUT 25 | SESSION 1

14

9/3/2025

 

 

15 of 44

QHD ON QUANTUM HARDWARE

 

TUT 25 | SESSION 1

15

9/3/2025

16 of 44

QHD ON QUANTUM HARDWARE

TUT 25 | SESSION 1

16

9/3/2025

  • T-gate count: >= 1B (before QEC)
  • Observation: gate-based implementation requires large, fault-tolerant quantum computers that are not ready yet…
  • Can we implement QHD without using gates?

T-Gate Count Estimation of Executing QHD on Universal Quantum Computers (Gate Models)

17 of 44

QHD ON QUANTUM HARDWARE

Analog Quantum Computers

  • Analog quantum computing: using one Hamiltonian to simulate another one.
  • Pros: Easier to fabricate and scale up.
  • Cons: specific-purpose computers, error-prone (no error correction).
  • Available devices: D-Wave (5k+qbts), QuEra (200+qbts), Pasqal (200+qbts), etc.

TUT 25 | SESSION 1

17

9/3/2025

18 of 44

QHD ON ANALOG QUANTUM COMPUTERS

 

TUT 25 | SESSION 1

18

9/3/2025

 

 

19 of 44

TUT 25 | SESSION 1

19

9/3/2025

Finite difference

Kinetic Operator

 

Tri-diagonal

 

 

Potential Operator

Diagonal

 

 

 

 

HAMILTONIAN EMBEDDING OF QHD

20 of 44

QHDOPT: �A SOFTWARE FOR QUANTUM OPTIMIZATION

Presenter: Yuxiang Peng (Purdue University)

21 of 44

STATE OF QUANTUM4OPTIMIZATION

TUT 25 | SESSION 1

21

9/3/2025

Combinatorial

problems

Continuous

problems

Long-term (digital)

Near-term (analog)

Grover’s search [1996]

Quantum annealing [1998]

Quantum approximate optimization algorithm (QAOA) [2014]

Quantum interior point methods [2023]

Quantum SDP solvers [2019]

Quantum central path method [2023]

Quantum Hamiltonian descent [2023]:

22 of 44

EMPIRICAL QHD FOR YOU!

  • What are required for you to leverage QHD in real use cases?

TUT 25 | SESSION 1

22

9/3/2025

None of these is easy!

(Even for quantum experts!)

4. Familiar with quantum devices and their analysis

1. Understand quantum mechanics

2. Know the design of QHD for specific instances

3. Know quantum programming

23 of 44

TUT 25 | SESSION 1

23

9/3/2025

You

Problem instance

QHDOPT

Python interface

Various quantum devices

Minimum

QHD is for Everyone!

A Quantum Software for

Nonlinear Optimization

24 of 44

  •  

TUT 25 | SESSION 1

24

9/3/2025

univariate

bivariate

 

 

What Can QHDOPT Solve?

25 of 44

TUT 25 | SESSION 1

25

9/3/2025

SymPy Interface

QP Interface

QHDOPT: User Interface

26 of 44

TUT 25 | SESSION 1

26

9/3/2025

Through a new paradigm of quantum computing

Implementation of QHDOPT

Input Format

SymPy / QP

QHDOPT Interface

QHDOPT Post-Processor

Optimal

Solution

 

 

 

Analog Compilation

Hamiltonian-Oriented Quantum Computing

Algorithm Design

 

Time

Quantum Hamiltonian Descent [LHLW, 23]

An algorithm mimicking quantum particles in potential wells

D-Wave

 

IonQ

SimuQ

SimuQ

[PYLW, 24]

A framework for programming and compiling quantum simulation

Hamiltonian-oriented

algorithm design

Hamiltonian-oriented

software support

27 of 44

TUT 25 | SESSION 1

27

9/3/2025

 

QHD evolution

Kinetic

Potential

 

obj. func.

BUT

Most quantum devices are spatially discrete

Spatial discretization of QHD evolution

 

 

 

Implementation of QHDOPT

28 of 44

  •  

TUT 25 | SESSION 1

28

9/3/2025

Most quantum devices have local interactions and controls

BUT, again

Hamiltonian Embedding

[LLPW, 24]

 

 

Example:

unary encoding

 

Implementation of QHDOPT

29 of 44

  •  

TUT 25 | SESSION 1

29

9/3/2025

Quantum platforms have

different programming interfaces

 

SimuQ [PYLW, 24]

 

 

On D-Wave, IonQ, and QuTiP (classical simulator)

Programmed in SimuQ’s Hamiltonian Modeling Language

Compiled by SimuQ’s compiler

Provider’s compilation to machine instructions

SimuQ Compilation

30 of 44

TUT 25 | SESSION 1

30

9/3/2025

NLOPT problem

Continuous-space

Hamiltonian Evo.

Discrete-space Hamiltonian Evo.

2-local Hamiltonian Evo.

Quantum device

QHD

Spatial discretization

Hamiltonian embedding

Analog compilation

NLOPT

refined solution

Discrete-space measurement res.

Quantum device measurement res.

Ham. Emb.

Decoding

Classical

Refinement

Ipopt

SciPy

TNC

 

Classical solvers with quantum warm-start

QHDOPT Post-Processing (Refinement)

31 of 44

TUT 25 | SESSION 1

31

9/3/2025

Time-to-solution (s)

 

Beats Ipopt on low-dim complicated bivariate problems

 

 

How Does QHDOPT Perform?

32 of 44

TUT 25 | SESSION 1

32

9/3/2025

Beats Ipopt, BARON on 50-dim QP-like problems

Wall-clock time

QHDOPT on D-Wave devices

Ipopt, BARON on a laptop

Timeout limit: 20min

Time-to-solution (s)

f0

f1

f2

f3

f4

f5

f6

f7

f8

f9

Function

0.001

0.002

0.01

0.02

0.1

0.2

1

2

10

20

100

BARON

IPOPT

QHDOPT

Solver

Timeout

Timeout

Timeout

Timeout

Timeout

50-dim non-convex

quadratic programming

 

Beats Ipopt,

matches BARON

on 50-dim QP problems

 

Current capability

How Does QHDOPT Scale?

33 of 44

QHDOPT for Nonconvex QP

33

NP-hard with indefinite Q

(For implementation details, see our paper arXiv:2303.01471 Appendix F)

  • 75-dimensional nonconvex QP problems: 600 digital qubits, ~5000 physical qubits on D-Wave (due to limited qubit connectivity)
  • DW-QHD is better than the rest, including DW-QAA, and classical GD, interior points, and some local search heuristic.

Time-to-Solution (TTS)

The lower, the better!!

 

34 of 44

Q & A

TUT 25 | SESSION 1

34

9/3/2025

Input Format

SymPy / QP

QHDOPT Interface

QHDOPT Post-Processor

Optimal

Solution

 

 

 

Analog Compilation

Hamiltonian-Oriented Quantum Computing

Algorithm Design

 

Time

Quantum Hamiltonian Descent [LHLW, 23]

An algorithm mimicking quantum particles in potential wells

D-Wave

 

IonQ

SimuQ

SimuQ

[PYLW, 24]

A framework for programming and compiling quantum simulation

Hamiltonian-oriented

algorithm design

Hamiltonian-oriented

software support

A Quantum Software for

Nonlinear Optimization

35 of 44

USE QHDOPT: A STEP-BY-STEP GUIDE�

Presenter: Lei Fan (University of Houston)

36 of 44

QHD EXAMPLE

TUT 25 | SESSION 1

36

9/3/2025

Modeling with SymPy or QP format

Form a Hamiltonian function

Spatial Discretization

Hamiltonian embedding

Deploy on a quantum machine

Post-Processing

Target Problem

Preprocessing:

Raw Output

37 of 44

QHD EXAMPLE

TUT 25 | SESSION 1

37

9/3/2025

Step 1: Modeling with SymPy or QP format

Step 2: Select the solver of QHD

Step 3: Obtain and post-process output

38 of 44

PENALTY METHOD + IPOPT

TUT 25 | SESSION 1

38

9/3/2025

 

 

 

 

Add slack variables

  • Reformulate the problem into a box-constrained problem.
  • Design the penalty factors.
  • Use QHD to solve the box-constrained problem
  • Use IPOPT to refine the solution

39 of 44

APPLICATION IN ENERGY SYSTEMS

TUT 25 | SESSION 1

39

9/3/2025

Electricity to Hydrogen Production System

Mingze Li, Siyuan Wang, Lei Fan, Zhu Han, “Integrated Quantum Hamiltonian Descent with Interior Point Method for Optimal Schedule of Hybrid Electricity-to-Hydrogen System” IEEE KEPC 2025.

40 of 44

APPLICATION IN ENERGY SYSTEMS

TUT 25 | SESSION 1

40

9/3/2025

Hydrogen Production Efficiency Curve

41 of 44

APPLICATION IN ENERGY SYSTEMS

TUT 25 | SESSION 1

41

9/3/2025

Simulation Results

Case

Variables

Constraints

Optimal Objective Value

Computational Time

Pure-IPOPT ($)

IPOPT 1k �Samples ($)

QHD ($)

QHD+IPOPT ($)

IPOPT 1k time (ms)

QHD+IPOPT (ms)

1

9

6

-4.63

345.64

107.68

345.64

26,393

45.032

2

12

8

-5.33

465.37

139

465.37

28,322

47.324

3

15

10

-5.53

587.76

156.62

587.76

30,892

44.406

4

18

12

-6.87

713.31

185.33

609.46

32,382

48.596

  • Pure-IPOPT: solve the problem with a single random initial point.
  • IPOPT 1k: solve the problem with 1k random initial point.
  • QHD: QHD solver
  • QHD-IPOPT: QHD generate initial points for IPOPT
  • Good initial points produced by QHDOPT, when the instance size is manageable by quantum machine.
  • As the instance size increases, the current quantum machine cannot provide a good solution due to the size of the quantum machine.

42 of 44

WHAT KIND OF APPLICATIONS CAN YOU ENVISION?

TUT 25 | SESSION 1

42

9/3/2025

Energy Systems

Healthcare

ML Efficiency

Quantitative Finance

More???

43 of 44

REFERENCES

TUT 25 | SESSION 2

43

9/3/2025

  1. Jiaqi Leng, Ethan Hickman, Joseph Li, and Xiaodi Wu. “Quantum Hamiltonian Descent”, arXiv:2303.01471 (2023).
  2. Jiaqi Leng, Yufan Zheng, Zhiyuan Jia, Lei Fan, Chaoyue Zhao, Yuxiang Peng, and Xiaodi Wu. “Quantum Hamiltonian Descent for Non-smooth Optimization”, under review.
  3. Samuel Kushnir, Jiaqi Leng, Yuxiang Peng , and Lei Fan, Xiaodi Wu. “QHDOPT: A software for nonlinear optimization with quantum Hamiltonian decent”,  INFORMS Journal on Computing, 2024
  4. Jiaqi Leng, Yufan Zheng, and Xiaodi Wu. “A Quantum-Classical Performance Separation in Nonconvex Optimization”, arXiv:2311.00811 (2023).
  5. Mingze Li, Siyuan Wang, Lei Fan, Zhu Han, “Integrated Quantum Hamiltonian Descent with Interior Point Method for Optimal Schedule of Hybrid Electricity-to-Hydrogen System”, IEEE KEPC 2025.
  6. Li, Mingze, Lei Fan, and Zhu Han. "Quantum Hamiltonian Descent based Augmented Lagrangian Method for Constrained Nonconvex Nonlinear Optimization." IEEE QCE 2025

44 of 44

THANKS FOR YOUR ATTENTION!

TUT 25 | SESSION 2

44

9/3/2025