README.md

May 19, 2026 · View on GitHub

qpax logo

Differentiable, batched, single-precision quadratic programming in JAX

PyPI version Python versions Build status Documentation arXiv License

FeaturesInstallationDocumentationPaper

This package can be used for solving and differentiating (batched) convex quadratic programs of the following form:

minimizex12xTQx+qTxs.t.Ax=b,Gxh\begin{align*} \underset{x}{\text{minimize}} & \quad \frac{1}{2}x^TQx + q^Tx \\ \text{s.t.} & \quad Ax = b,\\ & \quad Gx \leq h \end{align*}

with decision variables xRnx \in \mathbb{R}^n, and data matrices Q0Q \succeq 0, qRnq \in \mathbb{R}^n, ARm×nA \in \mathbb{R}^{m \times n}, bRmb \in \mathbb{R}^m, GRp×nG \in \mathbb{R}^{p \times n} and hRph \in \mathbb{R}^p.

Features

  • Differentiable: Backpropagate through QPs and obtain smooth informative subgradients, even at active inequality constraints.
  • Single Precision: Runs in f32, allowing for larger batch sizes and higher throughput.
  • Batchable: Solves and differentiates lots of QPs in parallel with shared structure.
  • Infeasibility avoidance: Avoids generating infeasible problems by solving an always-feasible "elastic" QP and providing informative gradients to encourage feasibility.

Installation

To install directly from github using pip:

  • CPU: pip install qpax
  • NVIDIA GPU (cuda 12): pip install "qpax[cuda12]"
  • NVIDIA GPU (cuda 13): pip install "qpax[cuda13]"

For further details, check our documentation.

Examples

Browse the quickstart examples in the documentation, and explore end-to-end applications in the examples repository.

If you are using qpax in an interesting application and would like it featured, please open an issue or pull request in the examples repository.

License

This project is licensed under the Apache License 2.0 — see the LICENSE file for details.

Citing

If you use this solver, please cite our work(s):

@misc{arrizabalaga2026differentiableinteriorpointmethodsingle,
      title={A Differentiable Interior-Point Method in Single Precision}, 
      author={Jon Arrizabalaga and Kevin Tracy and Zachary Manchester},
      year={2026},
      eprint={2605.17913},
      archivePrefix={arXiv},
      primaryClass={math.OC},
      url={https://arxiv.org/abs/2605.17913}, 
}
@misc{tracy2024differentiability,
    title={On the Differentiability of the Primal-Dual Interior-Point Method},
    author={Kevin Tracy and Zachary Manchester},
    year={2024},
    eprint={2406.11749},
    archivePrefix={arXiv},
    primaryClass={math.OC}
}