Skip to content

Commit

Permalink
Improve type docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhartman committed Feb 26, 2025
1 parent 1f439a0 commit 166d7b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qiskit/circuit/classical/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
All types have a :attr:`~Type.const` field to indicate their const-ness. When the result type of
an expression is constant, the expression is considered a constant expression. Constant
expressions can be used in certain contexts that aren't valid for runtime-initialized variables.
This is not to be confused with the concept of a ``const`` variable in languages like C, where
the variable has a well-defined but immutable storage location. Qiskit's definition of const-ness
is more similar to C++'s ``constexpr``.
Note that :class:`Uint` defines a family of types parametrized by their width; it is not one single
type, which may be slightly different to the 'classical' programming languages you are used to.
Expand Down

0 comments on commit 166d7b2

Please sign in to comment.