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

Use extOps definitions from hugr-py 0.8 #412

Closed
Tracked by #391
aborgna-q opened this issue Aug 27, 2024 · 0 comments · Fixed by #454
Closed
Tracked by #391

Use extOps definitions from hugr-py 0.8 #412

aborgna-q opened this issue Aug 27, 2024 · 0 comments · Fixed by #454
Assignees

Comments

@aborgna-q
Copy link
Collaborator

hugr-py 0.8 will export all the std operations defined as as extension ops.
(Backed by a single centralised extension definition).
CQCL/hugr#1459

We should be able to replace the hacky opaque op definitions in .prelude._internal.util/.prelude.builtins with direct references to the operations.

@aborgna-q aborgna-q self-assigned this Aug 27, 2024
@mark-koch mark-koch added this to the guppylang 0.10.0 milestone Sep 2, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 6, 2024
Updates guppy to use extension operation definitions instead of opaque
ops defined on the fly.

Some relevant changes included:

* Defined a new `guppylang` extension with two ops: `partial` and
`unsupported`
* Most list and array operations currently emit `unsupported`, as they
require custom hugr building code (the core ops in `std.collections`
don't match the python operations 1 to 1, it'll need some custom
compilation code).
* Changed `module.compile` to produce a `Package` containing the hugr
along with the required extensions to interpret it. (Currently
hardcoded, we should infer which extensions are needed at some point).
* We hardcode the tket2 extension jsons. The plan is for `tket2` to
publish a new library exporting those, but for now we need the jsons for
validation.
* Use the prelude operations exported by hugr for most
int/float/logic/conversion builtin definitions.

The `tket2` dependency is currently pinned to a commit hash, I'll update
it once `0.3.0` is released.

- Closes #442
- Closes #411
- Closes #412
- Closes #410 

BREAKING CHANGE: Bumped the `hugr` dependency to `0.8.0`

---------

Co-authored-by: Agustin Borgna <agustinborgna@quantinuum.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants