↗

QpiAI Opt user manual

Start with installation and the modelling workflow, then use the chapter for the problem class returned by classify(model). The API references define signatures, parameters, return types, and errors.

Part I: Getting started

  1. Install, build a first model, and solve it
  2. Choose a problem class and modelling workflow
  3. Choose local, platform, or local-first execution
  4. Read solve result

The first complete workflow is:

python
import os

from qpiai_opt.opt_modeller import Binary, Model
from qpiai_opt.opt_solvers import Client, classify, solve

client = Client(api_key=os.environ["QPIAI_OPT_API_KEY"])

x, y = Binary("x"), Binary("y")
model = Model("first_model")
model.maximize(5 * x + 3 * y)
model.add_constraint(x + y <= 1, label="choose_one")

problem_class = classify(model)  # "MILP"
result = solve(model, client=client)  # authenticated local execution; no paid work
objective = result.objective  # 5.0
assignment = result.solution  # {"x": 1.0, "y": 0.0}

Part II: Modelling

Shared modelling language

Problem-class chapters

The modeller supports continuous QP with linear constraints and polynomial binary/spin objectives. It does not support MIQP, QCQP, general nonlinear programming, SDP, or conic models.

Part III: Solving

Common solving flow

Solver-specific chapters

Local QUBO, HUBO, and Ising use their native representations. HUBO is not converted to MILP or QUBO for either platform or local solving.

Part IV: Interoperability and automation

Part V: Reference and project operation