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

QFI with the primitives #8688

Merged
merged 52 commits into from
Nov 1, 2022
Merged

QFI with the primitives #8688

merged 52 commits into from
Nov 1, 2022

Conversation

a-matsuo
Copy link
Contributor

@a-matsuo a-matsuo commented Sep 6, 2022

Summary

This PR adds a newQFI class using Linear Comb. of Unitaries with the primitives.

Details and comments

  • LinCombQFI

@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

@coveralls
Copy link

coveralls commented Sep 6, 2022

Pull Request Test Coverage Report for Build 3370620088

  • 275 of 286 (96.15%) changed or added relevant lines in 13 files are covered.
  • 32 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.002%) to 84.455%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/algorithms/gradients/utils.py 45 46 97.83%
qiskit/algorithms/gradients/lin_comb_estimator_gradient.py 36 39 92.31%
qiskit/algorithms/gradients/lin_comb_qfi.py 121 124 97.58%
qiskit/algorithms/gradients/base_qfi.py 39 43 90.7%
Files with Coverage Reduction New Missed Lines %
qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py 1 90.67%
src/optimize_1q_gates.rs 1 95.16%
qiskit/extensions/quantum_initializer/squ.py 2 79.78%
src/sabre_swap/mod.rs 2 95.05%
src/results/marginalization.rs 26 73.56%
Totals Coverage Status
Change from base Build 3370143536: -0.002%
Covered Lines: 62412
Relevant Lines: 73900

💛 - Coveralls

@woodsp-ibm woodsp-ibm added the mod: algorithms Related to the Algorithms module label Sep 6, 2022
@woodsp-ibm woodsp-ibm added this to the 0.22 milestone Sep 12, 2022
@a-matsuo a-matsuo changed the title [WIP] QFI with the primitives QFI with the primitives Sep 14, 2022
@a-matsuo a-matsuo marked this pull request as ready for review September 14, 2022 13:36
Copy link
Contributor

@dlasecki dlasecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback.

qiskit/algorithms/gradients/base_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/base_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/base_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/base_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_estimator_gradient.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
test/python/algorithms/test_qfi.py Outdated Show resolved Hide resolved
@woodsp-ibm woodsp-ibm added the Changelog: New Feature Include in the "Added" section of the changelog label Sep 16, 2022
Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments, but LGTM otherwise!

qiskit/algorithms/gradients/base_estimator_gradient.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/base_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/base_qfi.py Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
@woodsp-ibm woodsp-ibm modified the milestones: 0.22, 0.23.0 Oct 5, 2022
Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, I left some questions below 🙂

qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Show resolved Hide resolved
qiskit/algorithms/gradients/lin_comb_qfi.py Outdated Show resolved Hide resolved
@a-matsuo
Copy link
Contributor Author

a-matsuo commented Oct 27, 2022

Thank you for the comments! I reflected the comments.

Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the work @a-matsuo!

@mergify mergify bot merged commit 671e81c into Qiskit:main Nov 1, 2022
@a-matsuo a-matsuo deleted the qfi-primitive branch January 10, 2023 07:52
ElePT pushed a commit to ElePT/qiskit that referenced this pull request Jun 27, 2023
* wip qfi

* wip qfi

* updated

* added tests

* updated

* updated

* updated

* lin comb qfi

* fix

* finilizing

* fix lint

* started working on block diag qfi

* updated utils

* fix

* fix options

* fix

* lint

* fix

* fix list

* remove estimator from base qfi

* fix

* make a directory for gradient tests

* added option to baseqfi + fied shots behavior

* fixed qfi's derivative type complex

* fix

* fix

* make parameter_values back to float

* updated

* fix lint

* updated

* updated

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit-algorithms-test that referenced this pull request Jul 17, 2023
* wip qfi

* wip qfi

* updated

* added tests

* updated

* updated

* updated

* lin comb qfi

* fix

* finilizing

* fix lint

* started working on block diag qfi

* updated utils

* fix

* fix options

* fix

* lint

* fix

* fix list

* remove estimator from base qfi

* fix

* make a directory for gradient tests

* added option to baseqfi + fied shots behavior

* fixed qfi's derivative type complex

* fix

* fix

* make parameter_values back to float

* updated

* fix lint

* updated

* updated

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog mod: algorithms Related to the Algorithms module priority: medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants