Recent from talks
Contribute something
Nothing was collected or created yet.
Quantum phase estimation algorithm
View on WikipediaIn quantum computing, the quantum phase estimation algorithm is a quantum algorithm to estimate the phase corresponding to an eigenvalue of a given unitary operator. Because the eigenvalues of a unitary operator always have unit modulus, they are characterized by their phase, and therefore the algorithm can be equivalently described as retrieving either the phase or the eigenvalue itself. The algorithm was initially introduced by Alexei Kitaev in 1995.[1][2]: 246
Phase estimation is frequently used as a subroutine in other quantum algorithms, such as Shor's algorithm,[2]: 131 the quantum algorithm for linear systems of equations, and the quantum counting algorithm.
Overview of the algorithm
[edit]The algorithm operates on two sets of qubits, referred to in this context as registers. The two registers contain and qubits, respectively. Let be a unitary operator acting on the -qubit register. The eigenvalues of a unitary operator have unit modulus, and are therefore characterized by their phase. Thus if is an eigenvector of , then for some . Due to the periodicity of the complex exponential, we can always assume .
The goal is producing a good approximation for with a small number of gates and a high probability of success. The quantum phase estimation algorithm achieves this assuming oracular access to , and having available as a quantum state. This means that when discussing the efficiency of the algorithm we only worry about the number of times needs to be used, but not about the cost of implementing itself.
More precisely, the algorithm returns with high probability an approximation for , within additive error , using qubits in the first register, and controlled-U operations. Furthermore, we can improve the success probability to for any by using a total of uses of controlled-U, and this is optimal.[3]
Detailed description of the algorithm
[edit]
State preparation
[edit]The initial state of the system is:
where is the -qubit state that evolves through . We first apply the n-qubit Hadamard gate operation on the first register, which produces the state:Note that here we are switching between binary and -ary representation for the -qubit register: the ket on the right-hand side is shorthand for the -qubit state , where is the binary decomposition of .
Controlled-U operations
[edit]This state is then evolved through the controlled-unitary evolution whose action can be written as for all . This evolution can also be written concisely as which highlights its controlled nature: it applies to the second register conditionally to the first register being . Remembering the eigenvalue condition holding for , applying to thus gives where we used .
To show that can also be implemented efficiently, observe that we can write , where denotes the operation of applying to the second register conditionally to the -th qubit of the first register being . Formally, these gates can be characterized by their action asThis equation can be interpreted as saying that the state is left unchanged when , that is, when the -th qubit is , while the gate is applied to the second register when the -th qubit is . The composition of these controlled-gates thus gives with the last step directly following from the binary decomposition .
From this point onwards, the second register is left untouched, and thus it is convenient to write , with the state of the -qubit register, which is the only one we need to consider for the rest of the algorithm.
Apply inverse quantum Fourier transform
[edit]The final part of the circuit involves applying the inverse quantum Fourier transform (QFT) on the first register of :The QFT and its inverse are characterized by their action on basis states as It follows that
Decomposing the state in the computational basis as the coefficients thus equalwhere we wrote with is the nearest integer to . The difference must by definition satisfy . This amounts to approximating the value of by rounding to the nearest integer.
Measurement
[edit]The final step involves performing a measurement in the computational basis on the first register. This yields the outcome with probability It follows that if , that is, when can be written as , one always finds the outcome . On the other hand, if , the probability reads From this expression we can see that when . To see this, we observe that from the definition of we have the inequality , and thus:[4]: 157 [5]: 348
We conclude that the algorithm provides the best -bit estimate (i.e., one that is within of the correct answer) of with probability at least . By adding a number of extra qubits on the order of and truncating the extra qubits the probability can increase to .[5]
Toy examples
[edit]Consider the simplest possible instance of the algorithm, where only qubit, on top of the qubits required to encode , is involved. Suppose the eigenvalue of reads , . The first part of the algorithm generates the one-qubit state . Applying the inverse QFT amounts in this case to applying a Hadamard gate. The final outcome probabilities are thus where , or more explicitly, Suppose , meaning . Then , , and we recover deterministically the precise value of from the measurement outcomes. The same applies if .
If on the other hand , then , that is, and . In this case the result is not deterministic, but we still find the outcome as more likely, compatibly with the fact that is closer to 1 than to 0.
More generally, if , then if and only if . This is consistent with the results above because in the cases , corresponding to , the phase is retrieved deterministically, and the other phases are retrieved with higher accuracy the closer they are to these two.
See also
[edit]References
[edit]- ^ Kitaev, A. Yu (1995-11-20). "Quantum measurements and the Abelian Stabilizer Problem". arXiv:quant-ph/9511026.
- ^ a b Nielsen, Michael A. & Isaac L. Chuang (2001). Quantum computation and quantum information (Repr. ed.). Cambridge [u.a.]: Cambridge Univ. Press. ISBN 978-0521635035.
- ^ Mande, Nikhil S.; Ronald de Wolf (2023). "Tight Bounds for Quantum Phase Estimation and Related Problems". arXiv:2305.04908 [quant-ph].
- ^ Benenti, Guiliano; Casati, Giulio; Strini, Giuliano (2004). Principles of quantum computation and information (Reprinted. ed.). New Jersey [u.a.]: World Scientific. ISBN 978-9812388582.
- ^ a b Cleve, R.; Ekert, A.; Macchiavello, C.; Mosca, M. (8 January 1998). "Quantum algorithms revisited". Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences. 454 (1969): 339–354. arXiv:quant-ph/9708016. Bibcode:1998RSPSA.454..339C. doi:10.1098/rspa.1998.0164. S2CID 16128238.
Quantum phase estimation algorithm
View on GrokipediaBackground
Unitary operators and eigenvalues
In quantum mechanics and quantum computing, a unitary operator is defined as a linear operator acting on a Hilbert space that satisfies the condition , where is the Hermitian adjoint of and is the identity operator. This property ensures that unitary operators preserve the inner product and thus the norm of quantum states, which is essential for maintaining the probabilistic nature of quantum measurements. The eigenvalues of any unitary operator lie on the unit circle in the complex plane, meaning they can be expressed as for some real number . Consequently, if is an eigenvector of with eigenvalue , then where . The phase represents the argument of the eigenvalue and is the primary quantity targeted for estimation in quantum phase estimation algorithms, as it captures the essential rotational information while being confined to a standard interval. Unitary operators play a crucial role in quantum algorithms because they model key physical and computational processes. For instance, in quantum simulation, the time evolution of a quantum system is governed by a unitary operator , where is the system's Hamiltonian; estimating the phases of such operators enables the computation of energy eigenvalues and dynamical properties. Similarly, in Shor's algorithm for integer factorization, phase estimation is applied to a unitary operator implementing modular exponentiation, whose eigenvalues encode information about the period of the function, facilitating efficient factoring. The foundational concepts of unitary operators trace back to the early development of quantum mechanics in the 1920s and 1930s. The quantum phase estimation algorithm, which specifically targets the estimation of these phases, was first formalized by Alexei Kitaev in 1995 as part of his work on quantum measurements and the Abelian stabilizer problem.[2]Quantum Fourier transform
The quantum Fourier transform (QFT) is a unitary linear transformation that acts on the computational basis states of an n-qubit quantum register, serving as the quantum analogue of the classical discrete Fourier transform. For an n-qubit system where , the QFT maps a basis state (with ) to the superposition state This operation encodes the input amplitude distribution into frequency components, enabling the extraction of periodicities in quantum data with inherent parallelism.[4] The QFT can be implemented efficiently using a quantum circuit composed of Hadamard gates and controlled-phase rotation gates. The standard circuit begins with a Hadamard gate applied to the least significant qubit, followed by controlled rotations on subsequent qubits, where the rotation angles are for appropriate m, culminating in swap gates to reverse the bit order if needed. This construction requires elementary gates, which is quadratic in the number of qubits and allows for practical realization on near-term quantum hardware despite the exponential state space.[4] The inverse quantum Fourier transform (iQFT) is the adjoint operation of the QFT, obtained by conjugating the phase factors in the exponent (replacing with ) and applying the circuit in reverse order. As a unitary operator, the iQFT maps frequency-domain superpositions back to the time domain, preserving the norm and enabling reversible transformations essential for quantum information processing.[4] In contrast to the classical fast Fourier transform (FFT), which computes the discrete Fourier transform on points in time using space, the QFT achieves the same transformation on a superposition of all inputs simultaneously using only qubits and gates, providing an exponential speedup for problems involving hidden periodicities. This efficiency underpins its foundational role in quantum algorithms, such as Shor's algorithm for integer factorization, where it resolves the period of a modular exponential function to yield cryptographic breakthroughs.[4]Algorithm Overview
Problem formulation
The quantum phase estimation (QPE) algorithm solves the problem of estimating the eigenvalue phase of a unitary operator on a quantum computer. Given a unitary operator that can be efficiently implemented via a quantum circuit and an eigenvector (or a state close to it) satisfying with , the task is to produce an estimate of the unknown phase . The inputs include the unitary , the initial state , a target precision , and a bound on the failure probability. The output must satisfy with probability at least .[5][2] To achieve this, the algorithm employs two quantum registers: an -qubit control register, where determines the precision, and an -qubit target register holding , with based on the Hilbert space dimension for the eigenvector. If is only approximately an eigenvector with high overlap (fidelity close to 1), the algorithm still yields a reliable estimate of corresponding to the dominant eigenvalue component. This setup allows estimation of phases for unitaries whose eigenvalues lie on the unit circle, framing QPE as a core subroutine for extracting spectral information from quantum operators.[5][6] A key advantage of QPE is its resource scaling: it achieves Heisenberg-limited precision of , where is the total number of queries to (or equivalently, total operations), by leveraging quantum superposition and interference. In contrast, classical algorithms for phase estimation, such as repeated sampling and statistical averaging, are limited to the standard quantum limit (shot-noise scaling) of , requiring quadratically more resources for the same precision. This quadratic speedup underscores QPE's foundational role in quantum algorithms requiring high-precision eigenvalue approximation.[5][6]High-level steps
The quantum phase estimation (QPE) algorithm determines the phase θ in the eigenvalue e^{2πiθ} of a unitary operator U acting on its eigenvector |u⟩ by leveraging quantum superposition and interference in a multi-register quantum circuit.[2] The process relies on a control register of t qubits to achieve an approximation precision of O(1/2^t) and assumes access to |u⟩, with the target register holding this state throughout. The algorithm executes in four principal steps. First, the initial state is set up by loading the eigenvector |u⟩ into the target register and preparing the control register in a uniform superposition over its 2^t basis states; this enables parallel evaluation of multiple powers of U to gather phase information efficiently. Second, phases are encoded by performing controlled operations: each qubit in the control register controls the application of U raised to the power 2^j (where j indexes the qubit from the least significant bit) on the target register, imprinting relative phase shifts proportional to θ onto the superposition. Third, an inverse quantum Fourier transform is applied solely to the control register, which interferes the phase-encoded states to produce amplitudes peaked around the binary expansion of θ, converting the subtle phase kicks into a directly observable approximation. Fourth, the control register is measured in the computational basis, yielding a t-bit string that represents the integer closest to 2^t θ (modulo 1); dividing this value by 2^t recovers an estimate of θ, with high probability of success exceeding 80% for exact eigenvectors. In textual sketch, the circuit layout positions the t control qubits above the target qubits (whose size depends on U's implementation). It opens with superposition-inducing gates on the control qubits, proceeds to a diagonal band of controlled-U^{2^j} gates linking each control qubit to the target, continues with inverse quantum Fourier transform gates across the control qubits, and ends with measurement operators on the control register only. This procedure draws intuition from optical interferometry, where successive applications of U accumulate phases similar to path length differences in an interferometer, and the inverse Fourier transform serves as a spectral analysis to resolve the phase as the dominant "frequency" component.[2]Detailed Description
Initial state preparation
The quantum phase estimation (QPE) algorithm begins with the preparation of the target register in a state |ψ⟩ that serves as an eigenvector (or a close approximation) of the unitary operator U, satisfying U|ψ⟩ = e^{2πiφ} |ψ⟩ for some phase φ ∈ [0,1).[2] In practice, exact eigenvectors may not be readily available, so an approximate state with sufficient overlap to the desired eigenvector—such as a ground state prepared using the Hartree-Fock method for quantum chemistry applications—can be used as the initial |ψ⟩.[7] The control register, consisting of n qubits, is initialized to the all-zero state |0⟩^⊗n. To create the necessary superposition, a Hadamard gate is then applied to each of these n qubits. This operation transforms the control register into the uniform superposition state where |k⟩ denotes the binary representation of the integer k.[5] With the target register already in |ψ⟩, the full initial state of the combined system is thus This entangled superposition across the registers sets the stage for subsequent phase-encoding operations. The corresponding quantum circuit simply consists of the n Hadamard gates on the control qubits, with no gates applied to the target register at this initialization phase.[5] If the prepared |ψ⟩ has only a small overlap with the true eigenvector, the success probability of the QPE can be low; in such cases, amplitude amplification—a technique that iteratively boosts the amplitude of the desired component using reflections—can be applied as a preprocessing step to enhance the fidelity of the initial state. This method provides a quadratic speedup in the number of queries needed to achieve high overlap, making it a valuable aid for realistic implementations where exact state preparation is challenging.Phase encoding via controlled operations
In the phase encoding step of the quantum phase estimation algorithm, controlled powers of the unitary operator are applied to imprint the eigenvalue phase onto the superposition state prepared in the first register. This operation uses the qubits in the first register as controls to conditionally apply powers of to the target register containing the input state .[2] Specifically, for an -qubit first register, the encoding proceeds by applying a controlled- gate for each qubit index , where the -th qubit in the first register serves as the control and the entire target register acts as the target. Assuming the initial superposition state after preparation is and is an exact eigenvector of with eigenvalue (where ), these controlled operations evolve the state to: [2] This transformation encodes the phase in the amplitudes of the first register in the computational basis, representing in a binary "time-domain" form that can later be decoded via Fourier analysis. Implementing these controlled powers requires a base controlled- gate, from which higher powers are constructed by repetition: controlled- involves applications of controlled-. The total number of unitary applications across all controls is thus , achieving efficiency through the binary exponentiation structure that aligns with the qubit indexing.[2] If is instead an approximate eigenvector—such as a superposition over exact eigenvectors of with eigenvalues —the phase encoding yields a state , where the phases are weighted by the eigenvector overlaps . This allows the algorithm to estimate the phases of dominant components in the decomposition.[2][8]Inverse quantum Fourier transform application
In the quantum phase estimation algorithm, following the phase encoding step, the inverse quantum Fourier transform (iQFT) is applied solely to the control register to convert the phase-encoded superposition into a state where the phase value is approximated in the computational basis. The control register, after the controlled unitary operations, resides in the state , where is the phase to be estimated and is the number of qubits in the register. The iQFT transforms this superposition into a state with high amplitude concentrated on the basis state such that , specifically peaking at along with small amplitudes on nearby terms; the spread of this distribution decreases exponentially with , yielding a precision of approximately .[1] The iQFT circuit is obtained by running the quantum Fourier transform circuit in reverse, beginning with Hadamard gates on each qubit in reverse order, followed by controlled-phase rotations for appropriate qubit pairs (with the control and target qubits swapped relative to the forward transform), and concluding with swap gates to reverse the qubit ordering. This implementation requires elementary gates, making it efficient for the parallel evaluation in phase estimation. The use of the inverse rather than the forward transform is essential because the phase encoding via repeated controlled unitaries effectively places the control register in the Fourier basis representation of the phase, analogous to frequency information; applying the iQFT maps this back to the computational basis, where the phase manifests as a positional encoding for subsequent readout.[1]Measurement and phase recovery
In the final step of the quantum phase estimation algorithm, the control register consisting of qubits is measured in the computational basis, yielding an integer outcome with .[9] This measurement collapses the register to an eigenstate of the basis, where the probability distribution is peaked around values of closest to , with being the target phase.[9] The phase estimate is then obtained as . If is the integer closest to , the estimation error satisfies .[9] The success probability of obtaining such a (i.e., the best estimate) is at least when using qubits for an -bit precision target, and this can be boosted to arbitrarily close to 1 by employing a few additional qubits (e.g., for success probability ) or by rounding the measured to the nearest integer that minimizes the error.[9] In practice, multiple runs of the algorithm may be performed to select the most frequent as the outcome, enhancing reliability in noisy settings.[9] For applications where is expected to be a rational number (such as in order-finding for Shor's algorithm), classical post-processing via continued fraction expansion of is applied to identify the closest rational approximation with denominator bounded by a known limit, like the modulus size. This step efficiently recovers the exact fraction from the approximate phase with high probability, requiring only polynomial classical computation.[4]Examples
Single-qubit phase estimation
To illustrate the mechanics of the quantum phase estimation algorithm in its simplest form, consider the case with a single qubit in the estimation register (n=1). This minimal setup estimates the phase θ ∈ [0,1) associated with an eigenvalue of a 2×2 unitary operator U applied to its eigenvector |ψ⟩. The example unitary is given by with the corresponding eigenvector |ψ⟩ = \begin{pmatrix} 0 \ 1 \end{pmatrix}^T, which is the standard basis state |1⟩.[2] The quantum circuit for this single-qubit case begins with the target qubit prepared in |ψ⟩. A Hadamard gate is applied to the control qubit (initialized in |0⟩), creating a superposition. A controlled-U operation is then performed, where the control qubit determines whether U is applied to the target. The inverse quantum Fourier transform follows, which for n=1 reduces to another Hadamard gate on the control qubit. Finally, the control qubit is measured in the computational basis, yielding either |0⟩ (estimated phase θ̂ = 0) or |1⟩ (estimated phase θ̂ = 1/2).[2] The measurement outcomes vary with θ, demonstrating both deterministic and probabilistic behavior. For θ = 0, the outcome is always |0⟩, yielding θ̂ = 0 with certainty. For θ = 1/2, the outcome is always |1⟩, yielding θ̂ = 1/2 with certainty. For θ = 1/3, the outcome is |0⟩ with probability 1/4 (θ̂ = 0) or |1⟩ with probability 3/4 (θ̂ = 1/2).[10] This example highlights the algorithm's core principles: exact recovery for phases that are dyadic rationals (multiples of 1/2) and probabilistic estimation otherwise, depending on how well θ aligns with the possible output values. The single-qubit case provides intuition for the interference patterns that enable phase extraction, though it offers only 1 bit of precision.[2]Multi-qubit toy model
To illustrate the benefits of using multiple ancillary qubits in the quantum phase estimation algorithm, consider a toy model with ancillary qubits estimating the phase of a unitary operator acting on its eigenvector , where . This value of serves as an approximation to an irrational phase, highlighting how the algorithm approximates it within the resolution of . The initial state is , prepared by initializing the ancillary register to and the target register to .[10] The circuit proceeds by applying Hadamard gates to the ancillary qubits, creating the uniform superposition . Next, phase kicks are applied via controlled operations: the least significant ancillary qubit controls , the next controls , and the most significant controls , encoding the binary digits of into the phases of the ancillary superposition. An inverse quantum Fourier transform is then applied to the ancillary register, transforming the phase information into a measurable binary estimate , where is the integer outcome from 0 to 7. Finally, measuring the ancillary qubits yields with probabilities determined by the overlap with the true phase, peaking near the closest approximations to 0.3.[10] The measurement outcomes show probabilities peaked at (corresponding to ) and (), with an error bounded by 0.125 in both cases. The probability distribution, computed using the standard formula for QPE success probabilities, yields a high likelihood (over 80%) of obtaining an estimate within this error bound in a single run, demonstrating the quadratic precision advantage over classical methods. In contrast, classical sampling to achieve similar precision would require exponentially more measurement shots, on the order of or greater, without the inherent quantum speedup.[10] The following table visualizes the probability distribution over possible measurement outcomes :| (decimal) | Binary representation | Probability | |
|---|---|---|---|
| 0 | 000 | 0.000 | 0.022 |
| 1 | 001 | 0.125 | 0.052 |
| 2 | 010 | 0.250 | 0.577 |
| 3 | 011 | 0.375 | 0.259 |
| 4 | 100 | 0.500 | 0.041 |
| 5 | 101 | 0.625 | 0.020 |
| 6 | 110 | 0.750 | 0.018 |
| 7 | 111 | 0.875 | 0.011 |
