qdk icon indicating copy to clipboard operation
qdk copied to clipboard

Allow some updates to "dynamic array" in adaptive profile

Open DmitryVasilevsky opened this issue 1 year ago • 2 comments

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.

Image

But replacing this array elements with individual variables works fine.

Image

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.

DmitryVasilevsky avatar Dec 19 '24 00:12 DmitryVasilevsky

Could be in this list: https://github.com/microsoft/qsharp/issues/1306

DmitryVasilevsky avatar Dec 19 '24 00:12 DmitryVasilevsky

Let's discuss as part of the bigger "Arrays are terrible, what should we do?" discussion.

billti avatar May 06 '25 21:05 billti