Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance regression with two-step transpilation #7217 #7337

Closed
t-imamichi opened this issue Dec 2, 2021 · 0 comments · Fixed by #7338
Closed

Performance regression with two-step transpilation #7217 #7337

t-imamichi opened this issue Dec 2, 2021 · 0 comments · Fixed by #7338
Labels
type: enhancement It's working, but needs polishing

Comments

@t-imamichi
Copy link
Member

What is the expected enhancement?

#7217 causes significant performance regression on VQE. We should fix the performance regression.

from timeit import timeit

from qiskit import Aer
from qiskit.algorithms import VQE
from qiskit.algorithms.optimizers import COBYLA
from qiskit.circuit.library import RealAmplitudes
from qiskit.opflow import PauliSumOp
from qiskit.utils import QuantumInstance

quantum_instance = QuantumInstance(backend=Aer.get_backend('aer_simulator'), shots=1)
vqe = VQE(ansatz=RealAmplitudes(), optimizer=COBYLA(maxiter=1), quantum_instance=quantum_instance)
op = PauliSumOp.from_list([("ZZ"*5, 1), ("IX"*5, 2)])
print(f'{timeit(lambda: vqe.compute_minimum_eigenvalue(op), number=10)} sec')

fe0abaa

1.525182469 sec

0196754

3.796546701 sec
@t-imamichi t-imamichi added the type: enhancement It's working, but needs polishing label Dec 2, 2021
@t-imamichi t-imamichi changed the title Performance regression with #7217 Performance regression with two-step transpilation #7217 Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement It's working, but needs polishing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant