Skip to main content

Hybrid Dependency Hypergraphs for quantum computation: translation, visualization, and partitioning.

Project description

HDH Logo

Hybrid Dependency Hypergraphs for Quantum Computation

PyPI version · MIT Licensed · Unitary Foundation · Author: Maria Gragera Garces

Work in Progress - Preparing for 1.0

Documentation

Documentation can be found at: https://grageragarces.github.io/HDH/


What is HDH?

HDH (Hybrid Dependency Hypergraph) is an intermediate directed hypergraph-based representation designed to encode the dependecies arising in any quantum workload. It provides a unified structure that makes it easier to:

  • Translate quantum programs (e.g., a circuit or a mbqc pattern) into a unified hypergraph format
  • Analyze and visualize the logical and temporal dependencies within a computation
  • Partition workloads across devices, taking into account hardware and network constraints

Current Capabilities

  • Qiskit, Braket, Cirq and Pennylane circuit mappings to HDHs
  • OpenQASM 2.0 file parsing
  • Model-specific abstractions for:
    • Quantum Circuits
    • Measurement-Based Quantum Computing (MBQC)
    • Quantum Walks
    • Quantum Cellular Automata (QCA)
  • Capability to partition HDHs and evaluate partitions

Includes test examples for:

  • Circuit translation (test_convert_from_qiskit.py)
  • QASM import (test_convert_from_qasm.py)
  • MBQC (mbqc_test.py)
  • Quantum Walks (qw_test.py)
  • Quantum Cellular Automata (qca_test.py)
  • Protocol demos (teleportation_protocol_logo.py)

Installation

pip install hdh

Quickstart

From Qiskit

from qiskit import QuantumCircuit
from hdh.converters import from_qiskit
from hdh.visualize import plot_hdh

qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)

hdh = from_qiskit(qc)

plot_hdh(hdh)

From QASM file

from hdh.converters import from_qasm
from hdh.visualize import plot_hdh

qasm_path = os.path.join(os.path.dirname(__file__), 'test_qasm_file.qasm')
hdh = from_qasm('file', qasm_path)

plot_hdh(hdh)

Tests and Demos

All tests are under tests/ and can be run with:

pytest

If you're interested in the HDH of a specific model, see in manual_tests:

  • mbqc_test.py for MBQC circuits
  • qca_test.py for Cellular Automata
  • qw_test.py for Quantum Walks
  • teleportation_protocol_logo.py for a protocol-specific demo

Contributing

Pull requests welcome. Please open an issue or get in touch if you're interested in:

  • SDK compatibility
  • Frontend tools (visualization, benchmarking)

or if you've found a bug!


Citation

More formal citation and paper preprint coming soon. Stay tuned for updates.

Project details


Download files

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

Source Distribution

hdh-0.1.7.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

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

hdh-0.1.7-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file hdh-0.1.7.tar.gz.

File metadata

  • Download URL: hdh-0.1.7.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hdh-0.1.7.tar.gz
Algorithm Hash digest
SHA256 b78bbe4cc57fc42ae65017de6f3dc03f353ecadc66dac0f1f73384bec35a2c94
MD5 b17a2df828a202dc63df81dd88bfece9
BLAKE2b-256 63cd9fc740ff78f3845afc6d33fb1c5c93207e091fc1519548cb824b4eb9f7d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for hdh-0.1.7.tar.gz:

Publisher: publish.yml on grageragarces/HDH

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

File details

Details for the file hdh-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: hdh-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hdh-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6d1e2dec4044683e5cbecd44015e4b39439842212dc20fc6279b4a257ed7386f
MD5 b372fe44d4c9f7b3bdc742ea04ec106a
BLAKE2b-256 70dafb3482f525c4cae5c5ab3aabd7fd5c8918c9b652ab3099560b9a13b72f8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hdh-0.1.7-py3-none-any.whl:

Publisher: publish.yml on grageragarces/HDH

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