Differentiable QP solver in JAX.
Project description
Differentiable, batched, single-precision quadratic programming in JAX
Features • Installation • Documentation
This package can be used for solving and differentiating (batched) convex quadratic programs of the following form:
$$ \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 $x \in \mathbb{R}^n$, and data matrices $Q \succeq 0$, $q \in \mathbb{R}^n$, $A \in \mathbb{R}^{m \times n}$, $b \in \mathbb{R}^m$, $G \in \mathbb{R}^{p \times n}$ and $h \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.
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{arrizabalaga2026adifferentiable,
title = {A Differentiable Interior-Point Method in Single Precision},
author = {Jon Arrizabalaga, Kevin Tracy, Zachary Manchester},
year = {2026},
eprint = {XXXX},
archivePrefix = {arXiv},
primaryClass = {math.OC}
}
@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}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qpax-0.1.1.tar.gz.
File metadata
- Download URL: qpax-0.1.1.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
658c2ebba51fc2c86f916917fe3f05857704d7eca473880b3aa4f349f68002e5
|
|
| MD5 |
e424ad53a5320fd48f49d34eed44f598
|
|
| BLAKE2b-256 |
d402117ebab1c365c3a65a81244fbdfa5316e1b345f8e6ac7643b1eb4fa5f5e0
|
File details
Details for the file qpax-0.1.1-py3-none-any.whl.
File metadata
- Download URL: qpax-0.1.1-py3-none-any.whl
- Upload date:
- Size: 31.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5d1e24d1df508abf54ccb42ccade28c5711de5398cb246c176d12b3ed5ab06f
|
|
| MD5 |
b842bed50f5df62b9d558111d5d16b06
|
|
| BLAKE2b-256 |
04c30893926a1cfdc3d577bf2586d7d0830448eca247e8d455892e1f9915ff9f
|