• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 11144723003
88%

Build:
DEFAULT BRANCH: main
Ran 02 Oct 2024 01:49PM UTC
Jobs 1
Files 890
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Oct 2024 12:38PM UTC coverage: 88.868% (+0.004%) from 88.864%
11144723003

push

github

web-flow
Workaround symengine serialization payload incompatibility (#13251)

* Workaround symengine serialization payload incompatibility

In QPY we rely on symengine's internal serialization to represent the
internal symbolic expression stored inside a ParameterExpression object.
However, this format is nominally symengine version specific and will
raise an error if there is a mismatch between the version used to
generate the payload and what is trying to read it. This became an issue
in the recent symengine 0.13 release which started to raise an error
when people installed it and tried to load QPY payloads across the
versions. This makes the symengine serialization unsuitable for use in
QPY because it's supposed to be independent of these kind of concerns,
especially when QPY is used in a server-client model where you don't
necessarily control the installed environment of symengine.

To correctly address this issue we'll need a new version of the QPY
format that owns the serialization format of ParameterExpressions directly
instead of relying on symengine which doesn't offer a compatibility
guarantee on the format. However this won't be quick solution and users
are encountering issues since the release of 0.13. This commit
introduces a workaround for this specific instance of the mismatch. It
turns out the payload format between 0.11 and 0.13 is completely
unchanged except for the version number. So before passing the parameter
expression payload to symengine for deserialization this commit checks
the versions numbers are the same, if they're not it checks that we're
dealing with 0.11 or 0.13, and if so it changes the version number in
the payloads header appropriately. If the version number is outside
those bounds it raises an exception because while this hack is known to
be safe for translating between symengine 0.11 and 0.13, it's not
possible to know for a future version whether the payload format changed
or not.

Longer term we will need a proper fix i... (continued)

11 of 23 new or added lines in 3 files covered. (47.83%)

3 existing lines in 1 file now uncovered.

74155 of 83444 relevant lines covered (88.87%)

374882.02 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
12
80.81
-10.33% qiskit/qpy/common.py

Uncovered Existing Lines

Lines Coverage ∆ File
3
91.73
0.25% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 11144723003.1 02 Oct 2024 01:49PM UTC 890
88.87
GitHub Action Run
Source Files on build 11144723003
  • Tree
  • List 890
  • Changed 69
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • fee9f771 on github
  • Prev Build on main (#11139355385)
  • Next Build on main (#11152794761)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc