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

Make use of AerPauliExpectation for gradients, quantum Fisher information #59

Closed
adekusar-drl opened this issue Apr 19, 2021 · 2 comments
Assignees
Labels
priority: high type: enhancement ✨ Features or aspects to improve

Comments

@adekusar-drl
Copy link
Collaborator

What is the expected enhancement?

Make sure AerPauliExpectation can be used for gradients, QFI, etc

@Cryoris
Copy link
Contributor

Cryoris commented May 31, 2021

While the code allows to use AerPauliExpectation, it currently gives wrong results due to a bug in the expectation values if coefficients in the state function are involved -- as is the case for gradients.

@Cryoris
Copy link
Contributor

Cryoris commented Jun 30, 2021

With Qiskit/qiskit#6497 merged, this issue is resolved.

The AerPauliExpectation now yields the correct values, see this plot which shows the absolute difference between gradients calculated exactly (using the matrix expectation) again Pauli and AerPauli:
image

For the QFI, the errors look very similar.

Here's a small runtime comparison for gradients (not including matrix expectation because that scales way too bad and reaches the 40s mark already for 12 qubits):
image

@Cryoris Cryoris closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high type: enhancement ✨ Features or aspects to improve
Projects
None yet
Development

No branches or pull requests

2 participants