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

Qiskit / qiskit / 15452340195
88%

Build:
DEFAULT BRANCH: main
Ran 04 Jun 2025 09:15PM UTC
Jobs 1
Files 827
Run time 4min
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

04 Jun 2025 08:20PM UTC coverage: 88.044% (-0.002%) from 88.046%
15452340195

push

github

web-flow
Annotation serialisation framework (#14439)

* Add `Annotation` base class and `BoxOp` support

This adds the basics of support for a custom annotation framework to
Qiskit.  An `Annotation` is a piece of custom-defined information (from
Qiskit's perspective; it's most likely to be transpiler-pass defined,
even downstream) that is localised to a particular instruction or scope.
Currently, the only supported location for use of annotations is `box`.

The meaning of the `Annotation` may currently be completely custom.  We
expect in the future to have a coarse set of validity ranges that
annotations associate themselves with, to allow the transpiler to
enforce that annotations are not violated by compiler passes that do not
understand them.  For now, it's up to the user not to call compiler
passes that invalidate annotations.

Annotations are closely related to the OpenQASM 3 concept of the same
name.  Serialisation to and from OpenQASM 3 and QPY is supported by
additional user-defined classes, whose interfaces are defined in
`qiskit.circuit.annotation`.  QPY version 15 is introduced, which makes
it a collaborative serialisation format, with well-defined slots in the
output stream for custom serialisers to store their data, including
state.  OpenQASM 3 annotation serialisers must be stateless, since that
language does not provide (nor intend) the same arbitrary co-operation.
QPY has this additional support for statefulness because we anticipate
larger amounts of data being transferred in annotations in QPY format
for subsequent processing.

* Complete documentation of subclassing

* Fix circuit equality of boxes

* Add support for annotations in `qasm3.load` API

This does a small amount of version negotiation with
`qiskit_qasm3_import`, which in turn checks the version of Qiskit.

* Include comment on equality

* Add OpenQASM 3 import/export tests

* Fix previous parameter-expression QPY documentation

* Support `BoxOp` in `GenericBackendV2`

* Fix annot... (continued)

222 of 247 new or added lines in 16 files covered. (89.88%)

13 existing lines in 5 files now uncovered.

82854 of 94105 relevant lines covered (88.04%)

517650.06 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
98.11
0.07% qiskit/circuit/controlflow/box.py
1
95.32
-0.11% qiskit/qasm3/exporter.py
2
95.56
qiskit/circuit/annotation.py
4
83.33
-2.12% qiskit/qasm3/__init__.py
5
93.78
-0.09% qiskit/circuit/quantumcircuit.py
12
88.75
-0.19% qiskit/qpy/binary_io/circuits.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.23
-0.23% crates/qasm2/src/expr.rs
1
94.57
0.0% crates/transpiler/src/passes/unitary_synthesis.rs
1
87.88
0.92% qiskit/qpy/interface.py
3
75.16
-0.09% crates/circuit/src/symbol_expr.rs
7
91.98
-1.25% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 15452340195.1 04 Jun 2025 09:15PM UTC 827
88.04
GitHub Action Run
Source Files on build 15452340195
  • Tree
  • List 827
  • Changed 19
  • Source Changed 15
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15452340195
  • a357f54f on github
  • Prev Build on gh-readonly-queue/main/pr-14426-1e25f42b6fd39a9cdd1b78e87ec6f6ef0bb12b6f (#15451409865)
  • Next Build on main (#15454820188)
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