microsoft / qsharp

Azure Quantum Development Kit, including the Q# programming language, resource estimator, and Quantum Katas
https://microsoft.github.io/qsharp/
MIT License
423 stars 86 forks source link

Combining `@Config(Base)` with other options behaves unexpectedly #1621

Open swernli opened 3 months ago

swernli commented 3 months ago

When combining multiple config attributes to control conditional compilation, the "Base" flag that means "no capabilities" ends up combining incorrectly. Something marked as both "Base" and "Adaptive" should never be in the compilation, because something cannot both match "no capabilities" and the "Adaptive" capability. Instead, it shows up for anything that isn't base profile. Rather than trying to make these combos work, we should disallow "Base" from combining with anything (it's only valid to ask for "has no capabilities" in its own and not when combined with anything else).