Skip to content

fix: update misleading example in migration guide - #13

Merged
CalMacCQ merged 2 commits into
mainfrom
cm/fix_migration_guide
Sep 22, 2025
Merged

CalMacCQ merged 2 commits into
mainfrom
cm/fix_migration_guide

Conversation

@CalMacCQ

@CalMacCQ CalMacCQ commented Sep 22, 2025 •

Copy link
Copy Markdown
Collaborator

Previously, the docs seemed to imply that you could call .emulator on 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.

Comment thread sphinx/migration_guide.md

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to use relative linking here but seems to not work. I think because the docs for decorator are written manually.

@CalMacCQ
CalMacCQ requested a review from tatiana-s September 22, 2025 12:35
@CalMacCQ
CalMacCQ merged commit eb62e9b into main Sep 22, 2025
4 checks passed
@CalMacCQ
CalMacCQ deleted the cm/fix_migration_guide branch December 8, 2025 13:34
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.

2 participants