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

Qiskit / qiskit / 8924853329
90%
main: 88%

Build:
Build:
LAST BUILD BRANCH: lightcone-fix
DEFAULT BRANCH: main
Ran 02 May 2024 01:55PM UTC
Jobs 1
Files 829
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

02 May 2024 01:38PM UTC coverage: 89.523% (+0.01%) from 89.512%
8924853329

push

github

web-flow
Add equivalence library entry for swap to ECR or CZ (#12312)

* Add equivalence library entry for swap to ECR or CZ

This commit adds two new equivalence library entries to cover the
conversion from a SWAP gate to either ecr or cz directly. These are
common 2q basis gates and without these entries in the equivalence
library the path found from a lookup ends up with a much less efficient
translation. This commit adds the two new entries so that the
BasisTranslator will use a more efficient decomposition from the start
when targeting these basis. This will hopefully result in less work for
the optimization stage as the output will already be optimal and not
require simplification.

Testing for this PR is handled automatically by the built-in testing
harness in test_gate_definitions.py that evaluates all the entries in
the standard equivalence library for unitary equivalence.

* Add name to annotated gate circuit in qpy backwards compat tests

* Fix equivalence library tests

As fallout from the addition of SingletonGate and
SingletonControlledGate we were accidentally not running large portions
of the unit tests which validate the default session equivalence
library. This test dynamically runs based on all members of the standard
gate library by looking at all defined subclasses of Gate and
ControlledGate. But with the introduction of SingletonGate and
SingletonControlledGate all the unparameterized gates in the library
were not being run through the tests. This commit fixes this to catch
that the swap definition added in the previous commit on this PR branch
used an incorrect definition of SwapGate using ECRGate. The definition
will be fixed in a follow up PR.

* Use a more efficient and actually correct circuit for ECR target

The previous definition of a swap gate using ECR rz and sx was incorrect
and also not as efficient as possible. This was missed because the tests
were accidently broken since #10314 which was fixed in the previous
commit. This c... (continued)

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

4 existing lines in 3 files now uncovered.

61703 of 68924 relevant lines covered (89.52%)

216588.53 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
88.02
-0.18% qiskit/transpiler/passes/synthesis/unitary_synthesis.py
1
94.03
-0.24% crates/qasm2/src/expr.rs
2
92.62
0.25% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 8924853329.1 02 May 2024 01:55PM UTC 829
89.52
GitHub Action Run
Source Files on build 8924853329
  • Tree
  • List 829
  • Changed 29
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c53984f1 on github
  • Prev Build on gh-readonly-queue/main/pr-12310-cadc6f17f549fb084067c3f79f44345a6214b523 (#8924660973)
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