qiskit-community / qiskit-algorithms

A library of quantum algorithms for Qiskit.
https://qiskit-community.github.io/qiskit-algorithms/
Apache License 2.0
116 stars 59 forks source link

Update Diagonal Estimator for Qiskit change #98

Closed woodsp-ibm closed 1 year ago

woodsp-ibm commented 1 year ago

Summary

The primitives are being altered in Qiskit where Qiskit/qiskit#11051 removed attributes from the base classes which affected sub-classes using these. In such subclasses, the diagonal estimator in algorithms still there in Qiskit, corresponding private attributes were added to these. This mirrors the same change - it should be compatible with current Qiskit base estimator too as this same code is there in the constructor, so while its done twice now in the future this will be needed. Things may be further refactored for the primitives but this keeps things updated for now.

Details and comments

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 6772739810


Totals Coverage Status
Change from base Build 6772731947: 0.004%
Covered Lines: 6464
Relevant Lines: 7137

💛 - Coveralls
woodsp-ibm commented 1 year ago

As the install main dependencies action still has the option to install qiskit from repo main branch, though presently all the testing sets that false so that released version is used, what we could also do (or do instead) is to add a job that runs the unit tests against main but not require it to pass to merge anything (same as Neko was - shows a red X but is not required). We could even do it like tutorials where we run a couple, one with 3.8 and one with 3.11 so it spans from min to max Python supported here. Doing this would cover everything our unit tests do, so cover a bunch more stuff than just the diagonal estimator, and may catch other things e.g. it would have tripped on QDrift seed change.