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

Qiskit / qiskit / 7507830319 / 1
89%
main: 88%

Build:
Build:
LAST BUILD BRANCH: py3.10-updates
DEFAULT BRANCH: main
Ran 12 Jan 2024 10:13PM UTC
Files 924
Run time 24s
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 Jan 2024 09:53PM UTC coverage: 89.32% (-0.02%) from 89.335%
7507830319.1

push

github

web-flow
Use "tensorised-Pauli decomposition" in `SparsePauliOp.from_operator` (#11133)

* Use "tensorised-Pauli decomposition" in `SparsePauliOp.from_operator`

This switches the implementation of `SparsePauliOp.from_operator` to
the "tensorised-Pauli decomposition" described in
https://arxiv.org/abs/2310.13421.

This initial implementation is a relatively naive implementation of the
algorithm as described in the paper, with a couple of engineering
improvements over the paper's accompaniment at
HANTLUK/PauliDecomposition@932ce3926 (i.e. constant-factor improvements,
rather than complexity improvements).  This makes the "zero check" on
the recursions short-circuiting, which means rather matrix elements need
to be examined on average after each recursive step.  Further, the
constant-factor multiplication is tracked separately as a single scalar
throughout the recursion to avoid a full-matrix complex multiplication
at every recursive step (which is approximately six real-floating-point
operations per complex multiplication).

There is plenty of space in this implementation to reduce internal
memory allocations by reusing swap space, and to dispatch the different
components of the decomposition to threaded workers.  _Effective_
threading is more non-trivial, as a typical operator will have structure
that could be exploiting to more optimally dispatch the threads.  These
can be investigated later.

* Remove unused import

* Remove superfluous `num_qubits` argument

* Export `ZXPaulis` to Python space

* Add comment on array-builder logic

* Use `num_traits::Zero` trait for zero checking

* Use custom ilog2

* Use stdlib `ilog2`

59649 of 66781 relevant lines covered (89.32%)

206338.98 hits per line

Source Files on job 7507830319.1
  • Tree
  • List 924
  • Changed 25
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 7507830319
  • 52affa57 on github
  • Prev Job for on gh-readonly-queue/main/pr-11133-e573245207d3cf633617ef8e9311df684c449bfc (#7506910640.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