Skip to content

Manage edge case of pickling instmap.#9487

Merged
mergify[bot] merged 2 commits into
Qiskit:mainfrom
nkanazawa1989:fix/typecast_def_arguments
Jan 31, 2023
Merged

Manage edge case of pickling instmap.#9487
mergify[bot] merged 2 commits into
Qiskit:mainfrom
nkanazawa1989:fix/typecast_def_arguments

Conversation

@nkanazawa1989
Copy link
Copy Markdown
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 Make Mergify open a backport PR to the most recent stable branch on merge. Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog. mod: pulse Related to the Pulse module labels Jan 31, 2023
@nkanazawa1989 nkanazawa1989 requested review from a team, eggerdj and wshanks as code owners January 31, 2023 05:17
@qiskit-bot
Copy link
Copy Markdown
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:

@nkanazawa1989 nkanazawa1989 force-pushed the fix/typecast_def_arguments branch from 7af6f6b to 988a179 Compare January 31, 2023 05:32
@coveralls
Copy link
Copy Markdown

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 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)
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: Fixed Add a "Fixed" entry in the GitHub Release changelog. mod: pulse Related to the Pulse module stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants