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

Qiskit / qiskit / 24096197851
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-15966-f23f0bcf1b082dcbcc41cedc53fbc6a0b82e0d7c
DEFAULT BRANCH: main
Ran 07 Apr 2026 06:23PM UTC
Jobs 1
Files 932
Run time 3min
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

07 Apr 2026 05:53PM UTC coverage: 87.528% (+0.03%) from 87.495%
24096197851

push

github

web-flow
Rewrite QPY `ParameterExpression` handling in pure Polish form (#15934)

* Rewrite QPY `ParameterExpression` handling in pure Polish form

This patch is a fairly invasive change, but one that fixes the known
edge cases of replay generation from `ParameterExpression` itself.  This
fixes several `pickle`, `copy`/`deepcopy` and QPY bugs around
`ParameterExpression`.

The Python-space QPY loader is modified in a small way to allow it to
handle QPY-format permitted "replay" elements that act between two bare
values; this was always allowed by the QPY spec, but couldn't be
generated by Python-space QPY/`ParameterExpression`.  Doing so actually
significantly simplifies the loading logic, since it no longer needs to
reflect certain arithmetic operations.  The new Rust-space
`ParameterExpression` uses binary operations with two numeric operands
(e.g. `Add(2, 0)`) to safely propagate bare values through the QPY
replay.  This was not previously necessary in Python space because there
was no public interface to create a bare-numeric `ParameterExpression`
without replayable expressions having been tracked.  Similarly,
cancelled-out symbols are propagated in the replay with `Sub(x, x)`
operations, which already must work across all compliant QPY loaders,
and both Rust- and Python-space `ParameterExpression.

History
-------

The QPY replay was _intended_ to be a pure Polish-notation
representation of the operations to take to rebuild the expression.
This mostly worked fine at the time, but the patch was written under a
lot of stress and without full CI tooling, due to it being in response
to a security bug.  This led to some less-than-ideal parts of the format
specification, such as the start/end recursion opcodes in the QPY format
not actually being necessary; they are actually zero-operand no-ops to
the stack, but this wasn't noticed during the patch due to time
pressure.

Further, as `ParameterExpression` moved to Rust, the tracked internal
"replay" list disappe... (continued)

167 of 262 new or added lines in 4 files covered. (63.74%)

44 existing lines in 5 files now uncovered.

104437 of 119319 relevant lines covered (87.53%)

1022947.28 hits per line

Uncovered Changes

Lines Coverage ∆ File
80
72.54
-2.11% crates/qpy/src/params.rs
15
90.53
3.55% crates/circuit/src/parameter/parameter_expression.rs

Coverage Regressions

Lines Coverage ∆ File
19
90.53
3.55% crates/circuit/src/parameter/parameter_expression.rs
8
73.93
-0.3% crates/circuit/src/parameter/symbol_expr.rs
6
60.31
-3.09% crates/qpy/src/bytes.rs
6
72.54
-2.11% crates/qpy/src/params.rs
5
92.8
1.03% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 24096197851.1 07 Apr 2026 06:23PM UTC 932
87.53
GitHub Action Run
Source Files on build 24096197851
  • Tree
  • List 932
  • Changed 9
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24096197851
  • 8064d27e on github
  • Prev Build on gh-readonly-queue/main/pr-15951-12bb3efc7624381609eb5ec15c299563681ebd6f (#24044327820)
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

© 2026 Coveralls, Inc