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

Qiskit / qiskit / 24097557231
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: use-gate-direction-error
DEFAULT BRANCH: main
Ran 07 Apr 2026 06:57PM UTC
Jobs 1
Files 923
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

07 Apr 2026 06:23PM UTC coverage: 87.594% (+0.03%) from 87.561%
24097557231

push

github

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

* 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" lis... (continued)

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

39 existing lines in 5 files now uncovered.

104002 of 118732 relevant lines covered (87.59%)

1002446.19 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
18
90.53
3.55% crates/circuit/src/parameter/parameter_expression.rs
6
97.15
0.0% crates/qasm2/src/parse.rs
6
60.31
-3.09% crates/qpy/src/bytes.rs
6
72.54
-2.11% crates/qpy/src/params.rs
3
93.06
0.51% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 24097557231.1 07 Apr 2026 06:57PM UTC 923
87.59
GitHub Action Run
Source Files on build 24097557231
  • Tree
  • List 923
  • Changed 9
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24097557231
  • 9bf5bb85 on github
  • Prev Build on gh-readonly-queue/stable/2.4/pr-15936-a1034c1f3f5859d0a705f44a2f7bf3df64ca9d56 (#23895846592)
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