yardstiq / quantum-benchmarks

benchmarking quantum circuit emulators for your daily research usage
Other
119 stars 28 forks source link

Cirq shows logarithmic complexity on single-gate tasks #47

Open sergei-mironov opened 2 years ago

sergei-mironov commented 2 years ago

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

Roger-luo commented 2 years ago

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

sergei-mironov commented 2 years ago

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..