Closed macrologist closed 1 year ago
Nice! I’ll try to have a look over the weekend.
Nice! I’ll try to have a look over the weekend.
@ecpeterson
If you wait until next weekend, it might even work! I've got the two sqisw case working but something is amiss in the three sqisw case. I think its that I'm mis-using the output of canonical-decomposition
to extract the canonical coordinates and then halving them with fingers crossed. I have to step through and see that it actually makes sense.
In any case, any feedback is appreciated!
I've pushed again. the depth-3 case still is not working. I am going to narrow my search to canonicalize-for-sqisw
(which, incidentally, I should rename) and check that each of the cases it addresses are conditioned correctly. This check entails stepping back through the paper and deriving each case condition in the function from the cases treated in the proof of the depth-3 proposition. I've pushed these changes in case inquiring minds wanted to know.
adding this before i forget: I imagine that we should call the gate SQRT-ISWAP
to fit the Quil vibes, but I'm not actually picky about this whatsoever. If not that, then SQISWAP
.
This is not ready btw. Even though.. somewhat mysteriously, checks have passed. I should add tests specific to these compiler rules to the suite.
I'm going to close this PR, flatten commits, and open a new one.
This branch intends to add sqisw decomposition to quilc, as per #766 .
What remains to be done:
define-compiler
defs for specific known gatesWhat has been done so far: A
define-compiler
definition has been added that decomposes an arbitrary 2 qubit gate into at most three SQiSW gates interleaved by single qubit gates, and, for 80% of all 2 qubit gates, only requires two SQiSW gates.As this is my first attempt to contribute to the compiler, I am looking for critique on anything that is obviously wrong or obviously flouting conventions.