Open
Conversation
CalMacCQ
commented
Nov 3, 2025
| @guppy | ||
| def qsystem_chain(q: qubit) -> None: | ||
| phased_x(q, angle(0.91), angle(0.5)) | ||
| phased_x(q, angle(0.53), angle(0)) |
Contributor
Author
There was a problem hiding this comment.
Maybe I should make these angles a bit friendlier. I have included the pytket code below though.
The argument order for the phased X gate should be the same as pytket
Contributor
Author
|
Had some issues generating the HUGRs in my local env. Will try again tomorrow. |
ferbetanzo
reviewed
Nov 4, 2025
ferbetanzo
left a comment
There was a problem hiding this comment.
I don't see the lines at the bottom of the .py files to generate the hugr, like in the other test_files/ examples (see below). Was this on purpose?
program = main.compile()
Path(argv[0]).with_suffix(".hugr").write_bytes(program.to_bytes())|
Oh, and also the lines to specify the dependencies to the uv script: # /// script
# requires-python = ">=3.13"
# dependencies = [
# "guppylang >=0.21.3",
# ]
# /// |
Contributor
Author
Ah thanks Fernando, I missed that |
Contributor
github-merge-queue bot
pushed a commit
that referenced
this pull request
Nov 12, 2025
The first part here is identical to examples from #1221 but I also needed myself. The second part....well, revealed why we need the first (I think updating to include Quantinuum/guppylang#1311 is particularly important) - DCE was taking out the gates because we were not doing anything to keep the `result` ops (!).
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.
guppy_optimization/1q_squashdirectory).compile()->.compile_function()).