qiskit-aer icon indicating copy to clipboard operation
qiskit-aer copied to clipboard

[perf] Avoid parameter binding

Open ikkoham opened this issue 2 years ago • 2 comments

Summary

This PR avoid parameter binding not to copy QuantumCircuit deeply in assemble.

Details and comments

ikkoham avatar Oct 12 '22 13:10 ikkoham

This assemble is a bottleneck and very slow and I would like to improve it. If you have other ideas, that's fine too. Anyway, regression of the most important benchmark, VQE performance, is not to be missed. Of course I understand that private access is not good, but I don't have any other ideas. Conversely, it may be a request to improve the public API to be able to do this. It is wrong to need hacks for performance.

But it doesn't seem good that the algorithm is not in the OKRs. Not only this, but parameter binding is always a bottleneck.

ikkoham avatar Oct 12 '22 22:10 ikkoham

Cashing qobj may be alternative.

ikkoham avatar Oct 12 '22 22:10 ikkoham

Thanks. Surely this problem should not be solved by workarounds like my proposal, we need fundamentally improvement. I was told that this is an old problem that has been discussed and recognized for a long time, so I look forward to future improvements.

ikkoham avatar Oct 19 '22 16:10 ikkoham