Skip to main content

Differentiable QP solver in JAX.

Project description

qpax logo

Differentiable, batched, single-precision quadratic programming in JAX

FeaturesInstallationDocumentation

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


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.0.tar.gz (29.6 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.0-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qpax-0.1.0.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

Hashes for qpax-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fcf17cd29b7cfcbba03c8f7df9b27da99cfa5edb7b0a55af9d8d5ddf5510c256
MD5 35370c2cfaa053c5e7a8ac63acbb295e
BLAKE2b-256 6bb94764ba956e433ba6766edd19502dc568eb6942474e0255b5f144f6149554

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qpax-0.1.0-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

Hashes for qpax-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a78b099266bf0074ddba6bcd77ad37a65b458520bc378a8ccc5d3c96e58bbed0
MD5 8054f983b0e3113e49029b6531da5aec
BLAKE2b-256 d8701fa25e0cf39c2981ee37ccbe96162d508405ca44885bb6dc8a681f8a7d74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page