Skip to content

Commit 06f0478

Browse files
antalszavajosh146daniela-anguloKetpuntoG
authored
Add upper bound to summation of the QFT equation in QPE tutorial (#1606)
**Summary:** The expression for QFT in the QPE tutorial has a summation that could do with an upper bound and this PR adds that. --------- Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Daniela Angulo <42325731+daniela-angulo@users.noreply.github.com> Co-authored-by: Guillermo Alonso-Linaje <65235481+KetpuntoG@users.noreply.github.com>
1 parent aa5a3ab commit 06f0478

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

demonstrations_v2/tutorial_qpe/demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"When in doubt, take the Fourier transform"; or in our case, "When in doubt, take the quantum Fourier transform (QFT)".
8282
8383
.. math::
84-
\text{QFT}|\theta\rangle = \frac{1}{\sqrt{2^n}}\sum_{k=0} e^{2 \pi i\theta k} |k\rangle.
84+
\text{QFT}|\theta\rangle = \frac{1}{\sqrt{2^n}}\sum^{2^n-1}_{k=0} e^{2 \pi i\theta k} |k\rangle.
8585
8686
Note that this results in a uniform superposition, where each basis state has an additional phase.
8787
If we can prepare that state, then applying the *inverse* QFT would give

demonstrations_v2/tutorial_qpe/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"executable_stable": true,
1212
"executable_latest": true,
1313
"dateOfPublication": "2024-01-30T00:00:00+00:00",
14-
"dateOfLastModification": "2025-09-22T15:48:14+00:00",
14+
"dateOfLastModification": "2025-12-03T15:48:14+00:00",
1515
"categories": [
1616
"Algorithms",
1717
"Quantum Computing"
@@ -59,4 +59,4 @@
5959
}
6060
],
6161
"discussionForumUrl": "https://discuss.pennylane.ai/t/introduction-to-quantum-phase-estimation-demo/7337"
62-
}
62+
}

0 commit comments

Comments
 (0)