softwareQinc / staq

Full-stack quantum processing toolkit
https://iopscience.iop.org/article/10.1088/2058-9565/ab9359/pdf
MIT License
152 stars 28 forks source link

Bugs in benchmarks #47

Closed khieta closed 2 years ago

khieta commented 2 years ago

I was running some tools on the benchmarks in examples/staq_paper/benchmarks and I noticed that two of the benchmarks are ill-formed, which causes most tools (including Staq) to fail. Possibly a bug when converting from their original format to QASM?

meamy commented 2 years ago

Thanks for pointing that out! It looks like it's actually a potential bug in the original code, which was itself auto-generated years ago from another format using a sed script, and hence likely error-prone. Ironically this isn't a problem in the .qc version which uses ccz gates instead.

I've fixed the benchmarks so that they don't cause errors anymore but are still semantically equivalent to the .qc versions (replacing ccx with cx, since ccz with two repeated arguments is quivalent to a cz. However, these benchmarks should all be re-written from scratch eventually. I'll make a separate issue for that.