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

Qiskit / qiskit / 27417302793
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: fix_qpy_backwards_numpy_constraint
DEFAULT BRANCH: main
Ran 12 Jun 2026 01:33PM UTC
Jobs 1
Files 947
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

12 Jun 2026 01:01PM UTC coverage: 87.483% (-0.005%) from 87.488%
27417302793

push

github

web-flow
Move `ParameterVector` to Rust (#16228)

* Move `ParameterVector` to Rust

`ParameterVector` was previously a pure-Python concept, even though the
Rust-space `Symbol` necessarily had to track an internal backreference
to a vector Python object in order to convert itself to Python later.
This hidden dependence on the Python interpreter was the root cause of a
panicking bug in Qiskit 2.4[^1].

All `ParameterVectorElement`s in Python space have names and UUIDs that
are pure functions of the underlying vector and the element's index.
Now that this information is available in Rust space, it is far more
efficient to simply not store all this derived information, but
calculate it on the fly, as needed.  This motivated the change in
`Symbol` to an `enum`: the logic was _already_ handling the two cases of
"standalone" and "element", but this formally separates them to avoid
storing unnecessary data.  Doing this alone is already a performance
benefit: construction of a `list(ParameterVector("a", 10_000))` (to
ensure all the same Python-space objects are created) went from 7.7ms
to 1.4ms on my machine (~5x speedup).

This work here is far more aggressive at threading through shared `Arc`
references of both `Symbol` and `SymbolVector`.  The `Arc<SymbolVector>`
is necessary for correctness in Python space, not just performance: we
must have `all(el.vector == els[0].vector for el in els)`, and we don't
want to have to cache more Python objects within `Symbol` to achieve
that.  Unfortunately, `ParameterVector` never implemented true equality
(only the default referential equality that Python uses to make
mutable-state objects safely hashable by default), so we certainly need
some other stable reference that can be shared.

The previous Python-space constructions of `PyParameter` and
`PyParameterVectorElement` had not been done entirely correctly with
respect to subclassing; the same (cloned) `Symbol` was present in
multiple places, which was two more allocations tha... (continued)

326 of 410 new or added lines in 23 files covered. (79.51%)

14 existing lines in 4 files now uncovered.

110769 of 126618 relevant lines covered (87.48%)

965641.04 hits per line

Uncovered Changes

Lines Coverage ∆ File
18
82.38
0.0% crates/transpiler/src/target/mod.rs
13
68.0
-3.59% crates/qpy/src/params.rs
11
90.36
-0.67% crates/circuit/src/parameter/parameter_expression.rs
9
90.08
0.0% crates/cext/src/transpiler/passes/two_qubit_peephole.rs
9
90.08
0.0% crates/cext/src/transpiler/passes/unitary_synthesis.rs
9
94.47
0.0% crates/transpiler/src/transpiler.rs
7
74.31
0.38% crates/circuit/src/parameter/symbol_expr.rs
3
83.42
0.21% crates/qpy/src/py_methods.rs
2
77.44
-0.12% crates/qpy/src/circuit_reader.rs
1
83.69
0.25% crates/circuit/src/operations.rs
1
93.09
-0.18% crates/circuit/src/parameter_table.rs
1
92.79
0.0% crates/qpy/src/circuit_writer.rs

Coverage Regressions

Lines Coverage ∆ File
11
90.36
-0.67% crates/circuit/src/parameter/parameter_expression.rs
1
74.31
0.38% crates/circuit/src/parameter/symbol_expr.rs
1
91.26
0.0% crates/qasm2/src/lex.rs
1
68.0
-3.59% crates/qpy/src/params.rs
Jobs
ID Job ID Ran Files Coverage
1 27417302793.1 12 Jun 2026 01:33PM UTC 947
87.48
GitHub Action Run
Source Files on build 27417302793
  • Tree
  • List 947
  • Changed 25
  • Source Changed 23
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27417302793
  • 8ac980a8 on github
  • Prev Build on gh-readonly-queue/main/pr-16419-a0976379bf88213df156f819d7bf80dbcc72b062 (#27413738687)
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