Allow some updates to "dynamic array" in adaptive profile
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 212
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 65
Description
This page describes what we can do with dynamic arrays in adaptive profile.
https://github.com/microsoft/qsharp/wiki/QIR#use-of-dynamically-sized-array
Specifically the following example doesn't work.

But replacing this array elements with individual variables works fine.

Consider supporting this scenario as array size doesn't change here. It is useful to have arrays as a way to group qubits and other types into registers of statically known size. In fact, most array sizes are statically known.
Contributor guide
Research direction
Start with the linked QIR wiki section and reproduce the dynamic-array example in an adaptive profile. Compare it with the version using individual variables, then identify the compiler entry point that rejects updates to arrays whose size remains unchanged. Done means the documented dynamic-array scenario works while preserving the existing restriction on changing array size.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, quantum-computing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100