ProjectQ-Framework / ProjectQ

ProjectQ: An open source software framework for quantum computing
https://projectq.ch
Apache License 2.0
876 stars 271 forks source link

How would one work with CommandPrinter() #345

Open jason-jk-kang opened 4 years ago

jason-jk-kang commented 4 years ago

Hi!

I am working with the CommandPrinter() backend, and am interested in saving my readout as a qiskit quantum circuit object. How would one go about doing this? My intuition right now is to just string parse the printed commands, but I was hoping there would be a cleaner way to do this.

Takishima commented 4 years ago

I have an implementation of a OpenQASMEngine somewhere on my computer that I could add to ProjectQ as a PR. I will probably not have the time to prepare it until next week, but I'll try to do so as soon as possible.

jason-jk-kang commented 4 years ago

Hi, bumping this to see whether there is any progress on the OpenQASMEngine

Takishima commented 4 years ago

Sorry it took a while. I do have a pseudo-finished implementation of the OpenQASMEngine.

Right now, the other ProjectQ reviewer seems quite busy so if you want to have this accepted quickly into ProjectQ, what we could do is have you open a PR and I either contribute the commits for the new engine to it or you get them from my fork [1]

[1] https://github.com/Takishima/ProjectQ/tree/openqasm

dbretaud commented 4 years ago

As the IBMQ backend doesn't seem to work anymore (Issue #347) and as there is apparently an OpenQASMEngine ready to work, should we also write a new ibmq backend for ProjectQ? It would just require the openqasm engine and then a call to the qiskit ibmq provider.