Generate, parallelize, and execute quantum programs at scale.
Divi is a Python library by Qoro Quantum for building and running quantum programs at scale. It handles circuit generation, job parallelization, and cloud execution — with built-in support for variational algorithms, custom workflows, and more — so you can focus on the quantum problem, not the plumbing.
Important
Divi is under active development. Expect breaking changes between minor versions.
Tip
Using Claude Code, Cursor, or another LLM coding agent? Divi is indexed on Context7 — point your agent at /qoroquantum/divi to pull current, version-specific Divi docs and snippets directly into its context.
pip install qoro-diviTo install the latest development build (published daily from main):
pip install qoro-divi --preRun a VQE energy minimization in a few lines:
import numpy as np
import pennylane as qp
from divi.qprog import VQE, HartreeFockAnsatz
from divi.backends import MaestroSimulator
from divi.qprog.optimizers import ScipyOptimizer, ScipyMethod
# Define an H₂ molecule
molecule = qp.qchem.Molecule(
symbols=["H", "H"],
coordinates=np.array([(0, 0, 0), (0, 0, 0.5)]),
)
vqe = VQE(
molecule=molecule,
ansatz=HartreeFockAnsatz(),
n_layers=2,
backend=MaestroSimulator(shots=5000),
optimizer=ScipyOptimizer(method=ScipyMethod.COBYLA),
seed=42,
)
vqe.run()
print(f"Ground state energy: {vqe.best_loss:.6f}")Hamiltonians and circuits accept either Qiskit (SparsePauliOp,
QuantumCircuit) or PennyLane (QuantumScript, operators) inputs
interchangeably.
Run the same programs on Qoro's cloud platform with tensor-network simulators — no code changes needed:
from divi.backends import QoroService
service = QoroService() # reads QORO_API_KEY from .env or environment
vqe = VQE(molecule=molecule, backend=service)
vqe.run()Get started for free → Sign up at dash.qoroquantum.net and receive $100 worth of credits to run your first quantum programs on our cloud.
Ask questions about Divi directly in your terminal — no API keys, no internet required after setup.
pip install qoro-divi[ai]
divi-aiAnswers questions about Divi APIs, generates code examples, and explains concepts — powered by a local LLM that runs entirely on your machine. See the full documentation for model options and usage.
| Feature | Description |
|---|---|
| VQE & QAOA | Built-in variational algorithms with pluggable ansätze and optimizers |
| Circuit Pipelines | Expand → execute → reduce pattern for complex circuit workflows |
| Program Ensembles | Parallel execution of multiple quantum programs with automatic scheduling |
| Flexible Backends | MaestroSimulator for fast local dev, QiskitSimulator for noisy simulation, QoroService for cloud execution |
| Execution Config | Control bond dimension, simulator type, and simulation method per job |
| Live Reporting | Real-time dashboards and convergence tracking via callbacks |
divi/
├── qprog/ # Quantum programs: VQE, QAOA, base classes, optimizers
├── backends/ # Execution backends: MaestroSimulator, QiskitSimulator, QoroService
├── circuits/ # MetaCircuit templates and Circuit instances
├── pipeline/ # Circuit pipeline stages (expand, execute, reduce)
├── hamiltonians # Molecular Hamiltonian generation
├── reporting/ # Live reporting and visualization callbacks
└── ai/ # Offline documentation chatbot (divi-ai)
Full documentation, user guides, and API reference: divi.readthedocs.io
Hands-on examples are in the tutorials/ folder.
Contributions are welcome! See CONTRIBUTING.md for development setup, testing, and code style guidelines.
Apache 2.0 — see LICENSE for details.