Skip to main content

Qdislib - The Quantum Distributed Computing Library

Quantum distributed computing library implemented over PyCOMPSs programming model for HPC.

Documentation Status PyPI version Python version

Table of content:

Description

Qdislib is a Python library designed for scalable quantum circuit execution using circuit cutting techniques. It enables the simulation of large quantum circuits by splitting them into smaller, manageable subcircuits that can be executed independently—either on classical simulators, GPUs, or quantum hardware.

Qdislib is built on top of the PyCOMPSs parallel runtime, allowing seamless distributed execution of quantum workloads across CPUs, GPUs, and QPUs.

With Qdislib, researchers and developers can:

  • Perform gate and wire cutting to decompose complex quantum circuits — including an ancilla-based Hadamard-test gate cut (gate_cutting_hadamard) that cuts any two-qubit gate at optimal overhead with no mid-circuit measurement, and mixed wire + gate cutting on one circuit (gate_wire_cutting).
  • Cut any two-qubit gate (CZ/CX natively; others auto-decomposed to CZ, or use the Hadamard cut).
  • Leverage GPU acceleration using cuQuantum or Qibojit.
  • Submit subcircuits to remote QPUs like IBM Quantum.
  • Work with circuits defined in Qibo, Qiskit, CUDA-Q, and PennyLane.
  • Automatically identify good cut points with find_cut — including hardware-aware selection that cuts the longest-routing gates for a given QPU coupling_map (SparseCut, arXiv:2511.05492).
  • Extract and manipulate subcircuits independently.

Whether you're targeting HPC systems, hybrid quantum-classical setups, or constrained simulators, Qdislib is a flexible and modular tool to bridge the gap between current hardware limitations and large-scale quantum algorithm design.

Explore the sections below to get started with installation, quickstart examples, user guides, API references, and more.

Qdislib has been implemented on top of PyCOMPSs programming model, and it is being developed by the Workflows and Distributed Computing group of the Barcelona Supercomputing Center.

Requirements

  • Python >= 3.10
  • At least one quantum SDK backend — Qibo, Qiskit, or CUDA-Q — installed as an extra (see below)
  • (optional) COMPSs >= 3.3 for distributed execution on HPC; without it, Qdislib runs serially

The core Python dependencies are listed in requirements.txt; the quantum SDK backends are optional extras declared in pyproject.toml.

Installation

Install Qdislib together with at least one backend extra:

pip3 install "qdislib[qibo]"      # or [qiskit], [cudaq], or [all]

Installing the bare package (pip3 install qdislib) pulls only the core dependencies — you need a backend extra to run circuits.

Quickstart

The recommended way to use Qdislib is the three-step circuit-cutting workflow: generate subcircuits, evaluate each one in your own loop, then recombine the results. Evaluating the subcircuits yourself is the whole point — that loop is where you dispatch to a simulator, a GPU, or a real QPU, batch them, or cache results, all while Qdislib handles the cutting and the reconstruction.

import Qdislib as qd
from qibo import models, gates

# A small example circuit (works the same with Qiskit or CUDA-Q circuits).
circuit = models.Circuit(2)
circuit.add(gates.H(0))
circuit.add(gates.CZ(0, 1))
circuit.add(gates.RY(0, 0.8))

# 1. Cut the circuit into independently executable subcircuits.
#    Use find_cut to discover good cut points automatically.
subcircuits = qd.gate_cutting_subcircuits(circuit, ["CZ_2"], software="qibo")

# 2. Evaluate each subcircuit — this loop is yours to control.
values = [qd.expectation_value(s, shots=8192) for s in subcircuits]

# 3. Recombine into the original circuit's expectation value.
result = subcircuits.reconstruct(values)
print(result)  # ≈ -0.717

qd.wire_cutting_subcircuits(circuit, [("H_1", "CZ_2")], software="qibo") works the same way for wire cutting. The software argument ("qibo", "qiskit" or "cudaq") selects the backend the subcircuits are emitted for; it must match the backend you evaluate them on.

If you'd rather not manage the loop, the all-in-one qd.gate_cutting(...) and qd.wire_cutting(...) run the cut, execution and reconstruction in a single call — convenient for quick experiments, but the three-step workflow above is the flexible, production-oriented path.

Availability

Currently, the following supercomputers have already PyCOMPSs and Qdislib installed and ready to use. If you need help configuring your own cluster or supercomputer, drop us an email and we will be pleased to help.

  • Marenostrum 5 - Barcelona Supercomputing Center (BSC)

Citing Qdislib

If you use Qdislib in a scientific publication, we would appreciate citations to the following papers. Please cite the original paper (ACM, SC '25 Workshops) first:

M. Tejedor, B. Casas, J. Conejero, A. Cervera-Lierta and R. M. Badia, "Orchestrating Quantum-HPC Workflows with Distributed Quantum Circuit Cutting," in Proceedings of the SC '25 Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis, ACM, 2025, pp. 1898–1906. https://doi.org/10.1145/3731599.3767547

M. Tejedor, J. Conejero and R. M. Badia, "A Semantic Quantum Circuit Cache for Scalable and Distributed Quantum-Classical Workflows," arXiv:2604.26788, 2026. https://arxiv.org/abs/2604.26788

Bibtex:

@inproceedings{Qdislib,
    title     = {{Orchestrating Quantum-HPC Workflows with Distributed Quantum Circuit Cutting}},
    author    = {Mar Tejedor and Berta Casas and Javier Conejero and Alba Cervera-Lierta and Rosa M. Badia},
    booktitle = {Proceedings of the SC '25 Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis},
    publisher = {ACM},
    pages     = {1898--1906},
    year      = {2025},
    doi       = {10.1145/3731599.3767547},
}

@article{QdislibCache,
    title   = {{A Semantic Quantum Circuit Cache for Scalable and Distributed Quantum-Classical Workflows}},
    author  = {Mar Tejedor and Javier Conejero and Rosa M. Badia},
    journal = {arXiv preprint arXiv:2604.26788},
    year    = {2026},
}

URLs

Quantum Distributed computing libraries BSC

Acknowledgements

The project acknowledges funding from the Spanish Ministry for Digital Transformation and of Civil Service of the Spanish Government through the QUANTUM ENIA project call - Quantum Spain, EU through the Recovery, Transformation and Resilience Plan – NextGenerationEU within the framework of the Digital Spain 2026. It acknowledges funding from Grant RYC2022-037769-I funded by MICIU/AEI/10.13039/501100011033 and by “ESF+”. It also acknowledges funding from projects CEX2021-001148-S, and PID2023-147979NB-C21 from the MCIN/AEI and MICIU/AEI /10.13039/501100011033 and by FEDER, UE, by the Departament de Recerca i Universitats de la Generalitat de Catalunya, research group MPiEDist (2021 SGR 00412).

License

Apache License Version 2.0, see LICENSE

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qdislib-1.0.1.tar.gz (189.9 kB view details)

Uploaded Source

Built Distribution

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

qdislib-1.0.1-py3-none-any.whl (187.5 kB view details)

Uploaded Python 3

File details

Details for the file qdislib-1.0.1.tar.gz.

File metadata

  • Download URL: qdislib-1.0.1.tar.gz
  • Upload date:
  • Size: 189.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for qdislib-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ea386c7f54040bf0491f5f69f40b2afebd411b9e99ea4f1d3261b6a463f82ae7
MD5 6b0945c5b87abba7b30fa93d306d52d0
BLAKE2b-256 4e604f7c0cff6b2531f92053d6a52c26f1d75e55aaf6cd3887bf9b42139798d6

See more details on using hashes here.

File details

Details for the file qdislib-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: qdislib-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 187.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for qdislib-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f88010d999e662081030bd37d71e11f7ea7c47a30e057f71aad0d8159c791c7f
MD5 457638162a93c63e5f211bb88875ec72
BLAKE2b-256 d311801b9f997f53a9b72c45702e4f717e2f7b6aadb78fe619f22f027df63e17

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

0.1.1

2 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