QuipNetwork /xquad

A hardware-agnostic SDK for optimization problems: define a problem once, then lower it to any quantum or classical solver

★ 5,584⑂ 17👁 6⑃ 0● 2▤ 15
PythonAGPL-3.0Created 2026-04-02developers.quip.network/docs/xquad/
More from this author
Download: v0.5.2v0.5.2 ↓0.5.22026-11-09
+0
Daily
5,584
stars
17
forks
6
watchers
0
prs
2
issues
15
releases

README

XQuad

 Early public release. The instruction set, binary format, and public API
 may still change before v1.0. Production use is not recommended yet.

XQuad is a hardware-agnostic toolchain for expressing and running quadratic
optimization problems (QUBO / Ising / integer) across quantum annealers and
classical solvers. It ships as two Rust crates plus four Python distributions
built around a single virtual-machine specification.

Think of it as LLVM for quadratic models -- a common intermediate
representation that lets you write a problem once and retarget it to any
supported backend.

- Spec-first. Every behaviour is nailed down in spec/xqvm/SPEC.md
  and the VM is mechanically held to it: every committed conformance vector
  runs xqvm in CI against the outcome the spec prescribes, and a mismatch
  fails the build.
- Embeddable. The Rust core supports no_std + alloc, so the same VM
  runs inside WASM runtimes, Substrate pallets, and native binaries.
- Interactive. The Python umbrella (xquad) is REPL and Jupyter-friendly:
  load a program once, run it with different calldata, inspect outputs by
  slot. Low-level FFI lives in xqffi; user-facing Program / Session /
  RunResult live in xquad.program.

 Install

 Python (from PyPI)

Install XQuad into a project environment first: a virtual environment, or a uv project.

sh
python -m venv .venv && source .venv/bin/activate
pip install xquad
 or, in a uv project:
uv add xquad


For the xquad command alone, outside any project, install it as a uv tool, with the quip extra for the xquad quip commands:

sh
uv tool install xquad             the xquad command
uv tool install 'xquad[quip]'     with the xquad quip commands


On macOS, a user install (pip install --user, or pip falling back to one) puts the xquad command in ~/Library/Python/3.x/bin, which is not on PATH; python -m xquad runs the same command without it.

The xquad package is the umbrella: the full pipeline and the xquad command. To pick individual pieces instead, install xqffi, xqcp and xqsa (FFI bindings, DSL, solvers). Prebuilt wheels are available for Linux x86_64 and aarch64 (CPython = 3.13). On macOS and Windows, pip builds the xqffi Rust extension from source -- this requires a Rust toolchain (= 1.85).

 GPU/QPU support

The base install includes CPU simulated annealing only. To use GPU or quantum hardware solvers, install the corresponding extra:

| Solver | Install | Prerequisite |
|--------|---------|-------------|
| NVIDIA CUDA GPU (cuda) | pip install 'xquad[cuda]' | CUDA 12.x driver + NVIDIA GPU |
| Apple Metal GPU (metal) | pip install 'xquad[metal]' | Apple Silicon Mac with a Metal device |
| D-Wave Advantage QPU (dwave) | pip install 'xquad[dwave]' | D-Wave Leap account + API token |
| Quip Network solver (quip) | pip install 'xquad[quip]' | QUIP_RPC_URL + a configured signer |

Extras are composable: pip install 'xquad[cuda,dwave]'. See xqsa/README.md for driver prerequisites and per-solver quick-starts.

For a guided walkthr

Top issues

Latest release

v0.5.2 v0.5.2 2026-11-09
SolverQuip now survives a dropped connection to a Quip TestNet node. A node or proxy can close an idle websocket after a couple of minutes, and before this release the next chain read failed with a raw transport error. Reads now reconnect, check that the node still serves the same chain, and try again once.

 Behaviour changes

- Chain reads that hit a dropped connection reconnect and retry once. If the retry fails, they raise QuipConnectionError, as the receipt methods document, instead of a raw JSONDecodeError, WebSocketException or OSError.
- A connection lost while submitting raises QuipSu

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON