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

Qiskit / qiskit / 8940031400
90%
main: 88%

Build:
Build:
LAST BUILD BRANCH: substitute_pi4_rotations
DEFAULT BRANCH: main
Ran 03 May 2024 02:05PM UTC
Jobs 1
Files 832
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

03 May 2024 01:49PM UTC coverage: 89.644% (+0.01%) from 89.631%
8940031400

push

github

web-flow
Adapt crates/qasm3 to work with recent versions of openqasm3_parser (#12087)

* Adapt crates/qasm3 to work with recent versions of openqasm3_parser

This commit adds no new features or capabilities to the importer. But it brings
the importer up to date with the latest version of openqasm3_parser as a preliminary
step in improving the importer.

The biggest change in openqasm3_parser is in handling stdgates.inc.  Upon encountering
`include "stdgates.inc" openqasm3_parser reads no file, but rather adds symbols to the
symbol table for gates in the standard library.

The function `convert_asg` in the importer calls oq3_semantics::symbols::SymbolTable.gates
which returns a `Vec` of information about each "declared" gate. The information is the
gate's name and signature and SymbolID, which is sufficient to do everything the importer
could do before this commit.

Encountering `Stmt::GateDefinition` now is a no-op rather than an error.  (This was
previously called `Stmt::GateDeclaration`, but importantly it is really a definition.)

How the standard library, and gates in general, are handled will continue to evolve.

A behavioral difference between this commit and its parent: Before if the importer
encountered a gate call before the corresponding definition an error would be raised. With
the current commit, the importer behaves as if all gate definitions were moved to the top
of the OQ3 program. However, the error will still be found by the parser so that the
importer never will begin processing statements.

The importer depends on a particular branch of a copy of openqasm3_parser. When
the commit is ready to merge, we will release a version of openqasm3_parser and
depend instead on that release.

See https://github.com/openqasm/openqasm/pull/517

* Remove unnecessary conversion `name.to_string()`

Response to reviewer comment https://github.com/Qiskit/qiskit/pull/12087/files#r1586949717

* Remove check for U gate in map_gate_ids

* This requires modifying th... (continued)

14 of 27 new or added lines in 2 files covered. (51.85%)

12 existing lines in 3 files now uncovered.

62257 of 69449 relevant lines covered (89.64%)

231164.78 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
13
72.4
-0.01% crates/qasm3/src/build.rs

Uncovered Existing Lines

Lines Coverage ∆ File
2
88.2
-0.18% qiskit/transpiler/passes/synthesis/unitary_synthesis.py
4
92.62
0.51% crates/qasm2/src/lex.rs
6
97.61
0.46% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 8940031400.1 03 May 2024 02:05PM UTC 832
89.64
GitHub Action Run
Source Files on build 8940031400
  • Tree
  • List 832
  • Changed 31
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 68f4b528 on github
  • Prev Build on main (#8938193817)
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