-
Notifications
You must be signed in to change notification settings - Fork 73
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
Controlled gates (other than RX,RY, RZ) with symbolic parameters don't compile #887
Comments
Fair enough. A generic analytic compilation routine for parametric gates, including controlled versions of simple gates, is somewhere between hard and impossible — but for specific cases, we can probably figure it out. Definitely CONTROLLED PHASE is a variant of CONTROLLED RZ up to local phase. I think, but I am not certain, that CONTROLLED XY p q r is XY q r followed by a (CZ p q)-conjugate of XY q r, maybe with some more local gates to balance out phases. One would have to chase it out. |
It doesn't look like there's any phase to chase. Here's some
which looks like the controlled version of
For funsies, here's a recipe for
and a recipe for
@stylewarning: This sounds like it should be tagged "good first issue". I don't have tag permissions, myself. |
Just to finish the job, here's an example circuit which relates CONTROLLED PHASE and CONTROLLED RZ by implementing the identity:
|
The decomposition of Dunno about the ISWAP version of the same change, since that compiler is also guarded by |
Description
Controlled gates (other than RX, RY, RZ) with symbolic parameters will not compile.
Controlled RX, RY, RZ gates with symbolic parameters will compile (see related issue).
How to Reproduce
Either run the example code provided, or:
and
Code Snippet
Error Output
or
Environment
Quilc version 1.26.0
The text was updated successfully, but these errors were encountered: