Skip to content

grageragarces/HDH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

HDH-based IR for compilation of distributed quantum workloads

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published