qiskit-aer
qiskit-aer copied to clipboard
[perf] Avoid parameter binding
Summary
This PR avoid parameter binding not to copy QuantumCircuit deeply in assemble.
Details and comments
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.
Cashing qobj may be alternative.
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.