From c33c369826d11bd8c90f78ac58c1819fe99b8562 Mon Sep 17 00:00:00 2001 From: Peiran Yao Date: Mon, 1 Nov 2021 15:22:59 -0600 Subject: Fix a variable name typo in qsharp.html.markdown (#4240) `q` is not defined, instead it should be `qs`. --- qsharp.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qsharp.html.markdown') diff --git a/qsharp.html.markdown b/qsharp.html.markdown index b256043c..10015d7f 100644 --- a/qsharp.html.markdown +++ b/qsharp.html.markdown @@ -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]); -- cgit v1.2.3 From 787e9710b9af69eec7dcb72f12af34aef870951e Mon Sep 17 00:00:00 2001 From: Boris Verkhovskiy Date: Wed, 3 Apr 2024 04:16:08 -0700 Subject: Syntax highlighting --- qsharp.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qsharp.html.markdown') diff --git a/qsharp.html.markdown b/qsharp.html.markdown index 10015d7f..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 // -- cgit v1.2.3