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

Qiskit / qiskit / 12676867733
89%
main: 88%

Build:
Build:
LAST BUILD BRANCH: correct-approximation-degree
DEFAULT BRANCH: main
Ran 08 Jan 2025 06:57PM UTC
Jobs 1
Files 913
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

08 Jan 2025 06:25PM UTC coverage: 88.917%. Remained the same
12676867733

push

github

web-flow
Fix phase of `pauli_list.insert(..., qubit=True)` for length-1 `pauli_list` (#13624)

* switch order of if-clauses

`len(value) == 1` is the simplest case, and is also the case where the problematic clause `len(value) == size` fails.

This commit switches the order, so we check for `len(value) == 1` first.

This ensures that when the `len(value) == size` clause runs, we know that `size != 1`, avoiding the bug in #13623.

* add test

* Simplify `value.phase` broadcasting

Here, `phase` should be a 1D array. `np.vstack()` docs say explicitly output will be at least 2D, so we should not use that to create `phase`.

The intent of using `np.vstack()` was essentially to broadcast `phase` to properly add to `self.phase`. But, this happens automatically and correctly if we just add as-is. So this commit simplifies the code accordingly.

* Verify that `phase` is 1D in `from_symplectic()`

Verifying the input arg `phase`, since otherwise `from_symplectic()` will silently create PauliLists with malformed `phase` attributes (i.e. not 1D).

Zero-dimensional is OK (e.g. `phase` defaults to `0`) since that can broadcast per the shape of the `z` and `x` arrays.

* remove vestigial line

* lint

* release note

* Update releasenotes/notes/fix-paulilist-length1-phase-688d0e3a64ec9a9f.yaml

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

---------

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

6 of 7 new or added lines in 1 file covered. (85.71%)

8 existing lines in 1 file now uncovered.

79422 of 89321 relevant lines covered (88.92%)

365396.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12676867733.1 08 Jan 2025 06:57PM UTC 0
88.92
GitHub Action Run
Source Files on build 12676867733
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #12676867733
  • 408741ca on github
  • Prev Build on gh-readonly-queue/main/pr-13622-8b2f6bd83ce8839c3efcb24d784dbb5f888db307 (#12676393848)
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