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

Rewrites don't preserve global phase #598

Open
ss2165 opened this issue Sep 6, 2024 · 2 comments
Open

Rewrites don't preserve global phase #598

ss2165 opened this issue Sep 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ss2165
Copy link
Member

ss2165 commented Sep 6, 2024

There is no phase tracking, and no phase gate in the standard set.
It is not a natural fit because it is a non-dataflow global operation. Almost like metadata?

Phase only matters in certain kinds of circuit composition (e.g. quantum control).

@ss2165 ss2165 added the bug Something isn't working label Sep 6, 2024
@aborgna-q
Copy link
Collaborator

We should be keeping the pytket global phase on the circuit metadata. Do you have a failing example?
https://github.com/CQCL/tket2/blob/main/tket2%2Fsrc%2Fserialize%2Fpytket%2Fencoder.rs#L57-L62

(There's currently no way for rewrites to modify the phase)

@ss2165
Copy link
Member Author

ss2165 commented Sep 12, 2024

This isn't a bug report about pytket compatibility, and is independent of pytket. What I mean is that a rewrite may only be valid up to phase if you keep track of the phase update, which we don't do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants