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

Qiskit / qiskit / 10042691155
88%

Build:
DEFAULT BRANCH: main
Ran 22 Jul 2024 02:45PM UTC
Jobs 1
Files 850
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

22 Jul 2024 01:42PM UTC coverage: 89.932% (-0.01%) from 89.945%
10042691155

push

github

web-flow
Rewrite OpenQASM 3 exporter symbol table (#12776)

* Rewrite OpenQASM 3 exporter symbol table

This rewrites the symbol handling of the OpenQASM 3 exporter to decouple
object identities from the necessary object identifiers.  As part of
this, we use the same trick of standard-gate reparametrisation to
produce gate-definition sources for Qiskit built-ins, which fixes many
cases of bad parametrisation of gates like `rzx`.

This kind of rewrite was necessary to fix the now-bad assumption within
the OQ3 exporter that "gate identity" is always static within a circuit.
Since standard gate `Gate` instances are now only generated on demand,
there is no guarantee of stability of them.  The fix to the definition
source for these makes them independent of object identity.
User-defined gates can still use the identity, as these are still
guaranteed static.

This commit fixes almost all of the "bad parametrisation" tests in the
test suite.  There are several other changes in the test suite
necessary:

* since the uniqueness of the identifier is now independent of how the
  lookup of a Qiskit object works, there is no need to include the
  highly non-deterministic `id` in the generated symbols for user gates.
  Several tests changed to use the new, simple count-based unique names.

* the escaping and uniqueness rules now apply uniformly to all gate
  definitions, fixing several bad test cases that previously were
  testing invalid OpenQASM 3.

* the escaping rules changed slightly for naming collisions with
  keywords, making them slightly more consistent with how other renaming
  rules worked.

* Add test for bug fix for issue #7335

* Rename qiskit gates whose names are OQ3 hardware qubit identifiers

If a custom qiskit gate is given a name that is a valid identifer for a
hardware qubit in OQ3, then, before this commit, the name would not be
escaped when writing the OQ3 gate definition.

This commit fixes this by escaping the leading dollar sign as it would
be in... (continued)

235 of 252 new or added lines in 4 files covered. (93.25%)

15 existing lines in 3 files now uncovered.

65957 of 73341 relevant lines covered (89.93%)

287145.47 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
5
85.11
-0.23% crates/circuit/src/operations.rs
12
95.66
-0.47% qiskit/qasm3/exporter.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
93.38
1.27% crates/qasm2/src/lex.rs
2
88.35
-0.36% qiskit/transpiler/passes/synthesis/unitary_synthesis.py
12
97.15
-0.92% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 10042691155.1 22 Jul 2024 02:45PM UTC 850
89.93
GitHub Action Run
Source Files on build 10042691155
  • Tree
  • List 850
  • Changed 45
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 59fc4959 on github
  • Prev Build on main (#10037744058)
  • Next Build on main (#10043099543)
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