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

Qiskit / qiskit / 24096197851 / 1
88%
main: 87%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-15991-cd995229676b85eb2bdc742035cea94daf90b8df
DEFAULT BRANCH: main
Ran 07 Apr 2026 06:23PM UTC
Files 932
Run time 38s
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.1

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)

104437 of 119319 relevant lines covered (87.53%)

1022947.28 hits per line

Source Files on job 24096197851.1
  • Tree
  • List 932
  • Changed 9
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24096197851
  • 8064d27e on github
  • Prev Job for on gh-readonly-queue/main/pr-15934-6be537fee473b3f4cc4967b7b6a4d2b756036207 (#24044327820.1)
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