Skip to main content

qpax logo

Differentiable, batched, single-precision quadratic programming in JAX

PyPI version Python versions Build status Documentation arXiv License

Features • Installation • Documentation • Paper

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.

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}
}

Metadata

Release files for qpax 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qpax 0.1.4
File Size Uploaded Provenance
qpax-0.1.4.tar.gz 36.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for qpax 0.1.4
File Interpreter ABI Platform
qpax-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 72.6 kB

Release files / qpax-0.1.4.tar.gz

Download URL qpax-0.1.4.tar.gz
Size 36.0 kB
Tags Source
SHA-256 checksum
How to use checksums
04aadede71f7da2d470c8fb4cad6cbac55a31d3329c40224470ea2657e49513e
BLAKE2b-256 checksum
How to use checksums
7818a43d9cc313e436c5a4c5140f98a4475c5f0c1c2b6233322a14b52dae0851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / qpax-0.1.4-py3-none-any.whl

Download URL qpax-0.1.4-py3-none-any.whl
Size 36.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1aa581feeb1307a1551e3548bd228c4bb96a415971798f59235782548f30c04
BLAKE2b-256 checksum
How to use checksums
67f43a08221e621a9791b3162f9127af6d28c7e9f81658f5fedb9b1109dcfe0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for qpax 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page