qiboteam / qibo

A full-stack framework for quantum computing.
https://qibo.science
Apache License 2.0
297 stars 60 forks source link

`openqasm3` is very slow #1254

Open BrunoLiegiBastonLiegi opened 8 months ago

BrunoLiegiBastonLiegi commented 8 months ago

The newly introduced openqasm3 parser added support for QASM 3.0 but it's way slower than openqasm (the older version of the parser supporting QASM 2.0). For a 1000 qubits random Clifford circuit:

The qibo.models._openqasm.QASMParser was implemented with openqasm3 as reference, but it might actually be extended to give the possibility of parsing QASM 2.0 code using openqasm. Even though I am not sure how much overlapping exists between the objects generated by openqasm and openqasm3...

rscircus commented 8 months ago

Maybe looking at https://github.com/amazon-braket might help. They use openqasm3, too.

rscircus commented 8 months ago

Was surprised to discover AWS Braket is on v3 already and extended OpenQASM using pragmas to allow e.g. adjoint differentation or noise modelling ... compiling on the fly and even allowing verbatim compilation. Considering emulation/simulation, Amazon's set of simulators is quite large, too. However, I haven't played with them, yet.