qiskit-textbook icon indicating copy to clipboard operation
qiskit-textbook copied to clipboard

[3.7] fix qubit order inconsistency (addressing #1462)

Open jasonchadwick opened this issue 1 year ago • 2 comments

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) to qc.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.

jasonchadwick avatar Aug 02 '22 15:08 jasonchadwick

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 02 '22 15:08 CLAassistant