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

Qiskit / qiskit / 11730837001
88%

Build:
DEFAULT BRANCH: main
Ran 07 Nov 2024 08:53PM UTC
Jobs 1
Files 914
Run time 3min
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 2024 08:31PM UTC coverage: 88.912% (-0.001%) from 88.913%
11730837001

push

github

web-flow
Reorder Pauli terms before Trotterization (#12925)

* Added option to reorder Paulis before Trotterization

Reordering the terms of a Pauli operator can reduce the depth of the evolution
circuit if using the Lie-Trotter or Suzuki-Trotter methods. This commit adds a
method `synthesis.evolution.product_formula.reorder_paulis` that does just that,
based on a greedy graph coloring heuristic. This commit also adds the `reorder` option in
the `ProductFormula`, `LieTrotter` and `SuzukiTrotter` constructors to allow for
reordering before synthesis.

* Added unit tests for Pauli reordering

* reorder_paulis acts as the identity if the operator has only one term

Before that, if reorder_paulis was given a single-term SparsePauliOp object, it
would return it encapsulated in a list. Now, it returns it as is.

* Reorder Pauli terms by default

* reorder_paulis is deterministic and order-invariant

* Fixed SuzukiTrotter unit tests

* No Pauli reordering by default

* Added Pauli reordering option in QDrift

* Typset math correctly

* Reorder ops individually

If `reorder_paulis` is given a list of operators, then they are reordered and returned individually. Before this co
mmit, they used to be added all together and then reordered, which always resulted in a single operator.

* Option to change graph coloring heuristic

* add plugin

* consistent with rustiq

* rm print, fix sorting

* lint & docs

* Fix QDrift reordering

* review comments

- add reno
- docs
- safer list concat

* rm dead code

* fix default value

* missed one

thanks Matthew!

---------

Co-authored-by: Julien Gacon <jules.gacon@googlemail.com>
Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

45 of 47 new or added lines in 6 files covered. (95.74%)

13 existing lines in 3 files now uncovered.

79049 of 88907 relevant lines covered (88.91%)

362062.51 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
94.9
0.38% qiskit/synthesis/evolution/product_formula.py
1
87.18
-2.01% qiskit/synthesis/evolution/qdrift.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.2
-0.12% crates/accelerate/src/unitary_synthesis.rs
6
91.98
-0.75% crates/qasm2/src/lex.rs
6
96.69
0.0% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 11730837001.1 07 Nov 2024 08:53PM UTC 914
88.91
GitHub Action Run
Source Files on build 11730837001
  • Tree
  • List 914
  • Changed 79
  • Source Changed 6
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #11730837001
  • 4251d01e on github
  • Prev Build on gh-readonly-queue/main/pr-13361-58997a54406d4dd7eecd14ae58aec33ba55e0b0a (#11728000116)
  • Next Build on main (#11732312995)
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