A Python library to automate generating, parallelizing, and executing quantum programs.
Project description
Divi
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.
⚡ Quick Start
pip install qoro-divi
Nightly Builds
To install the latest development build (published daily from main):
pip install qoro-divi --pre
Run 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}")
🌐 Cloud Execution with Qoro Service
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.
🤖 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 |
| 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 |
🏗️ Architecture
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)
📚 Documentation
Full documentation, user guides, and API reference: divi.readthedocs.io
Hands-on examples are in the tutorials/ folder.
� Contributing
Contributions are welcome! See CONTRIBUTING.md for development setup, testing, and code style guidelines.
📄 License
Apache 2.0 — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qoro_divi-0.12.0.dev20260501.tar.gz.
File metadata
- Download URL: qoro_divi-0.12.0.dev20260501.tar.gz
- Upload date:
- Size: 11.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ed396e6b8f362c740347b144732c50a1d5d10dcd2b93c76ba5b79230fbea077
|
|
| MD5 |
b32db4ad092c5ebacf05df6829e73939
|
|
| BLAKE2b-256 |
a77251f294b5757a9f569e5b2036601cac213dc26a8c45ba5857695c45c3644d
|
Provenance
The following attestation bundles were made for qoro_divi-0.12.0.dev20260501.tar.gz:
Publisher:
nightly.yml on QoroQuantum/divi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qoro_divi-0.12.0.dev20260501.tar.gz -
Subject digest:
7ed396e6b8f362c740347b144732c50a1d5d10dcd2b93c76ba5b79230fbea077 - Sigstore transparency entry: 1415784331
- Sigstore integration time:
-
Permalink:
QoroQuantum/divi@bf1e4689aa331839ccf5de62f8c3324c16603a02 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/QoroQuantum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
nightly.yml@bf1e4689aa331839ccf5de62f8c3324c16603a02 -
Trigger Event:
schedule
-
Statement type:
File details
Details for the file qoro_divi-0.12.0.dev20260501-py3-none-any.whl.
File metadata
- Download URL: qoro_divi-0.12.0.dev20260501-py3-none-any.whl
- Upload date:
- Size: 10.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eccf53350fbd1fbfedcea29233cafc93b8ec63a6131f8f06ee33ea176c6e5597
|
|
| MD5 |
3a9ca55f09fb86f25f831b9ab9755042
|
|
| BLAKE2b-256 |
1d00a79368b8557c88fd369bcb886e4fdcea09c243ee07a11d92f384ff51ef56
|
Provenance
The following attestation bundles were made for qoro_divi-0.12.0.dev20260501-py3-none-any.whl:
Publisher:
nightly.yml on QoroQuantum/divi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qoro_divi-0.12.0.dev20260501-py3-none-any.whl -
Subject digest:
eccf53350fbd1fbfedcea29233cafc93b8ec63a6131f8f06ee33ea176c6e5597 - Sigstore transparency entry: 1415784657
- Sigstore integration time:
-
Permalink:
QoroQuantum/divi@bf1e4689aa331839ccf5de62f8c3324c16603a02 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/QoroQuantum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
nightly.yml@bf1e4689aa331839ccf5de62f8c3324c16603a02 -
Trigger Event:
schedule
-
Statement type: