We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if
From microsoft/qsharp-language#130:
Add sugar to the language so that this: if qubit { swap(a, b); other_thing(b, c); } becomes this: Controlled swap([qubit], (a, b)); Controlled other_thing([qubit], (b, c)); If the sugar produces bad results (e.g. attempting to control an operation that has no controlled variant), that's a compile error. Note that if b { f(c, d); } is fewer characters than Controlled f([b], (c, d)), is easier to type, and IMO is easier to read.
Add sugar to the language so that this:
if qubit { swap(a, b); other_thing(b, c); }
becomes this:
Controlled swap([qubit], (a, b)); Controlled other_thing([qubit], (b, c));
If the sugar produces bad results (e.g. attempting to control an operation that has no controlled variant), that's a compile error.
Note that if b { f(c, d); } is fewer characters than Controlled f([b], (c, d)), is easier to type, and IMO is easier to read.
if b { f(c, d); }
Controlled f([b], (c, d))
The text was updated successfully, but these errors were encountered:
There's no plan to address this currently. We will revisit this in the future if we get more feedback along these lines.
Sorry, something went wrong.
No branches or pull requests
From microsoft/qsharp-language#130:
The text was updated successfully, but these errors were encountered: