Add support for non-standalone variables to the C API
Author: eliarbelCreated Sep 30, 2026Updated Sep 30, 2026
Labelstheme: C API
The C API for classical expression inspection can currently reason only about standalone variables. We need to extend the API to allow inspection of classical expressions that contain old-style variables (e.g. created from classical registers), to allow users to trace these variables back to their source.
In general, given a variable, the new API should provide a way to extract the kind of the variable (i.e. Standalone, Bit, Register) and supply functions to extract the bit index and a classical register view for the Bit and Register kinds, respectively.
Source: Qiskit/qiskit