Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion samples/getting_started/QuantumHelloWorld.qs
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
Expand All @@ -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.
}