You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
The classes generated for Q# callables contains several built-in members with names that are not surrounded by __. This means they are valid Q# identifiers. If you declare a Q# callable with the same name as one of these members, the C# code does not compile because the member name conflicts with the constructor name.
Here is an example:
function Init() : Unit {
Message("Hello quantum world!");
}
produces this C# compile error:
Program.qs(22,30): error CS0542: '"Init": member names cannot be the same as their enclosing type.
Here is a list of names I tried that are valid Q# but produce invalid C#:
Body
AdjointBody if the operation is adjointable.
ControlledBody if the operation is controllable.
ControlledAdjointBody if the operation is controllable and adjointable.
Info
Init
Run
__dataIn
__dataOut
The fully qualified name of any callable used, with dots removed, such as MicrosoftQuantumIntrinsicMessage for the example above.