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

Qiskit / qiskit-terra
87%
main: 87%

Build:
Build:
LAST BUILD BRANCH: sparsepauliop_default_init
DEFAULT BRANCH: main
Repo Added 12 Jun 2019 07:02PM UTC
Files 1268
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

LAST BUILD ON BRANCH mergify/bp/stable/0.25/pr-10652
branch: mergify/bp/stable/0.25/pr-10652
CHANGE BRANCH
x
Reset
  • mergify/bp/stable/0.25/pr-10652
  • dnm-fix-retrigger-wheel-builds
  • jaygambetta-patch-1
  • main
  • mergify/bp/stable/0.24/pr-10126
  • mergify/bp/stable/0.24/pr-10148
  • mergify/bp/stable/0.24/pr-10176
  • mergify/bp/stable/0.24/pr-10373
  • mergify/bp/stable/0.24/pr-10376
  • mergify/bp/stable/0.24/pr-10389
  • mergify/bp/stable/0.24/pr-10395
  • mergify/bp/stable/0.24/pr-10405
  • mergify/bp/stable/0.24/pr-10411
  • mergify/bp/stable/0.24/pr-10419
  • mergify/bp/stable/0.24/pr-10439
  • mergify/bp/stable/0.25/pr-10437
  • mergify/bp/stable/0.25/pr-10438
  • mergify/bp/stable/0.25/pr-10443
  • mergify/bp/stable/0.25/pr-10452
  • mergify/bp/stable/0.25/pr-10455
  • mergify/bp/stable/0.25/pr-10463
  • mergify/bp/stable/0.25/pr-10466
  • mergify/bp/stable/0.25/pr-10469
  • mergify/bp/stable/0.25/pr-10471
  • mergify/bp/stable/0.25/pr-10476
  • mergify/bp/stable/0.25/pr-10478
  • mergify/bp/stable/0.25/pr-10479
  • mergify/bp/stable/0.25/pr-10484
  • mergify/bp/stable/0.25/pr-10500
  • mergify/bp/stable/0.25/pr-10503
  • mergify/bp/stable/0.25/pr-10506
  • mergify/bp/stable/0.25/pr-10511
  • mergify/bp/stable/0.25/pr-10512
  • mergify/bp/stable/0.25/pr-10522
  • mergify/bp/stable/0.25/pr-10523
  • mergify/bp/stable/0.25/pr-10530
  • mergify/bp/stable/0.25/pr-10532
  • mergify/bp/stable/0.25/pr-10537
  • mergify/bp/stable/0.25/pr-10538
  • mergify/bp/stable/0.25/pr-10543
  • mergify/bp/stable/0.25/pr-10550
  • mergify/bp/stable/0.25/pr-10555
  • mergify/bp/stable/0.25/pr-10558
  • mergify/bp/stable/0.25/pr-10580
  • mergify/bp/stable/0.25/pr-10598
  • mergify/bp/stable/0.25/pr-10610
  • mergify/bp/stable/0.25/pr-10619
  • mergify/bp/stable/0.25/pr-10639
  • mergify/bp/stable/0.25/pr-10655
  • mergify/bp/stable/0.25/pr-8967
  • mergify/bp/stable/0.25/pr-9536
  • revert-10124-feature/passmanager-refactoring-pr1
  • revert-10454-revert-pass-manager-module
  • stable/0.23
  • stable/0.24
  • stable/0.25

17 Aug 2023 04:54PM UTC coverage: 87.228% (-0.01%) from 87.242%
5893722836

Pull #10659

github

mergify[bot]
Fix performance of Sabre rust<->Python boundary (#10652)

* Fix performance of Sabre rust<->Python boundary

In #10366 the SabreLayout and SabreSwap passes were refactored to
support nested control flow blocks. As part of that refactor a new
struct SabreResult was created to store the nested results for each
block. This new class however resulted in PyO3 cloning the full swap map
on every access. Since we have at least 1 access per gate in the circuit
(and another one for each swap) this extra clone() adds a lot of extra
overhead for deep circuits. In extreme cases this regression could be
quite extreme. To address this the result format is changed to be a
tuple (as it was originally), while this is less ergonomic the advantage
it provides is that for nested objects it moves the rust object to the
pyo3 interface so we avoid a copy as Python owns the object on the
return. However, for control flow blocks we're still using the
SabreResult class as it simplifies the internal implementation (which is
why #10366 introduced the struct). The potential impact of this is
mitigated by switching to only a single clone per control flow block,
by only accessing the SabreResult object's attribute on each recursive
call. However, if it is an issue in the future we can work on flattening
the nested structure before returning it to python to avoid any clones.

Fixes #10650

* Simplify recursive call logic in _apply_sabre_result

This commit simplifies the logic in the recursive call logic in
_apply_sabre_result to always use a tuple so we avoid an isinstance
check.

Co-authored-by: Kevin Hartman <kevin@hart.mn>

---------

Co-authored-by: Kevin Hartman <kevin@hart.mn>
(cherry picked from commit e6c431e30)
Pull Request #10659: Fix performance of Sabre rust<->Python boundary (backport #10652)

25 of 25 new or added lines in 3 files covered. (100.0%)

74091 of 84939 relevant lines covered (87.23%)

61109.08 hits per line

Relevant lines Covered
Build:
Build:
84939 RELEVANT LINES 74091 COVERED LINES
61109.08 HITS PER LINE
Source Files on mergify/bp/stable/0.25/pr-10652
  • Tree
  • List 1260
  • Changed 24
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
5893722836 mergify/bp/stable/0.25/pr-10652 Fix performance of Sabre rust<->Python boundary (#10652) * Fix performance of Sabre rust<->Python boundary In #10366 the SabreLayout and SabreSwap passes were refactored to support nested control flow blocks. As part of that refactor a new struc... Pull #10659 17 Aug 2023 05:34PM UTC mergify[bot] github
87.23
See All Builds (26816)
  • Repo on GitHub
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

© 2025 Coveralls, Inc