ProjectQ icon indicating copy to clipboard operation
ProjectQ copied to clipboard

Qasm interface

Open yourball opened this issue 5 years ago • 5 comments

Hi!

It seems that ProjectQ doesn't fully support QASM interface for loading/saving algorithms in .qasm format. The only related functionality I was able to find is the method .get_qasm() for IBMbackend. Also it works only for circuits that are appropriate for IBM backend.

QASM interface is a very important component in popular quantum compilation frameworks such as Qiskit, Cirq, tket, Quil. And the absence of such limits potential audience and makes it very hard to use ProjectQ. I was wondering if there were any attempts to create a proper OpenQasm interface in ProjectQ?

A related point about OpenQASMEngine was discussed in #345 by @Takishima.

Qiskit has OpenQasm parser that should be relatively easy to integrate to ProjectQ.

Thanks!

yourball avatar Oct 09 '20 00:10 yourball

If possible I would like to avoid introducing some more external dependencies to ProjectQ. Particularly with other quantum computing frameworks. That being said, an OpenQASM interface for loading/saving .qasm files from ProjectQ is something that we would seriously consider. I can't make any precise promises when I could make that a reality, but I will try to implement and propose something going in that direction in the next few weeks.

Takishima avatar Oct 22 '20 15:10 Takishima

@yourball I have now pushed a new version of my feature/openqasm branch. Have a look at it and let me know if you encounter any issues.

The code is currently still rather experimental and does require qiskit to be installed. I might introduce a version that does not require qiskit some time in the next few days.

Takishima avatar Nov 06 '20 17:11 Takishima

Just pushed a few more changes which include some bug fixes and a parser based on Pyparsing (instead of Qiskit).

Takishima avatar Nov 10 '20 20:11 Takishima

@Takishima, @yourball, I know a long time has passed but is this still relevant? Are we still considering implementing QASM translation to ProjectQ?

pedromartinssouza avatar Mar 24 '24 18:03 pedromartinssouza

The PR is still open. I will try to ping @andreashehn to review it.

Takishima avatar Mar 27 '24 21:03 Takishima