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

Remove qiskit.tools module #11515

Conversation

mtreinish
Copy link
Member

Summary

This commit removes all the functionality in qiskit.tools with the exception of parallel_map which has been migrated to qiskit.utils. This PR does not cover the removal of qiskit.tools.jupyter or qiskit.tools.monitor which are covered by #11513.

Details and comments

This should probably merge after #11513, there shouldn't be a merge conflict (if I did it correctly), but the removal is incomplete without #11513 and I expect there will be some test failures related to that.

@mtreinish mtreinish added the Changelog: Removal Include in the Removed section of the changelog label Jan 8, 2024
@mtreinish mtreinish added this to the 1.0.0 milestone Jan 8, 2024
@mtreinish mtreinish requested review from nonhermitian, a team and jyu00 as code owners January 8, 2024 18:25
@qiskit-bot
Copy link
Collaborator

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

This commit removes all the functionality in `qiskit.tools` with the
exception of `parallel_map` which has been migrated to `qiskit.utils`.
This PR does not cover the removal of `qiskit.tools.jupyter` or
`qiskit.tools.monitor` which are covered by Qiskit#11513.
@mtreinish mtreinish force-pushed the remove-all-of-tools-forever-from-this-point-forward branch from 9ab52d4 to 71748df Compare January 8, 2024 18:27
@coveralls
Copy link

coveralls commented Jan 8, 2024

Pull Request Test Coverage Report for Build 7494204060

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 89.337%

Totals Coverage Status
Change from base Build 7493140312: 0.05%
Covered Lines: 59416
Relevant Lines: 66508

💛 - Coveralls

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

This seems pleasantly small and an easy clean removal. The move of parallel_map is a shade unfortunate, but we talked about that on #11514.

qiskit/utils/__init__.py Outdated Show resolved Hide resolved
Comment on lines -154 to -160
Publisher().publish("terra.parallel.start", len(values))
nfinished = [0]

def _callback(_):
nfinished[0] += 1
Publisher().publish("terra.parallel.done", nfinished[0])

Copy link
Member

Choose a reason for hiding this comment

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

What was the point of this, historically?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was originally used to have a progress bar for things like parallel_map. Overall there was a goal to have a decoupled event bus that different components could subscribe to for async processing. But it never was really used for anything more than progress bars.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, good to know, thanks. It was one of the major differences from the version that lived in QuTiP, but I'd never actually looked into it to find out what it was for.

jakelishman
jakelishman previously approved these changes Jan 11, 2024
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

(meant to click approve on that review)

@jakelishman jakelishman enabled auto-merge January 11, 2024 20:34
@jakelishman jakelishman added this pull request to the merge queue Jan 11, 2024
Merged via the queue into Qiskit:main with commit 109d677 Jan 11, 2024
13 checks passed
@mtreinish mtreinish deleted the remove-all-of-tools-forever-from-this-point-forward branch January 12, 2024 01:10
ShellyGarion pushed a commit to ShellyGarion/qiskit-terra that referenced this pull request Jan 18, 2024
* Remove qiskit.tools module

This commit removes all the functionality in `qiskit.tools` with the
exception of `parallel_map` which has been migrated to `qiskit.utils`.
This PR does not cover the removal of `qiskit.tools.jupyter` or
`qiskit.tools.monitor` which are covered by Qiskit#11513.

* Update qiskit/utils/__init__.py

Co-authored-by: Jake Lishman <[email protected]>

---------

Co-authored-by: Jake Lishman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Removal Include in the Removed section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants