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 ParallelSimulator
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=ParallelSimulator(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 ParallelSimulator 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: ParallelSimulator, 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.8.0.dev20260306.tar.gz (144.5 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.8.0.dev20260306-py3-none-any.whl (183.3 kB view details)

Uploaded Python 3

File details

Details for the file qoro_divi-0.8.0.dev20260306.tar.gz.

File metadata

  • Download URL: qoro_divi-0.8.0.dev20260306.tar.gz
  • Upload date:
  • Size: 144.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.14 Linux/6.14.0-1017-azure

File hashes

Hashes for qoro_divi-0.8.0.dev20260306.tar.gz
Algorithm Hash digest
SHA256 e41069664f39e40f3c8b5400ae0a909bc3fe925bcb15ea801970ae3c66ee834a
MD5 a4f242656462f700e61be896c1e918ca
BLAKE2b-256 d98eec3b3e0baa1cf83a8e1eede060ec56b7b20f0afd8a3f0b9e6c8dcad9b239

See more details on using hashes here.

File details

Details for the file qoro_divi-0.8.0.dev20260306-py3-none-any.whl.

File metadata

  • Download URL: qoro_divi-0.8.0.dev20260306-py3-none-any.whl
  • Upload date:
  • Size: 183.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.14 Linux/6.14.0-1017-azure

File hashes

Hashes for qoro_divi-0.8.0.dev20260306-py3-none-any.whl
Algorithm Hash digest
SHA256 99a226219224707782aeac90929fa15691108897430ba4e6c4f8b9b0c387e358
MD5 492cabe5ae139c19dc61ea2a927476e8
BLAKE2b-256 7a1937260c8a7b6237675dce087de605bda1b85c08d86c09c04c2739ac7f360f

See more details on using hashes here.

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