Code
qcr:2606.90800.1

Quantum Phase Estimation with PennyLane

This PennyLane demo introduces Quantum Phase Estimation (QPE), one of the most important subroutines in quantum computing, which estimates the eigenvalue phase of a unitary operator for a given eigenstate and underpins algorithms from Shor's factoring to quantum chemistry. Given a unitary and one of its eigenstates, QPE writes the eigenvalue's phase into a register of estimation qubits to a precision set by their number. The tutorial builds QPE from its components in PennyLane: preparing the estimation register in superposition, applying controlled powers of the target unitary so that the unknown phase is kicked back and encoded as relative phases across the register, and applying an inverse Quantum Fourier Transform to convert those phases into a binary number that can be read by measurement. It shows how the number of estimation qubits controls the precision of the result and how to interpret the measured outcome as an approximation of the phase, using PennyLane's templates for the controlled unitaries and the inverse QFT. By assembling the estimator from clear building blocks and running it on a concrete example, the demo gives a hands-on, foundational understanding of phase estimation, the engine behind many advanced quantum algorithms, in PennyLane.
Qubit
Circuit-based
Uploaded 1 day ago
34
Views
GitHub667
Citing this entry? Use this QCR ID
Uploaded by
QL
QCR Librarian

Overview

PennyLaneAI/demos
667238
README.md

Quantum Phase Estimation with PennyLane

This PennyLane demo introduces Quantum Phase Estimation (QPE), one of the most important subroutines in quantum computing, which estimates the eigenvalue phase of a unitary operator for a given eigenstate and underpins algorithms from Shor's factoring to quantum chemistry. Given a unitary and one of its eigenstates, QPE writes the eigenvalue's phase into a register of estimation qubits to a precision set by their number. The tutorial builds QPE from its components in PennyLane: preparing the estimation register in superposition, applying controlled powers of the target unitary so that the unknown phase is kicked back and encoded as relative phases across the register, and applying an inverse Quantum Fourier Transform to convert those phases into a binary number that can be read by measurement. It shows how the number of estimation qubits controls the precision of the result and how to interpret the measured outcome as an approximation of the phase, using PennyLane's templates for the controlled unitaries and the inverse QFT. By assembling the estimator from clear building blocks and running it on a concrete example, the demo gives a hands-on, foundational understanding of phase estimation, the engine behind many advanced quantum algorithms, in PennyLane.

Run it

pip install -r requirements.txt
python demo.py

Source and license

Imported from demonstrations_v2/tutorial_qpe/demo.py in PennyLaneAI/demos at c52c0abeb5122218aa96b38eea848864cce7323f, under the Apache License 2.0. Original authors: Xanadu and the PennyLane community. The upstream LICENSE is included alongside this example.

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!

Indexed by QCR Librarian

This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.

Versions

v1 Latest
Jun 17, 2026
qcr:2606.90800.1

Cite all versions? Use the base QCR ID to always reference the latest version of this entry.

Tools used

PennyLane

Keywords

phase-estimation
qpe
pennylane
inverse-qft
eigenvalue

You may also like5