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

feat: Merge hugr's schema Value with Const #172

Closed
wants to merge 3 commits into from

Conversation

aborgna-q
Copy link
Collaborator

Follows the changes from CQCL/hugr#881.

The schema added to hugr's PR was generated from this PR.

This should only be merged once the quantinuum-hugr dependency is updated to 0.3.0, as it will update the validation tests.

github-merge-queue bot pushed a commit to CQCL/hugr that referenced this pull request Mar 19, 2024
This PR ports the pydantic definition from guppy (including
CQCL/guppylang#172), and updates it to sync up
with the current schema.

Changes to the schema:

- Renamed the `InputExtensions` class to `ExtensionSet`
- Added a named definition for `Const`
- Dropped `DummyOp`. It was referenced in a couple field types, but the
model was never defined.

The main difference with the model in `guppy` is the use of
`RootModel`-based classes instead of variables assigned to a
`TypeAliasType` for defining aliases on type unions.
They both work the same, but `mypy` doesn't like using variables in
types.

Additionally, I updated some READMEs and added a CI check to ensure that
the json in `specification/schema/` is always up to date.
@aborgna-q
Copy link
Collaborator Author

This is now implemented on the hugr repo, CQCL/hugr#888.
The local RawHugr definition will be replaced with that one soon.

@aborgna-q aborgna-q closed this Mar 20, 2024
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 this pull request may close these issues.

1 participant