Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Prepare correct |0001> in the auxiliary register.
Browse files Browse the repository at this point in the history
  • Loading branch information
derwind committed Jun 23, 2023
1 parent 96b7457 commit 529dbd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notebooks/ch-algorithms/shor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@
" qc = QuantumCircuit(4+N_COUNT, N_COUNT)\n",
" for q in range(N_COUNT):\n",
" qc.h(q) # Initialize counting qubits in state |+>\n",
" qc.x(3+N_COUNT) # And auxiliary register in state |1>\n",
" qc.x(N_COUNT) # And auxiliary register in state |1>\n",
" for q in range(N_COUNT): # Do controlled-U operations\n",
" qc.append(c_amod15(a, 2**q),\n",
" [q] + [i+N_COUNT for i in range(4)])\n",
Expand Down

0 comments on commit 529dbd5

Please sign in to comment.