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

Qiskit / qiskit / 10198804348 / 1
90%
main: 88%

Build:
Build:
LAST BUILD BRANCH: rust-custom-gate
DEFAULT BRANCH: main
Ran 01 Aug 2024 01:20PM UTC
Files 854
Run time 21s
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

01 Aug 2024 12:59PM UTC coverage: 89.924% (-0.001%) from 89.925%
10198804348.1

push

github

web-flow
Move `QuantumCircuit.assign_parameters` to Rust (#12794) (#12878)

* Move `QuantumCircuit.assign_parameters` to Rust

This is (as far as I could tell), the last really major performance
regression in our asv suite compared to 1.1.0, so with this commit, we
should be at _not worse_ for important utility-scale benchmarks.

This largely rewrites `ParamTable` (renamed back to `ParameterTable`
because I kept getting confused with `Param`) to have more Rust-friendly
interfaces available, so that `assign_parameters` can then use them.

This represents a 2-3x speedup in `assign_parameters` performance over
1.1.0, when binding simple `Parameter` instances.  Approximately 75% of
the time is now spent in Python-space `Parameter.assign` and
`ParameterExpression.numeric` calls; almost all of this could be removed
were we to move `Parameter` and `ParameterExpression` to have their data
exposed directly to Rust space.  The percentage of time spent in Python
space only increases if the expressions to be bound are actual
`ParameterExpression`s and not just `Parameter`.

Most changes in the test suite are because of the use of internal-only
methods that changed with the new `ParameterTable`.  The only
discrepancy is a bug in `test_pauli_feature_map`, which was trying to
assign using a set.

* Add unit test of parameter insertion

This catches a bug that was present in the parent commit, but this PR
fixes.

* Update crates/circuit/src/imports.rs

* Fix assignment to `AnnotatedOperation`

* Rename `CircuitData::num_params` to match normal terminology

* Fix typos and :us:

* Fix lint

(cherry picked from commit a68de4f9f)

Co-authored-by: Jake Lishman <jake.lishman@ibm.com>

66661 of 74130 relevant lines covered (89.92%)

235195.92 hits per line

Source Files on job 10198804348.1
  • Tree
  • List 0
  • Changed 49
  • Source Changed 0
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10198804348
  • 9120b8d9 on github
  • Prev Job for on gh-readonly-queue/stable/1.2/pr-12878-dc25aa62c9412a0a0810843e7a178cee9a4ee3ca (#10197591774.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