Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

[3.9] Fix qft function #1550

Merged
merged 1 commit into from Feb 24, 2023
Merged

Conversation

lucasvanmol
Copy link
Contributor

Changes made

Fix the qft function to work for n != 4

Justification

If someone wants to vary the number of counting qubits, the function fails. Note that simply varying t a few cells below still does not work due to the hardcoded 4 in this cell:

qft_dagger = qft(4).to_gate().inverse()
qft_dagger.label = "QFT†"

although generalising to use the t variable instead would require some re-ordering.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CLAassistant
Copy link

CLAassistant commented Feb 17, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@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.

Good catch, thanks!

@frankharkins frankharkins merged commit afd4880 into qiskit-community:main Feb 24, 2023
@lucasvanmol lucasvanmol deleted the patch-1 branch February 25, 2023 13:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants