hugr-persistent

Crates.iohugr-persistent
lib.rshugr-persistent
version0.2.3
created_at2025-07-10 10:33:35.231525+00
updated_at2025-09-15 16:10:08.74614+00
descriptionPersistent IR structure for Quantinuum's HUGR
homepagehttps://github.com/CQCL/hugr
repositoryhttps://github.com/CQCL/hugr
max_upload_size
id1746141
size1,092,704
Agustín Borgna (aborgna-q)

documentation

https://docs.rs/hugr-persistent/

README

hugr-persistent

build_status crates msrv codecov

The Hierarchical Unified Graph Representation (HUGR, pronounced hugger) is the common representation of quantum circuits and operations in the Quantinuum ecosystem.

It provides a high-fidelity representation of operations, that facilitates compilation and encodes runnable programs.

The HUGR specification is here.

Overview

This crate provides a persistent data structure for HUGR mutations; mutations to the data are stored persistently as a set of Commits along with the dependencies between them.

As a result of persistency, the entire mutation history of a HUGR can be traversed and references to previous versions of the data remain valid even as the HUGR graph is "mutated" by applying patches: the patches are in effect added to the history as new commits.

Usage

Add the dependency to your project:

cargo add hugr-persistent

Please read the API documentation here.

Recent Changes

See CHANGELOG for a list of changes. The minimum supported rust version will only change on major releases.

Development

See DEVELOPMENT.md for instructions on setting up the development environment.

License

This project is licensed under Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0).

Commit count: 1629

cargo fmt