diff options
author | Peiran Yao <xavieryao@live.cn> | 2021-11-01 15:22:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 22:22:59 +0100 |
commit | c33c369826d11bd8c90f78ac58c1819fe99b8562 (patch) | |
tree | aaa5fce72bf23d641258c643b27ed43cb89074aa | |
parent | c465acbc3a150fa3c3f8350482075e7daec47ff7 (diff) |
Fix a variable name typo in qsharp.html.markdown (#4240)
`q` is not defined, instead it should be `qs`.
-rw-r--r-- | qsharp.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
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]); |