-
Notifications
You must be signed in to change notification settings - Fork 141
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
one major on missing some key operator like cz and one minor on readme #19
Comments
I test the change to the code
It should be fine of course that means cy and cz now all cx which is not right. However to do cy and cz require touching the Gate Class. A lot of not sure about this why there is a need to change basis (see wiki CNOT especially the one on 2 bit using H as its own inverse (See (H1 ⊗ H1)−1 . CNOT . (H1 ⊗ H1)) to H2 . CNOT . H2 which is in the logic. But why CNOT 0->1 use simple logic and CNOT 1-> 0 not. Still working on it. Also the whole class is handcrafted; need some programming as said in the "TODO" section but that is 7 years ago. Possibly above my "pay grade"! |
Minor: On the section about "Working with Individual States and gates", one minor issue is that the qc has to be either "qc.reset()" or redefine "qc = ...". I suspect the other issue can be handled.
Major: try to reproduce the circuit of teleport from quirk to composer. It can be done on the IBM openqasm 2.0 composer but not here. The issue is that there is no cz operator. I suspect one can amend these lines but not sure I am expert enough to try.
Somehow the cx in the first line need to increase to cover cy and cz and then apply the appropriate logic to it (the line l="..." for the "translation".
The regular expression might be easily fixed by changing into something like
and some change in logic of the "if cnot" so to use group 2 and 3 not 1 and 2 and use group 1 to handle cx/cy/cz
But the logic under self.apply_two_qubit_gate_CNOT is not that easy as it involved different way to handle cx/cy/cz gate change.
The text was updated successfully, but these errors were encountered: