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

py: Add a "Pointed package" protocol #1561

Closed
aborgna-q opened this issue Oct 9, 2024 · 0 comments · Fixed by #1573
Closed

py: Add a "Pointed package" protocol #1561

aborgna-q opened this issue Oct 9, 2024 · 0 comments · Fixed by #1573
Assignees
Labels
enhancement New feature or request python Pull requests that update Python code

Comments

@aborgna-q
Copy link
Collaborator

Guppy can compile functions into hugr packages, which have a function identified as an entry point.
This is similar to tket2 circuits, which point to a region in a hugr.

We should unify this notion in a Protocol in hugr-py, so both libraries can interact without depending on each other.

class Proto(Protocol):
    def package(self) -> Package: ...
    def hugr_index(self) -> int: ...
    def root(self) -> Node: ...
@aborgna-q aborgna-q added enhancement New feature or request python Pull requests that update Python code labels Oct 9, 2024
@aborgna-q aborgna-q assigned aborgna-q and ss2165 and unassigned aborgna-q Oct 9, 2024
ss2165 added a commit that referenced this issue Oct 11, 2024
Closes #1561

So far just top level things, can add inner ones (cfg, blocks, etc.) later.

BREAKING CHANGE: `Package` moved to new `hugr.package` module
github-merge-queue bot pushed a commit that referenced this issue Oct 11, 2024
Closes #1561

So far just top level things, can add inner ones (cfg, blocks, etc.)
later.

BREAKING CHANGE: `Package` moved to new `hugr.package` module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants