Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Divi

Generate, parallelize, and execute quantum programs at scale.

PyPI Python Docs License Code style: black Checked with pyrefly


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.

📦 Installation

pip install qoro-divi

That covers local and cloud execution, VQE, QAOA, and program ensembles. Heavier features live behind optional extras — pennylane (PennyLane circuits, operators, and molecules), aer (Qiskit Aer backends), qubo-decompose (partitioned QUBO solving), chem (PySCF/OpenFermion chemistry), ai, and jupyter — or pip install "qoro-divi[all]" for everything. See the installation guide for what each unlocks and what keeps working without it.

Nightly Builds

To install the latest development build (published daily from main):

pip install qoro-divi --pre

Learning Divi

For the shortest introduction, start with the five-minute tutorial. Algorithm guides, execution guides, and the API reference live at divi.readthedocs.io; hands-on examples are in the tutorials/ folder.

⚡ At-Scale Example

Split a graph into quantum-sized MaxCut problems, solve the partitions, and stitch their candidates into a global solution:

import networkx as nx

from divi.backends import MaestroSimulator
from divi.qprog import BeamSearchStrategy
from divi.qprog.optimizers import ScipyOptimizer, ScipyMethod
from divi.qprog.problems import GraphPartitioningConfig, MaxCutProblem
from divi.qprog.workflows import PartitioningProgramEnsemble

graph = nx.barbell_graph(4, 0)
problem = MaxCutProblem(
    graph,
    config=GraphPartitioningConfig(
        max_n_nodes_per_cluster=4,
        partitioning_algorithm="kernighan_lin",
    ),
)

backend = MaestroSimulator()
ensemble = PartitioningProgramEnsemble(
    problem=problem,
    n_layers=1,
    backend=backend,
    optimizer=ScipyOptimizer(method=ScipyMethod.COBYLA),
    max_iterations=10,
    seed=42,
)

ensemble.run()
cut, _ = ensemble.aggregate_results(
    strategy=BeamSearchStrategy(beam_width=3, n_partition_candidates=5)
)
print(f"Cut edges: {nx.cut_size(graph, cut)}")
print(f"Circuits executed: {ensemble.total_circuit_count}")

PartitioningProgramEnsemble handles decomposition, parallel execution, and candidate aggregation while each partition remains small enough for the chosen backend.

🌐 Cloud Execution with Qoro Service

Run the same workflow on Qoro's cloud platform by swapping only the backend:

from divi.backends import QoroService

backend = QoroService()  # reads QORO_API_KEY from .env or environment

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.

🤖 divi-ai: AI Coding Assistant

Ask questions about Divi directly in your terminal — no API keys, no internet required after setup.

pip install qoro-divi[ai]
divi-ai

Answers 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.

🧩 Key Features

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, over one round or many adaptive ones
Flexible Backends MaestroSimulator for local simulation, QiskitSimulator for Qiskit-native noise models (extra: aer), 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

Contributing

Contributions are welcome! See CONTRIBUTING.md for development setup, testing, and code style guidelines.

📄 License

Apache 2.0 — see LICENSE for details.

Release files for qoro-divi 0.15.0.dev20260911

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qoro-divi 0.15.0.dev20260911
File Size Uploaded
qoro_divi-0.15.0.dev20260911.tar.gz 21.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for qoro-divi 0.15.0.dev20260911
File Interpreter ABI Platform
qoro_divi-0.15.0.dev20260911-py3-none-any.whl Python 3 none any Details

Total release size: 41.1 MB

Release files / qoro_divi-0.15.0.dev20260911.tar.gz

Download URL qoro_divi-0.15.0.dev20260911.tar.gz
Size 21.0 MB
Tags Source
SHA-256 checksum
How to use checksums
34bb8285f70904d89f1fd581821dead7c62f9730fa1b2dfda127ea1faa059e35
BLAKE2b-256 checksum
How to use checksums
7d324e1d780386592b4133fc2470a01d0eb3493f5c046fdcea94b2cecd6339c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / qoro_divi-0.15.0.dev20260911-py3-none-any.whl

Download URL qoro_divi-0.15.0.dev20260911-py3-none-any.whl
Size 20.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3db8c680ec763e90477b48f469a328efbc4850bfc36e76527d2c60f3b02535dc
BLAKE2b-256 checksum
How to use checksums
8c2fac9622faea502b1e58e1e6e8859737b005fb4f144b385a508cc799c1442c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.13.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page