Skip to main content

A Python library to automate generating, parallelizing, and executing quantum programs.

Project description

Divi

Generate, parallelize, and execute quantum programs at scale.

PyPI Python Docs License Code style: black


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 qml
from divi.qprog import VQE, HartreeFockAnsatz
from divi.backends import QiskitSimulator
from divi.qprog.optimizers import ScipyOptimizer, ScipyMethod

# Define an H₂ molecule
molecule = qml.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=QiskitSimulator(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.

🧩 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 Batching Automatic Pauli grouping, circuit packing, and parallel execution
Dual Backends Local QiskitSimulator for dev, QoroService for cloud production
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: 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

📚 Documentation

Full documentation, user guides, and API reference: docs.qoroquantum.net/divi

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

qoro_divi-0.10.0.dev20260329.tar.gz (187.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qoro_divi-0.10.0.dev20260329-py3-none-any.whl (234.5 kB view details)

Uploaded Python 3

File details

Details for the file qoro_divi-0.10.0.dev20260329.tar.gz.

File metadata

  • Download URL: qoro_divi-0.10.0.dev20260329.tar.gz
  • Upload date:
  • Size: 187.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qoro_divi-0.10.0.dev20260329.tar.gz
Algorithm Hash digest
SHA256 d2f9ae4317612d7fe94ad09ff8ea149d00180d7437cb286ff32edefe4ae7ffaf
MD5 fc883075611ed7c6945924afa350dd8f
BLAKE2b-256 28421dd3c68f232e67a2575a509fd0851101685d315f509d5ce10f9029353d89

See more details on using hashes here.

Provenance

The following attestation bundles were made for qoro_divi-0.10.0.dev20260329.tar.gz:

Publisher: nightly.yml on QoroQuantum/divi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qoro_divi-0.10.0.dev20260329-py3-none-any.whl.

File metadata

File hashes

Hashes for qoro_divi-0.10.0.dev20260329-py3-none-any.whl
Algorithm Hash digest
SHA256 bd0d1b778799ed8f6999a4bd2d5db1d73f78522c4bd7fefe87548c7758a44c3b
MD5 7918db37cbbf50ade27c34a1136a3088
BLAKE2b-256 2eb5c0512180ed8c01f15a76f41306a729e6ec41102c00e604624f4923a9665c

See more details on using hashes here.

Provenance

The following attestation bundles were made for qoro_divi-0.10.0.dev20260329-py3-none-any.whl:

Publisher: nightly.yml on QoroQuantum/divi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page