summaryrefslogtreecommitdiffhomepage
path: root/qsharp.html.markdown
diff options
context:
space:
mode:
authorBoris Verkhovskiy <boris.verk@gmail.com>2024-04-04 04:26:14 -0700
committerGitHub <noreply@github.com>2024-04-04 04:26:14 -0700
commit4d59048f0df8441e5ad2c2c440e8d54b0e9c11b6 (patch)
treefa2dbdd40da35b3c27f928f1112ea43193a7482e /qsharp.html.markdown
parentb38d4437120e700646a45dff68b7c4ff3f7109c0 (diff)
parent327001f58739489b41f6b1f7bbc8be900847b381 (diff)
Merge branch 'master' into patch-2
Diffstat (limited to 'qsharp.html.markdown')
-rw-r--r--qsharp.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/qsharp.html.markdown b/qsharp.html.markdown
index b256043c..04e697a4 100644
--- a/qsharp.html.markdown
+++ b/qsharp.html.markdown
@@ -9,7 +9,7 @@ filename: LearnQSharp.qs
Q# is a high-level domain-specific language which enables developers to write quantum algorithms. Q# programs can be executed on a quantum simulator running on a classical computer and (in future) on quantum computers.
-```C#
+```c#
// Single-line comments start with //
@@ -29,10 +29,10 @@ using (qs = Qubit[2]) {
// If you want to change the state of a qubit
// you have to do this by applying quantum gates to the qubit.
- H(q[0]); // This changes the state of the first qubit
+ H(qs[0]); // This changes the state of the first qubit
// from |0⟩ (the initial state of allocated qubits)
// to (|0⟩ + |1⟩) / sqrt(2).
- // q[1] = |1⟩; - this does NOT work, you have to manipulate a qubit by using gates.
+ // qs[1] = |1⟩; - this does NOT work, you have to manipulate a qubit by using gates.
// You can apply multi-qubit gates to several qubits.
CNOT(qs[0], qs[1]);