munich-quantum-toolkit / munich-quantum-toolkit/core
✨ Add support for `array` in the OpenQASM frontend
@simon1hofmann is already working on this.
Since Sep 17, 2026.
- Dominant language
- C++
- Stars
- 133
- Forks
- 73
- Avg merge
- 17h 34m
- Merged PRs (30d)
- 261
Description
🤖 AI text below 🤖
The OpenQASM frontend treats array as an unsupported reserved keyword, so it is rejected everywhere, including as an identifier:
array[int, 4] values; // error: reserved keyword 'array' is not supported
int array = 0; // error: reserved keyword 'array' is not supported
Arrays are needed whenever a program takes a table of classical values. A uniformly controlled rotation, for example, needs one angle per control state, which OpenQASM 3 expresses as array[angle, N]. A fixed-width angle[N] is a single angle held to N bits of precision, so it cannot stand in for one.
Ideally, an array is translated to a tensor. The conversion to jeff could handle this out of the box.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.