QuTech-Delft / libqasm

libQASM: Library to parse cQASM files
https://arxiv.org/abs/1805.09607
Other
15 stars 16 forks source link

V3 Extended: New Types #189

Closed rturrado closed 5 months ago

rturrado commented 6 months ago

Add axis, bool, int, float, bool array, int array, and float array definitions and initializations.

Initialization lists are treated independently, i.e., without considering to what they will be assigned. Initialization lists parsing yields a constant array of a given type. In order to determine this type, we walk the list, and keep track of the highest type to which we can promote. For example, for a list containing the types bool and int, that type would be int. An initialization list can only contain elements of type bool, int, or float.

For a variable declaration including an initialization:

Changes to v1x files

rturrado commented 5 months ago

Great, thanks!