Q# is a programming language created in 2017.
#1603on PLDB | 7Years Old | 768Repos |
namespace main {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
@EntryPoint()
operation Main() : Unit {
Message("Hello, world!");
}
}
namespace Quantum.HelloWorld {
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Intrinsic;
operation HelloWorld() : Unit {
Message("Hello World");
}
}
namespace open as operation function body adjoint newtype controlled if elif else repeat until fixup for in while return fail within apply Adjoint Controlled Adj Ctl is self auto distribute invert intrinsic let set w/ new not and or use borrow using borrowing mutable
Feature | Supported | Example | Token |
---|---|---|---|
Conditionals | ✓ | ||
Functions | ✓ | ||
While Loops | ✓ | ||
Comments | ✓ | // A comment | |
Line Comments | ✓ | // A comment | // |
Strings | ✓ | " |