Closed mlazzarin closed 2 years ago
Does this happen when you use the main branch of this repository? Because in my case it works with no issue:
The way the supremacy circuit is constructed is by using Cirq's generate_boixo_2018_supremacy_circuits_v2
, translating it to Qasm and then using qibo's Circuit.from_qasm
to create the corresponding qibo circuit, so the error you are quoting is possible but I haven't seen it.
By the way, you may also want to try the libraries
branch which allows to benchmark other libraries to, as this is the most up-to-date branch at the moment. However main
should still work for qibo only benchmarks.
The problem appears when upgrading to Cirq 0.12.0
. In particular, Cirq uses a new gate named sx
, which is not recognized by Qibo.
Just adding that the new sx
gate corresponds to rx(pi*0.5)
from Cirq 0.11. Also this issue does not appear in CI because Cirq is installed via OpenFermion which is required for the BasisChange circuit and apparently pins Cirq's version to 0.11.1. This issue may appear once they upgrade Cirq's version and a potential solution would be to substitute sx
with the rx
gate, eg. using qasm.replace("sx", "rx(pi*0.5))
on the qasm string.
It seems that openfermion updated the cirq version requirement and now this issue appears here. I have pushed the simple fix described above in #11 (branch libraries
). @mlazzarin, if you have time you can check and let me know if it works for you now.
Now it works, thank you.
We can close this issue once #11 is merged.
If I run
Qibo raises a QASM error: