microsoft / qsharp-compiler

Q# compiler, command line tool, and Q# language server
https://docs.microsoft.com/quantum
MIT License
684 stars 170 forks source link

Hardware capabilities as warning. #1554

Closed anpaz closed 1 year ago

anpaz commented 1 year ago

This changes the compiler to report missing hardware capabilities as warnings instead of errors. Sometimes we still want compilation to succeeded for running new tests or as the hardware capabilities expand. On a next iteration, we'll add to the compiler the ability to treat warnings as errors (similar to https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings), to finally, make these warnings by treated as errors by default.

cesarzc commented 1 year ago

So, the overview of this is that hardware capabilities errors will now be warnings? And in the future, the compiler will have a property to treat these warnings as errors, but they'll keep being warnings by default?

anpaz commented 1 year ago

So, the overview of this is that hardware capabilities errors will now be warnings? And in the future, the compiler will have a property to treat these warnings as errors, but they'll keep being warnings by default?

@cesarzc, they'll always be reported as warnings by the compiler; however the Quantum SDK will mark them as errors by default.