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

Qiskit / qiskit / 6469801705
88%

Build:
DEFAULT BRANCH: main
Ran 10 Oct 2023 01:45PM UTC
Jobs 1
Files 1265
Run time 27s
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

10 Oct 2023 11:36AM UTC coverage: 87.012% (-0.01%) from 87.025%
6469801705

push

github

web-flow
Better align 1q euler decomposition output to multiples of π/2 (#10789)

* Better align 1q euler decomposition output to multiples of π/2

This commit updates the euler decomposer to better align the parameter
outputs to be multiples of π/2 when possible to enable the circuit to
be run under a clifford simulator.

Previously the angle was calculated as:

```
phi = angle(u11 * (det**(-0.5))) + angle(u10 * (det**(-0.5)))
```

which has been replaced with:

```
phi = angle(u11) + angle(u10) - angle(det)
```

The algebra to get the new expression is:

```
phi = angle(u11 * (det**(-0.5))) + angle(u10 * (det**(-0.5)))
    # assumes particular phase convention so not guaranteed to be the
    # valid interpretation (though it probably is).
    = angle(u11) - 0.5*angle(det) + angle(u10) - 0.5*angle(det)
    = angle(u11) + angle(u10) - angle(det)
```

A couple of tests are updated as they were testing for exact circuit
outputs and the synthesis is returning equivalent by different results
in those cases.

Co-authored-by: aeddins-ibm <60495383+aeddins-ibm@users.noreply.github.com>

* Simplify calculation

Given the same phase convention the calculation of theta and phase can
be simplified to remove the need of computing the coeff. This commit
implements this change which should speed up the calculation slighty as
we're doing less work to reach an equivalent result.

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

* Remove complex_phase function

The complex phase function previously defined in
euler_one_qubit_decomposer.rs was duplicated with an existing `arg()`
method of the Complex<T> type from num-complex. This commit removes the
duplicated definition in favor of the built-in method.

* Try removing rz gate from qpy tests to side step differing decomposition of controlled gate

* Update crates/accelerate/src/euler_one_qubit_decomposer.rs

Co-authored-by: aeddins-ibm <60495383+aeddins-ibm@users.noreply.github.com>

---------

Co-authored-by: aeddins-ibm <... (continued)

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

74157 of 85226 relevant lines covered (87.01%)

91311.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6469801705.1 10 Oct 2023 01:45PM UTC 0
87.01
GitHub Action Run
Source Files on build 6469801705
Detailed source file information is not available for this build.
  • Back to Repo
  • b77f3c5b on github
  • Prev Build on gh-readonly-queue/main/pr-10997-cecb7889372342e3c2ca713d5c767ad793688842 (#6468664954)
  • Next Build on main (#6470647765)
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