hugr
Quantinuum's common representation for quantum programs
Decision gist · record as of 2026-08-14
Yes, if you are building quantum tools or languages within the Quantinuum ecosystem or need a low-level quantum program representation. The library is actively maintained, has no known vulnerabilities, and uses a permissive license. Install friction is moderate due to compiled dependencies, but prebuilt wheels are available for most platforms. Not relevant for general-purpose Python development.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; prebuilt wheels available for common platforms but may require compilation on less common architectures.
- Medium install friction due to compiled wheels for multiple platforms and Python versions (cp310-abi3 through cp314).
- Active maintenance with a release 2 days old and recent commits.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), which allows commercial and private use with minimal restrictions.
last release 2026-08-12 (2 days) · last repo commit 2026-08-14 · 67 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 92,770 downloads/mo, #13,428 on PyPI
Alternatives
Verify before relying
pip install hugr
from hugr import Hugr
# Create a HUGR object for quantum program representation
hugr_obj = Hugr()- Whether graphviz dependency requires system graphviz installation or is bundled
- Specific use cases and API patterns beyond 'low-level construction' mentioned in description
- Performance characteristics or scalability limits for large quantum programs
What it is and what it does
hugr is a Python library that implements the Hierarchical Unified Graph Representation, a common intermediate representation for quantum programs used across the Quantinuum ecosystem. It provides a pure-Python data model and low-level API for constructing and manipulating HUGR objects, which represent quantum operations and programs as hierarchical graphs.
The library is designed as a foundational dependency for higher-level quantum tools like guppylang and tket, rather than as a direct end-user tool. It depends on pydantic for data validation, graphviz for visualization, semver for version handling, and typing-extensions for type support. The package is actively maintained and supports Python 3.10 through 3.14 with prebuilt wheels for most common platforms.
Use it for
- Building intermediate representations of quantum programs for compilation and optimization pipelines
- Implementing quantum language frontends that need a common graph-based representation
- Analyzing and transforming quantum operations within the Quantinuum ecosystem
- Constructing quantum circuit graphs programmatically with type-safe validation
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building quantum tools or languages within the Quantinuum ecosystem or need a low-level quantum program representation.
The library is actively maintained, has no known vulnerabilities, and uses a permissive license. Install friction is moderate due to compiled dependencies, but prebuilt wheels are available for most platforms. Not relevant for general-purpose Python development.
Install
hugr on PyPI
Before you install
Medium install friction due to compiled wheels for multiple platforms and Python versions (cp310-abi3 through cp314). Active maintenance with a release 2 days old and recent commits. Requires Python 3.10 or later.
Requires Python 3.10 or later; prebuilt wheels available for common platforms but may require compilation on less common architectures.
License in practice
Licensed under Apache Software License (permissive), which allows commercial and private use with minimal restrictions.
Quickstart
pip install hugr
from hugr import Hugr
# Create a HUGR object for quantum program representation
hugr_obj = Hugr()
Verify before relying
- Whether graphviz dependency requires system graphviz installation or is bundled
- Specific use cases and API patterns beyond 'low-level construction' mentioned in description
- Performance characteristics or scalability limits for large quantum programs
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 5 packagesgraphvizpydanticpydantic-extra-typessemvertyping-extensions |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 92,770 / month, #13,428 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering |
Evidence: hugr-0.18.4-cp310-abi3-macosx_10_12_x86_64.whl; hugr-0.18.4-cp310-abi3-macosx_11_0_arm64.whl; hugr-0.18.4-cp310-abi3-manylinux_2_28_aarch64.whl; hugr-0.18.4-cp310-abi3-manylinux_2_28_armv7l.whl; hugr-0.18.4-cp310-abi3-manylinux_2_28_i686.whl; hugr-0.18.4-cp310-abi3-manylinux_2_28_ppc64le.whl; hugr-0.18.4-cp310-abi3-manylinux_2_28_s390x.whl; hugr-0.18.4-cp310-abi3-manylinux_2_28_x86_64.whl; hugr-0.18.4-cp310-abi3-musllinux_1_2_aarch64.whl; hugr-0.18.4-cp310-abi3-musllinux_1_2_armv7l.whl; hugr-0.18.4-cp310-abi3-musllinux_1_2_i686.whl; hugr-0.18.4-cp310-abi3-musllinux_1_2_x86_64.whl; hugr-0.18.4-cp310-abi3-win32.whl; hugr-0.18.4-cp310-abi3-win_amd64.whl; hugr-0.18.4-cp314-cp314t-macosx_10_12_x86_64.whl; hugr-0.18.4-cp314-cp314t-macosx_11_0_arm64.whl; hugr-0.18.4-cp314-cp314t-manylinux_2_28_aarch64.whl; hugr-0.18.4-cp314-cp314t-manylinux_2_28_armv7l.whl; hugr-0.18.4-cp314-cp314t-manylinux_2_28_i686.whl; hugr-0.18.4-cp314-cp314t-manylinux_2_28_ppc64le.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “quantum program representation”
- hugrhugr provides a pure-Python implementation of the Hierarchical…
- amazon-braket-schemasProvides serialization, deserialization, and schema definitions for…
- openqasm3Provides a reference abstract syntax tree (AST) for OpenQASM 3…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also qiskit-terra · cirq-core · cirq · qiskit · dwave-graphs · qiskit-aer · cirq-web · onnx-ir · qiskit-ionq · dwave-networkx