Metadata-Version: 2.4
Name: qoro-divi
Version: 0.11.0.dev20260409
Summary: A Python library to automate generating, parallelizing, and executing quantum programs.
Project-URL: Homepage, https://qoroquantum.net
Project-URL: Documentation, https://divi.readthedocs.io
Project-URL: Repository, https://github.com/QoroQuantum/divi
Project-URL: Issue Tracker, https://github.com/QoroQuantum/divi/issues
Project-URL: Changelog, https://github.com/QoroQuantum/divi/blob/main/CHANGELOG.md
Author-email: Ahmed Darwish <ahmed@qoroquantum.de>, Stephen DiAdamo <stephen@qoroquantum.de>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: optimization,qaoa,qiskit,quantum,quantum-computing,simulation,vqe
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: <3.13,>=3.11
Requires-Dist: basis-set-exchange<0.12,>=0.11
Requires-Dist: cirq-core<2.0,>=1.6
Requires-Dist: dill<0.5,>=0.4
Requires-Dist: dwave-hybrid<0.7.0,>=0.6.14
Requires-Dist: matplotlib<4.0,>=3.10
Requires-Dist: mitiq<2.0,>=1.0
Requires-Dist: networkx<4.0,>=3.5
Requires-Dist: numba<0.65.0,>=0.64.0
Requires-Dist: numpy
Requires-Dist: pennylane-qiskit<0.44,>=0.43
Requires-Dist: pennylane<0.44,>=0.43
Requires-Dist: ply<4.0,>=3.11
Requires-Dist: pydantic<3.0,>=2.10
Requires-Dist: pymetis<2026.0.0,>=2025.1.1; sys_platform != 'win32'
Requires-Dist: pymoo<0.7,>=0.6
Requires-Dist: python-dotenv<2.0,>=1.1.1
Requires-Dist: qiskit-aer
Requires-Dist: qiskit-ibm-runtime<0.42,>=0.41
Requires-Dist: qiskit<2.4,>=2.1
Requires-Dist: qoro-maestro==0.2.6
Requires-Dist: requests<3.0,>=2.32
Requires-Dist: rich<15.0,>=14.0
Requires-Dist: scikit-learn<2.0,>=1.7
Requires-Dist: scipy<2.0,>=1.16
Requires-Dist: stim<2.0,>=1.15.0
Requires-Dist: stimcirq<2.0,>=1.15.0
Requires-Dist: sympy<2.0,>=1.14
Provides-Extra: ai
Requires-Dist: docutils>=0.18; extra == 'ai'
Requires-Dist: faiss-cpu<2.0.0,>=1.13.2; extra == 'ai'
Requires-Dist: fastembed<0.9.0,>=0.8.0; extra == 'ai'
Requires-Dist: huggingface-hub>=1.0; extra == 'ai'
Requires-Dist: llama-cpp-python<0.4.0,>=0.3.16; extra == 'ai'
Requires-Dist: platformdirs<5.0,>=4.0; extra == 'ai'
Requires-Dist: psutil<8.0,>=7.0; extra == 'ai'
Requires-Dist: pyperclip<2.0.0,>=1.11.0; extra == 'ai'
Requires-Dist: textual<9.0.0,>=8.1.1; extra == 'ai'
Provides-Extra: jupyter
Requires-Dist: ipykernel<8.0.0,>=7.1.0; extra == 'jupyter'
Requires-Dist: ipywidgets<9.0.0,>=8.1.7; extra == 'jupyter'
Description-Content-Type: text/markdown

<p align="center">
  <h1 align="center">Divi</h1>
  <p align="center">
    <em>Generate, parallelize, and execute quantum programs at scale.</em>
  </p>
</p>

<p align="center">
  <a href="https://pypi.org/project/qoro-divi/"><img src="https://img.shields.io/pypi/v/qoro-divi?color=blue" alt="PyPI"></a>
  <a href="https://pypi.org/project/qoro-divi/"><img src="https://img.shields.io/pypi/pyversions/qoro-divi" alt="Python"></a>
  <a href="https://divi.readthedocs.io"><img src="https://img.shields.io/badge/docs-readthedocs-blue" alt="Docs"></a>
  <a href="LICENSES/Apache-2.0.txt"><img src="https://img.shields.io/badge/license-Apache%202.0-green" alt="License"></a>
  <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000" alt="Code style: black"></a>
</p>

---

**Divi** is a Python library by [Qoro Quantum](https://qoroquantum.net) 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

```bash
pip install qoro-divi
```

### Nightly Builds

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

```bash
pip install qoro-divi --pre
```

Run a VQE energy minimization in a few lines:

```python
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:

```python
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](https://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.

```bash
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](https://divi.readthedocs.io/tools/divi_ai.html) 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 |
| **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
└── ai/           # Offline documentation chatbot (divi-ai)
```

## 📚 Documentation

Full documentation, user guides, and API reference: **[divi.readthedocs.io](https://divi.readthedocs.io)**

Hands-on examples are in the [`tutorials/`](tutorials/) folder.

## � Contributing

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

## 📄 License

Apache 2.0 — see [LICENSE](LICENSES/Apache-2.0.txt) for details.
