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

Make cancel_inverses also apply to gates through control flows #1066

Open
paul0403 opened this issue Aug 28, 2024 · 0 comments
Open

Make cancel_inverses also apply to gates through control flows #1066

paul0403 opened this issue Aug 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@paul0403
Copy link
Contributor

Currently cancel_inverses does not detect potential opportunities if they are separated across the boundary of control flow constructs, e.g. for(4){Hadamard} or Hadamard, if(cond){True: Identity, False: Hadamard}. Being able to detect these opportunities would be a good addition.

This issue is more general than cancel_inverses. We essentially want to have an analysis available without having to explicitly unroll loops or hoist conditionals, since these could be expensive and are not guaranteed to happen.

@paul0403 paul0403 added the enhancement New feature or request label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant