Skip to content

Commit

Permalink
Update QPY version 14 desc.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhartman committed Feb 18, 2025
1 parent c6eab02 commit edd7806
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion qiskit/qpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit edd7806

Please sign in to comment.