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

Qiskit / qiskit / 19169744603 / 1
88%
main: 88%

Build:
DEFAULT BRANCH: main
Ran 07 Nov 2025 02:05PM UTC
Files 875
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 Nov 2025 01:00PM UTC coverage: 88.162% (-0.002%) from 88.164%
19169744603.1

push

github

web-flow
Skip intermediate PyList in PauliProductMeasurement::create_py_op() (#15310)

In the recently merged #15126 the PauliProductMeasurement operation
being added to Rust was unecessarily creating a pylist to go from
`Vec<bool>` -> `np.array[bool]` for the z and x parameters while we can
leverage rust-numpy to go straight from a Vec to a numpy array. This
was raised in review for the PR, but the fix just changed the mechanism
a Pylist was created by and didn't actually remove the python list
creation. `into_bound_py_any()` just is a short cut for using the
default IntoPyObject trait's conversion and casting it as a PyAny. In
the case of `Vec<T>` that means it's converting to a `PyList<T>`. Doing
this still results in 2 copies, one of which is done in Python. This
commit fixes the issue by using `to_pyarray()` to copy the Vec<bool>
directly into a numpy owned array. We have to copy still since we aren't
deleting the owning PauliProductMeasurement in Rust so we can't use
`into_pyarray()` which would avoid that copy. But this sill reduces the
numbers of copies needed to make the numpy arrays in Python.

94214 of 106865 relevant lines covered (88.16%)

1131662.78 hits per line

Source Files on job 19169744603.1
  • Tree
  • List 875
  • Changed 5
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 19169744603
  • fa76cad1 on github
  • Prev Job for on main (#19163192039.1)
  • Next Job for on main (#19197670304.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