microsoft / qsharp-language

Official repository for design of the quantum programming language Q# and its core libraries
MIT License
235 stars 56 forks source link

QIR: consider specifying the expected behaviour in error cases such as out of bounds access to arrays #30

Closed IrinaYatsenko closed 3 years ago

IrinaYatsenko commented 3 years ago

Currently, few of the quantumrt__* methods prescribe what should happen in case of an error. For example:

Leaving those cases unspecified means undefined behaviour, specific to each vendor implementation of the runtime. While it's a possible choice, it might be worth to consider being more prescriptive. And if we choose to go with UB, the spec should probably explicitly state so in the overview section.