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

Only include the required tket2 extensions when compiling packages #550

Open
aborgna-q opened this issue Oct 9, 2024 · 1 comment
Open
Labels
perf Performance issue

Comments

@aborgna-q
Copy link
Collaborator

aborgna-q commented Oct 9, 2024

Currently we bundle all the tket2 extensions in the packages all the time.
We should detect which extensions are actually being used, and only include those.

# TODO: Currently we just include a hardcoded list of extensions. We should
# compute this dynamically from the imported dependencies instead.
#
# The hugr prelude and std_extensions are implicit.
from guppylang.prelude._internal.compiler.quantum import TKET2_EXTENSIONS
extensions = [*TKET2_EXTENSIONS, guppylang.compiler.hugr_extension.EXTENSION]

A related feature would be to only include the required op definitions from each extension, to further reduce the package size.

github-merge-queue bot pushed a commit that referenced this issue Oct 15, 2024
Closes #550 

- Updates `tket2` dependency to `>0.4.1`, where we added the
`tket2.rotation.from_halfturns_unchecked` op
- Updates the json extension definitions
- Removes the panicking conditional when converting floats into
rotations for quantum op params.
@aborgna-q
Copy link
Collaborator Author

Closed the wrong PR

@aborgna-q aborgna-q reopened this Oct 16, 2024
@aborgna-q aborgna-q added enhancement New feature or request perf Performance issue and removed enhancement New feature or request labels Oct 16, 2024
ss2165 pushed a commit that referenced this issue Oct 21, 2024
Closes #550 

- Updates `tket2` dependency to `>0.4.1`, where we added the
`tket2.rotation.from_halfturns_unchecked` op
- Updates the json extension definitions
- Removes the panicking conditional when converting floats into
rotations for quantum op params.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf Performance issue
Projects
None yet
Development

No branches or pull requests

1 participant