-
Notifications
You must be signed in to change notification settings - Fork 70
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
Generate adjoint blocks for Conjugate expressions #215
Conversation
5d40b2f
to
3a5c43c
Compare
This change introduces a pass to transform away conjugate expressions by generating the appropriate adjoint blocks. It reuses the code introduced for adjoint generation and adds one extra check regarding use of mutable variables inside the apply-block.
3a5c43c
to
10c1485
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to unblock, but I would recommend at least one more approval.
I rebased Deutsch-Jozsa branch on top of this (locally) and removed all modifications with manual adjoint/within implementation. I can confirm that it works as expected. |
Merging as admin in Cesar's absence as co-owner of the libraries and katas. |
This change introduces a pass to transform away conjugate expressions by generating the appropriate adjoint blocks. It reuses the code introduced for adjoint generation and adds one extra check regarding use of mutable variables inside the apply-block.
With this change, a conjugate expression like this:
becomes a block expression: