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

Qiskit / qiskit / 14841136329
88%

Build:
DEFAULT BRANCH: main
Ran 05 May 2025 04:41PM UTC
Jobs 1
Files 806
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

05 May 2025 03:36PM UTC coverage: 87.889% (-0.02%) from 87.908%
14841136329

push

github

web-flow
Bug fixes in Solovay Kitaev Decomposition (#14217)

* Fix _compute_rotation_axis method

The method used to return [0, 0, 0] for rotation axis when theta is very close to 0 (and yet not within 1e010).
This commit fixes this by noting that the rotation axis of an SO(3) matrix is simply the eigenvector of this
matrix corresponding to eigenvalue 1.

* Fixes related to SU(2) vs. SO(3)

The implemented algorithm has a global phase uncertainty of +-1, due to approximating not the
original SU(2) matrix but its projection onto SO(3). This fixes the global phase of the
computed approximation.

In addition, the product_su2 matrix in GateSequence was not correctly computed in many cases,
leading to incorrect values when using this attribute. Since this is not needed for the actual
algorithm (and spends unnecessary effort for computing it), this also completely removes this
attribute.

Co-authored-by: Almudena Carrera Vazquez <almudenacarreravazquez@hotmail.com>

* Fix the tests.

One of the tests was simply wrong because the reference circuit has the wrong global phase.
The tests that check the gates in the final decomposition should not assume that SGate is included and SdgGate is not.

* reno

* fix to the global phase

* bug fix (forgetting that gate_matrix_su2 is not SU(2) was a sequence)

* adding test

* Restoring the previous fast code for _compute_rotation_axis based on Rodrigues formula, while additionally handling the case of 180-degree rotation

* removing old code

* review comments

* switching back to using _to_dag and _to_circuit

I actually no longer think that these methods would ever return a circuit with unitary gates, so it does not really matter

* Addressing review comments

* pass over release notes combining the original and the suggested wordings

* Update releasenotes/notes/fix-sk-decomposition-23da3ee4b6a10d62.yaml

Co-authored-by: Julien Gacon <gaconju@gmail.com>

---------

Co-authored-by: Almudena Carrera Vazquez <almudenacarreravaz... (continued)

27 of 41 new or added lines in 4 files covered. (65.85%)

24 existing lines in 3 files now uncovered.

74564 of 84839 relevant lines covered (87.89%)

434017.97 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
85.29
0.0% qiskit/synthesis/discrete_basis/generate_basis_approximations.py
13
81.4
-14.44% qiskit/synthesis/discrete_basis/commutator_decompose.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.78
0.0% crates/accelerate/src/unitary_synthesis.rs
5
92.73
0.0% crates/qasm2/src/lex.rs
18
96.68
-0.46% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 14841136329.1 05 May 2025 04:41PM UTC 806
87.89
GitHub Action Run
Source Files on build 14841136329
  • Tree
  • List 806
  • Changed 7
  • Source Changed 4
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14841136329
  • 68926088 on github
  • Prev Build on main (#14839895199)
  • Next Build on main (#14842203967)
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