qiskit-community / qiskit-nature

Qiskit Nature is an open-source, quantum computing, framework for solving quantum mechanical natural science problems.
https://qiskit-community.github.io/qiskit-nature/
Apache License 2.0
301 stars 204 forks source link

Update Qiskit parallel map usage and remove TextProgressBar #1328

Closed woodsp-ibm closed 8 months ago

woodsp-ibm commented 8 months ago

Summary

Closes #1314 Closes #1324

Details and comments

I updated the code to import the parallel_map into qiskit_nature.utils and expose it as _parallel_map to avoid creating a new public method as such. The import tries in the new location, which exists from 0.46 and above, before it goes back to the former location. The former location still exists in 0.46 but raises a deprecation warning hence the order of trying the imports to avoid this.

We could update the min requirements of Qiskit to 0.46 to avoid this and directly import/use parallel map from the new location. I chose the path of broader compatibility and did not update requirements as 0.46 is not quite yet released.

I completely removed TextProgressBar usage as TextProgressBar is removed in 1.0.

Tests all pass locally on my machine where I have the main branch with what will end up in 1.0 installed. It also works with 0.45 as I tried that too as that s currently what CI is using until a newer version gets released. Update: 0.46 has since been released, nightly CI is now failing.

As parallel map is internal logic that was changed, and TextProgressBar just affects what comes out in logs if enabled, neither change warrants a release note I think, so I did not include any.

coveralls commented 8 months ago

Pull Request Test Coverage Report for Build 7747395463


Totals Coverage Status
Change from base Build 7745329021: 0.03%
Covered Lines: 8788
Relevant Lines: 10127

💛 - Coveralls