Repository navigation
fix: update misleading example in migration guide - #13
Merged
Merged
Conversation
CalMacCQ
commented
Sep 22, 2025
|
|
||
| A pytket [Circuit](inv:pytket#circuit_class) instance can be invoked as a Guppy function using the `guppy.load_pytket` method. This feature can be useful for making use of existing pytket circuits directly in Guppy without having to rewrite code from scratch. In the near term, it is also useful to synthesize circuits (e.g. state preparation, permutations) using pytket's higher level "box" constructs. These synthesized circuits can the be invoked as Guppy functions. | ||
|
|
||
| [load_pytket_docs]: https://docs.quantinuum.com/guppy/api/decorator.html#guppylang.decorator.guppy.load_pytket |
Collaborator
Author
There was a problem hiding this comment.
Tried to use relative linking here but seems to not work. I think because the docs for decorator are written manually.
tatiana-s
approved these changes
Sep 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, the docs seemed to imply that you could call
.emulatoron a guppy function constructed from a pytket circuit.This should raise an error as such functions take qubits as arguments and are therefore not valid entrypoints for executable programs.
I've adjusted the code snippets to only call the "circuit constructed function" inside a function that takes no arguemnts. Let me know if this is confusing.
Driveby: crosslink to the decorator docs.