Skip to main content

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:

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qpax-0.1.4.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qpax-0.1.4-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file qpax-0.1.4.tar.gz.

File metadata

  • Download URL: qpax-0.1.4.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for qpax-0.1.4.tar.gz
Algorithm Hash digest
SHA256 04aadede71f7da2d470c8fb4cad6cbac55a31d3329c40224470ea2657e49513e
MD5 95d09a6728cc94d8f41a31e5844f2779
BLAKE2b-256 7818a43d9cc313e436c5a4c5140f98a4475c5f0c1c2b6233322a14b52dae0851

See more details on using hashes here.

File details

Details for the file qpax-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: qpax-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 36.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for qpax-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c1aa581feeb1307a1551e3548bd228c4bb96a415971798f59235782548f30c04
MD5 32de739c6406fdcb74d2c8ebf201d258
BLAKE2b-256 67f43a08221e621a9791b3162f9127af6d28c7e9f81658f5fedb9b1109dcfe0b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

1 file

0.0.7

1 file

0.0.6

1 file

0.0.4

1 file

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