Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-luo committed Jun 20, 2019
1 parent b5f17a8 commit cc8f44c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/examples/QFT.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ and over on different qubits, and put a Hadamard gate
to `i`th qubit to construct `i`-th `B` block.

```julia
B(n, k) = chain(n, j==k ? put(k=>H) : A(j, k) for j in i:n)
B(n, k) = chain(n, j==k ? put(k=>H) : A(j, k) for j in k:n)
```

We need to input the total number of qubits `n` here because we have to iterate
Expand All @@ -74,7 +74,7 @@ through from `k`-th location to the last.
Now, let's construct the circuit by chaining all the `B` blocks together

```julia
qft(n) = chain(B(n, i) for i in 1:n)
qft(n) = chain(B(n, k) for k in 1:n)

qft(4)
```
Expand Down

0 comments on commit cc8f44c

Please sign in to comment.