Skip to content

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 27, 2023

This is an automatic backport of pull request #11074 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

This commit updates the qpy load() function to ensure we are raising a
descriptive error message when a user attempts to load a qpy version
that's not supported by this version of qiskit. Previously it would
fail but with a hard to understand internal error message which was just
confusing and not helpful. For example, when trying to load a QPY
version 10 payload with qiskit 0.25.2 (which only supported up to
version 9) it would raise an error message like:

```
Invalid payload format data kind 'b'p''."
```

which doesn't tell you anything meaningful unless you are intimately
familiar with the QPY file format and how the load() function works.
With this commit it now checks if the version number is supported
immediately and if it's too new it will raise an error message that says
exactly that. So in the above scenario instead of that error message it
will say:

```
The QPY format version being read, 10, isn't supported by this Qiskit
version. Please upgrade your version of Qiskit to load this QPY payload.
```

(cherry picked from commit 0de8730)
@mergify mergify bot requested a review from a team as a code owner October 27, 2023 13:33
@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:

  • @Qiskit/terra-core
  • @mtreinish
  • @nkanazawa1989

@github-actions github-actions bot added Changelog: Bugfix Include in the "Fixed" section of the changelog mod: qpy Related to QPY serialization labels Oct 27, 2023
@github-actions github-actions bot added this to the 0.45.0 milestone Oct 27, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6667929160

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 21 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.01%) to 86.874%

Files with Coverage Reduction New Missed Lines %
qiskit/pulse/library/waveform.py 3 93.75%
crates/qasm2/src/lex.rs 6 91.16%
crates/qasm2/src/parse.rs 12 96.67%
Totals Coverage Status
Change from base Build 6662665717: -0.01%
Covered Lines: 73845
Relevant Lines: 85002

💛 - Coveralls

@mtreinish mtreinish added this pull request to the merge queue Oct 27, 2023
Merged via the queue into stable/0.45 with commit 6633970 Oct 27, 2023
@mergify mergify bot deleted the mergify/bp/stable/0.45/pr-11074 branch October 27, 2023 20:33
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: qpy Related to QPY serialization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants