|
Ran
|
Jobs
1
|
Files
1261
|
Run time
1min
|
Badge
README BADGES
|
push
github
Emit a descriptive error when the QPY version is too new (#11074) (#11131) 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 0de8730cc) Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2 of 2 new or added lines in 1 file covered. (100.0%)
73843 of 85002 relevant lines covered (86.87%)
92079.51 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 6671974136.1 | 0 |
86.87 |
GitHub Action Run |