qiskit-textbook
qiskit-textbook copied to clipboard
[3.7] fix qubit order inconsistency (addressing #1462)
Changes made
- Changed the order of swaps in the
c_amod15
function to correctly apply multiplication mod 15 (instead of division mod 15) - Initialize qubits 8-11 to state $\ket{0001}$ instead of $\ket{1000}$ by changing
qc.x(3+n_count)
toqc.x(n_count)
Justification
End result of notebook looks the same as before, but qubit ordering is now consistent with Qiskit convention (where lower-indexed bits have lower value). Fixes #1462.
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB