Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Package out of hugr-cli #1530

Closed
aborgna-q opened this issue Sep 12, 2024 · 0 comments · Fixed by #1587
Closed

Move Package out of hugr-cli #1530

aborgna-q opened this issue Sep 12, 2024 · 0 comments · Fixed by #1587
Assignees
Labels
bug Something isn't working

Comments

@aborgna-q
Copy link
Collaborator

Package is a core type that should be exported from the core (at least until hugr-model is created).
The current state of things requires tket2 to depend on hugr-cli for the sole reason of using that type.

@aborgna-q aborgna-q added the bug Something isn't working label Sep 12, 2024
github-merge-queue bot pushed a commit to CQCL/tket2 that referenced this issue Sep 30, 2024
This is a small bundle of changes aimed at fixing the example notebooks.

- Use packages when building hugrs. This includes parsing guppy packages
from rust, as well as returning packages from the circuit builder.
  - This required adding exports for the tket2 extensions from python.
- We temporarily add a py dependency on `hugr-cli`, since packages are
currently defined there. See CQCL/hugr#1530
  
The `guppy -> pytket` pipeline is still broken, as guppy now generates
many more function calls and nested control flow primitives, which we do
not currently support.

drive-by: Make `crate::serialize::guppy::find_function` public.

Closes #621.
@aborgna-q aborgna-q assigned aborgna-q and unassigned ss2165 Oct 16, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 17, 2024
Moves the definition of packages out of `hugr-cli`. (We leave a
re-export there to avoid breaking the API, it should be removed on the
next breaking release).

Adds some helper functions to load and validate the package.

Closes #1530 

drive-by: Replace `hugr-core` dependency on `hugr-cli` by `hugr`.
There's no need to access the internals there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants