Skip to content

Improve the QFT example.#40

Merged
Mc-Zen merged 4 commits intoMc-Zen:mainfrom
michal-mnich:qft
Oct 13, 2025
Merged

Improve the QFT example.#40
Mc-Zen merged 4 commits intoMc-Zen:mainfrom
michal-mnich:qft

Conversation

@michal-mnich
Copy link
Contributor

State normalization should not be omitted, but the final swaps is more of a nice-to-have (the permutation looks pretty!).

Fix missing normalization by 1/sqrt(2).
Use `permute()` to reflect the final step in the QFT circuit.
@Mc-Zen
Copy link
Owner

Mc-Zen commented Oct 13, 2025

You are right about the normalization. I think in the book it was omitted for clarity of the point that was made and probably mentioned in the text.

The final permutations are of course not necessary and no one would actually implement them on quantum hardware but for display purposes, I guess why not!

@Mc-Zen
Copy link
Owner

Mc-Zen commented Oct 13, 2025

Thank you!

I will update the corresponding readme in a separate commit.

@Mc-Zen Mc-Zen merged commit bdfa55d into Mc-Zen:main Oct 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants