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

Prepare correct |0001> in the auxiliary register #2125

Closed
wants to merge 1 commit into from

Conversation

derwind
Copy link
Contributor

@derwind derwind commented Jun 10, 2023

Changes

Prepare correct |0001> in the auxiliary register.

Implementation details

In the previous code, the index was 3+N_COUNT, so the auxiliary register was prepared with |8> = |1000>. Now the index is fixed so that |1> = |0001> is prepared.

How to read this PR

Screenshots

In the previous codes (i.e. before this PR), if we insert display(qc.draw('mpl', scale=.6, fold=-1)) just after qc.measure in qpe_amod15 and run the last loop in the textbook, the attached image is displayed:

qpe_amod15

Copy link
Member

@frankharkins frankharkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derwind sorry I missed this. Can you make this PR to Qiskit/textbook instead please?

@derwind
Copy link
Contributor Author

derwind commented Jun 23, 2023

@frankharkins OK. I created an essentially equivalent PR at Qiskit/textbook#53.

@vabarbosa
Copy link
Contributor

closing this in favor of Qiskit/textbook#53

@vabarbosa vabarbosa closed this Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants