quantum-benchmarks icon indicating copy to clipboard operation
quantum-benchmarks copied to clipboard

Cirq shows logarithmic complexity on single-gate tasks

Open sergei-mironov opened this issue 3 years ago • 2 comments

Hi. I've run the Benchmark (forked from commit 2492b3ae) with some latest Qiskit and Cirq-0.13.1. Multi-gate tests look valid, but on single-gate tasks I see the attached picture. AFAIK the non-exponential performance in Cirq's case means that it uses some "forbidden" optimisation like erasing the unchanged qubits or alike. Does this explanation sound right and how can I find and disable this optimization?

image

sergei-mironov avatar Dec 13 '21 12:12 sergei-mironov

yes, this looks like something has been changed inside Cirq if you get this or it could also because Cirq start to spawn tasks to run in the backend instead of syncing task, this is another benchmark trap one could easily run into when I was trying other platforms (e.g qiskit did this before, so we have to use our custom execute). I'm not sure what has been changed in Cirq however, this would need someone knows Cirq well to understand this better

Roger-luo avatar Dec 13 '21 23:12 Roger-luo

OK. I checked htop and it looks like it is not a multi-processing issue, since only one loaded cpu appeared all the time. So, probably, it is some optimizations..

sergei-mironov avatar Dec 14 '21 15:12 sergei-mironov