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
- Install, build a first model, and solve it
- Choose a problem class and modelling workflow
- Choose local, platform, or local-first execution
- Read solve result
The first complete workflow is:
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
- Variables, expressions, indexed variables, parameters, and updates
- Piecewise-linear interpolation with SOS2
- Model summary, validation, transformation inspection, and decoding
- Modeller limits and capacity
- Canonical model IR and process boundaries
Problem-class chapters
- LP and MILP modeller
- Continuous convex QP modeller
- QUBO modeller and exact constraint penalties
- Native HUBO modeller
- Native Ising modeller
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
- Classification, local algorithms, limits, options, and routing
- Problem-class results and common solve information
- Platform client, jobs, resources, and account objects
Solver-specific chapters
- LP/MILP platform solver
- QUBO platform solver
- HUBO platform solver
- Ising solving
- Continuous QP local solving
- Gate-based optimization
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
- Standard files, dictionaries, QUBO/Ising conversions, and OMMX
- Canonical JSON IR
- Automation workflows