mirror of https://github.com/Qiskit/qiskit.git
![]() * 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 annotation handling in `BoxOp.replace_blocks` * Add transpilation integration test * Fix GenericBackendV2 test * Add `iter_namespaces` test * Add QPY tests * Add release note * Fix parameter documentation * Make test logic errors exceptions |
||
---|---|---|
.. | ||
basic_provider | ||
fake_provider | ||
__init__.py | ||
fake_mumbai_v2.py | ||
test_backend_v2.py | ||
test_options.py |