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


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

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)

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.convert_from_qiskit 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.convert_from_qasm 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)

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.4.tar.gz (19.4 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.4-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hdh-0.1.4.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.13 Darwin/24.6.0

File hashes

Hashes for hdh-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f855db83c109132458d78d6e79a51066b45bf87d55348d5e8aa9aaade4d3f8f1
MD5 8bcd2defac1f29b79630715f538622ee
BLAKE2b-256 ddc4997f1759cab11a494e2ff15024fd8801f3ab9ce4dd8e05ee247700a52625

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hdh-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.13 Darwin/24.6.0

File hashes

Hashes for hdh-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f56c28a5baf757db05169c58543075f67484e1a526486a634515cf22e81351dc
MD5 8cd83b9f3fb45a64f228ba468d17b819
BLAKE2b-256 0f9401db627e82de6182495a71c40a282e54170044f01915477c17cf8c3becf3

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