diff --git a/samples/getting_started/QuantumHelloWorld.qs b/samples/getting_started/QuantumHelloWorld.qs index fa12f83834..8d20aac944 100644 --- a/samples/getting_started/QuantumHelloWorld.qs +++ b/samples/getting_started/QuantumHelloWorld.qs @@ -5,6 +5,7 @@ /// This is one of the simplest Q# programs that contains quantum part. /// This code prints the message then allocates a qubit and immediately measures it. /// Since the qubit starts in |0〉 state such measurement will always yield `Zero`. +@EntryPoint() operation Main() : Result { // Print the message (when running on a simulator). Message("Hello world!"); @@ -14,7 +15,7 @@ operation Main() : Result { // Measure then reset the qubit. Last statement returns result from `Main`. // Measurement result is `Zero` as the qubit is in |0〉 state. - MResetZ(qubit) + return MResetZ(qubit) // Note, that `qubit` is automatically deallocated at the end of the block. }