Write it once.Run it on quantum or classical computers.
Describe an optimization problem as constraints, and run it on anything from your laptop to a quantum computer.
- pip install "xquad[quip]"
- installedxquad · xqcp · xqsa · xqffi
- python portfolio.py
- compiledencoder · verifier · decoder
- model64 variables · ising
- quotedmax 1.002 QUIP · before it runs
- submittedjob #4126 · on the Quip Network
- solvedenergy −217 · 1.8 s
- verifiedvalid · attested
Illustrative session.
Every machine needs its own program
Quantum annealers, gate-based quantum computers, and classical solvers each take a different kind of program, so a problem written for one has to be rewritten for the next. The Quip Virtual Machine (QVM) lets you write the problem once and converts it for each machine.
How a job gets solved
You know the most a job can cost before it runs, and the operator running it only gets paid once the answer checks out.
You write the problem as constraints: which assets to pick, how many to hold, and which combinations carry risk. You don't specify qubits, gates, or the machine that will run it.
The QVM compiles it into three programs of quantum or classical instructions. The encoder builds the model, the verifier checks an answer, and the decoder reads one back out.
Every job is priced in gas, set by how many qubits it needs, how long it runs, and how much entanglement it uses. A job costs a baseline plus an optional tip, and you know the maximum before it runs.
The job runs on quantum computers connected to the Quip Network.
The network cross-checks each answer against a classical simulation, classical providers benchmark it independently, and a cryptographic attestation ties it to the hardware that produced it. Then the operator gets paid, and your decoder turns the answer into a portfolio.
Where every choice multiplies the answers
Every stop, shift, asset, or player you add multiplies the possible answers, so no computer can check them all. Quantum computers are built for exactly this kind of optimization, and the QVM lets you run your problem on any of them without rewriting it.
Planning the shortest delivery routes
Visit every stop once, in the least total distance.
Scheduling staff and machines
Cover every shift and job at the lowest cost, around availability, skills, and hours.
Building and rebalancing portfolios
Pick the mix of assets with the best return for the risk you'll take.
Picking the best fantasy sports lineup
Fill every position for the most points, within your budget.
You'll find runnable code for more example problems on GitHub.
A complete program in one Python file
You don't write any quantum code. You describe the problem in Python, and to run it on a quantum computer instead of your laptop, you only change which solver it uses.
from xquad.cp import Domain, Problem, Typesfrom xquad.vm import VMfrom xquad.sa import SolverDWaveCPUfrom xquad.sa.quip import SolverQuip problem = Problem("portfolio")num_assets = problem.input("num_assets", type=Types.Int)problem.define_model(size=num_assets, domain=Domain.BINARY)# ... returns, risk, and how many assets to hold ...programs = problem.compile() # encoder, verifier, decoder vm = VM()vm.set_calldata(inputs) # your returns, risk, and budgetvm.set_output_slots(1)vm.run(programs.encoder)model = vm.outputs()[0] # the compiled model result = SolverDWaveCPU().solve(model) # your CPU, no networkresult = SolverQuip.for_network("aglais").solve(model) # the Quip Networkprint(result.sample, result.energy)
What's live, and what's next
Common questions
In spirit, it's modeled on the Ethereum Virtual Machine, with one instruction set every program targets, a gas-based cost model, and programs deployed to the network as smart contracts. The EVM runs general computation, while the QVM compiles optimization problems for quantum and classical hardware.
It's a program compiled with XQuad and deployed to the Quip Network. Anyone can request it, it runs on connected quantum computers, and classical machines benchmark and validate the result. On mainnet, a developer who publishes a program will earn each time it runs.
Each job is priced in gas, set by how many qubits it needs, how long it runs, and how much entanglement it uses. You pay a baseline plus an optional tip, see the maximum before it runs, and never face a spend floor or a vendor-specific bill. The Aglais testnet gives new users free compute credits, and on mainnet, jobs will be priced in QUIP.
The network cross-checks every result against a classical simulation, classical providers benchmark it independently, and a cryptographic attestation ties it to the hardware that produced it. The network settles disputes against those recorded benchmarks, so an operator's own word never decides whether its result counts.
No. You write constraints, the compiler produces the instructions, and the solver handles the machine.
D-Wave Advantage, CPU simulated annealing, NVIDIA CUDA, Apple Metal, and the Quip Network testnet. IonQ and IBM Quantum are planned next, and they're expected to run the same programs.
Python 3.13 or newer. Prebuilt wheels cover Linux; on macOS and Windows, pip builds from source, so you also need a Rust toolchain, version 1.85 or newer. GPU, D-Wave, and network support are install extras, and D-Wave needs a Leap account.