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

Manage edge case of pickling instmap. #9487

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

nkanazawa1989
Copy link
Contributor

Summary

This is a followup PR of #8885 for (edge case) bug fix. When InstructionScheduleMap.add is called with arguments and non-picklable value is specified (such as python dict key), parallel transpile will fail with the inst map due to this line.
https://github.com/Qiskit/qiskit-terra/blob/a3b359b899d5d963272a7b424c8a283bc6bd4c0d/qiskit/compiler/transpiler.py#L365-L368

Details and comments

See new test case for code to reproduce the bug. This PR typecast arguments to python list so that any iterable is stored in the picklable format.

@nkanazawa1989 nkanazawa1989 added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: Bugfix Include in the "Fixed" section of the changelog mod: pulse Related to the Pulse module labels Jan 31, 2023
@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 Jan 31, 2023

Pull Request Test Coverage Report for Build 4054589799

  • 3 of 4 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.0007%) to 85.264%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/pulse/calibration_entries.py 3 4 75.0%
Totals Coverage Status
Change from base Build 4054406329: 0.0007%
Covered Lines: 67017
Relevant Lines: 78599

💛 - Coveralls

@jakelishman jakelishman added this to the 0.23.1 milestone Jan 31, 2023
@mergify mergify bot merged commit 8af4045 into Qiskit:main Jan 31, 2023
mergify bot pushed a commit that referenced this pull request Jan 31, 2023
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 8af4045)
mergify bot added a commit that referenced this pull request Jan 31, 2023
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 8af4045)

Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
@nkanazawa1989 nkanazawa1989 deleted the fix/typecast_def_arguments branch December 11, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog mod: pulse Related to the Pulse module stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants