diff --git a/qiskit/qpy/__init__.py b/qiskit/qpy/__init__.py index 33fe69c35c5..15c2ffc7c8d 100644 --- a/qiskit/qpy/__init__.py +++ b/qiskit/qpy/__init__.py @@ -375,7 +375,24 @@ def open(*args): Version 14 ---------- -Version 14 added support for constant types to classical expressions. +Version 14 adds support for additional :class:`~.types.Type` classes, and adds support for +const-ness to existing types :class:`~.types.Bool` and :class:`~.types.Uint`. +The ``EXPR_TYPE_BOOL`` and ``EXPR_TYPE_UNIT`` structs are now replaced by ``EXPR_TYPE_BOOL_V14`` +and ``EXPR_TYPE_UINT_V14``, respectively. See the updated expression type table below. + +EXPR_TYPE +~~~~~~~~~ + +A :class:`~.types.Type` is encoded by a single-byte ASCII ``char`` that encodes the kind of type, +followed by a payload that varies depending on the type. The defined codes are: + +====================== ========= ================================================================= +Qiskit class Type code Payload +====================== ========= ================================================================= +:class:`~.types.Bool` ``b`` One `_Bool const`. + +:class:`~.types.Uint` ``u`` One ``uint32_t width``, followed by one ``_Bool const``. +====================== ========= ================================================================= .. _qpy_version_13: