In most-significant-bit-first order, let and . On a computational-basis state, process wire with a Hadamard gate, then controlled phase gates controlled by unprocessed wire for each . Wire becomes . Reversing the final wire order yields the positive-exponent quantum Fourier transform. There are Hadamard gates and controlled phase gates. Physical reversal costs swap operators, each expressible as three controlled-NOT gates, themselves implemented with Hadamard gates and a Controlled-Z gate. Thus the entire construction uses gates from the specified family.
Write the integer label in most-significant-bit-first order as . The phase factors as , giving the displayed product state. For dyadic Fourier phases this explains why the Fourier basis states are unentangled even though a general quantum Fourier transform can create entanglement.
A Fourier sample is a computational-basis measurement outcome after applying a quantum Fourier transform to a quantum state . Its distribution is given by the squared Fourier amplitudes. For a uniform periodic coset of spacing , samples are the multiples with uniform . Samples need not individually reveal the whole period: a greatest common divisor can remove factors from a single reduced denominator, motivating two-sample exact period recovery.
For a finite abelian group with character group , the quantum Fourier transform isup to complex conjugation according to the transform convention.
Let divide andThe geometric sum in the quantum Fourier transform vanishes unless is a multiple of . Thus measurement after the transform returns the valueswith equal probabilities .
For a function of period dividing , prepare a uniform superposition of inputs, evaluate the function into a second register, and measure that register. The first register becomes a periodic coset state. Applying the quantum Fourier transform and measuring gives
For the exact sample , reducingrecovers denominator . Thus one sample reveals the full period exactly when is coprime to ; otherwise it reveals only a proper divisor and the algorithm must obtain more information.
Suppose a function has least period and distinct values on distinct period cosets. Two independent Fourier samples have the form with uniform . The displayed candidate is , so exact recovery occurs when no prime divisor of divides both residues. The Chinese remainder theorem gives probability , using the Euler product. Unlike a single-sample coprimality probability, this bound is uniformly greater than one half. A candidate-period test makes successful recovery heralded when such a test is available.
Suppose a function on has least period and is injective on each period. A Fourier sample gives the candidate denominator . If equality of function values can be tested efficiently, then is the full period exactly when , so each successful run is certified. A sample succeeds with probability , and an inverse-polylogarithmic lower bound for this ratio permits amplification to constant success probability with polynomially many repetitions.
The function on has period four. Measuring function value in its uniform input-output state leaves . The quantum Fourier transform modulo twelve then returns each of with probability .
For a generator of a group of order and , the function hides the subgroup of . Each fiber is an affine coset . Measuring the function register gives its normalized coset state. Applying the positive-exponent quantum Fourier transform to both input registers gives amplitudeThe finite geometric series vanishes off and equals on that line. Thus each allowed output pair has probability , independently of the coset offset. If , a modular inverse recovers .
Let . A supported sample guarantees . Dividing its linear congruence by gives an invertible coefficient modulo and a unique residue there. The compatible discrete logarithms modulo are for . Only determines the discrete logarithm from the sample alone; conveys no information for .
For , a periodic coset state in the computational basis of isIt is the coset state of the subgroup translated by .
For a finite abelian group , defines the regular representation on the basis labelled by . The linear characters give the common eigenbasisCharacter orthogonality proves orthonormality, and changing variables by the translation in a group proves the eigenvalue formula.
Simon's problem asks for the hidden string promised by exactly when . It is the hidden subgroup problem on with hidden subgroup .
For an unknown nonzero period, a collision reveals the period . Birthday problem sampling finds one using queries with bounded error. A matching lower bound follows by choosing the period and output labels randomly: without a collision, queries rule out at most candidate periods. For , almost all periods remain consistent with the transcript. The exponential separation is in query complexity, compared with Simon's algorithm's linear quantum query count.
Simon's algorithm prepares hidden-subgroup coset states, applies the quantum Fourier transform over , and samples vectors satisfying over . Repeated samples and Gaussian elimination recover with oracle queries and polynomial computation.
To solve Simon's problem, prepare a uniform quantum superposition, evaluate the function coherently into a second quantum register, and perform Simon Fourier sampling on the first. Each run produces a uniform binary string with over the two-element field. Once the observed rows have matrix rank , Gaussian elimination recovers as the unique nonzero element of their kernel. The random spanning of a binary vector space bounds the required number of runs.
Apply the Hadamard transform to a Simon coset state. The probability amplitude of is . Destructive quantum interference eliminates exactly those with . A computational-basis measurement therefore samples the kernel uniformly, independently of the representative .
In Simon's algorithm, conditioning on a function value leaves the first quantum register in an equal coherent sum of its two preimages. This is a pure state, even though discarding the second quantum register without retaining its outcome generally leaves a mixed state. The label depends on the measured value; the period does not.
With a nonzero hidden period, Simon's algorithm samples uniformly from its -dimensional orthogonal complement over the binary field. At rank , a new sample raises the rank with probability . Summing the geometric waiting times gives an expected queries. After samples, the probability of insufficient rank is less than , by a union bound over the nonzero linear functionals that could annihilate all samples.
If the hidden string is zero, one oracle-Hadamard run samples every with probability . If the hidden string is nonzero, it samples every satisfying with probability and every other string with probability zero. Pairing with makes the forbidden amplitudes cancel.
On a basis indexed by , a cyclic shift operator has the form . The quantum Fourier transform simultaneously diagonalizes all such shifts.
Given controlled powers of a unitary and an eigenstate , quantum phase estimation outputs an approximation to . If the input is a superposition of eigenstates, measurement selects an eigenphase with probability equal to the squared magnitude of its coefficient.
Let , let be the nearest label to , and let . The exact quantum phase estimation amplitude is . The sine bound on circular distances gives probability at most , where is the centered distance from to . At label distance from , , with at most two labels for each . Since , the tail telescopes to the displayed bound. Adding control qubits beyond desired phase bits gives circular accuracy below with failure probability at most .
For register size and eigenphase , the amplitude of decoded label is . The finite geometric series gives . If , this is . Thus the nearest exactly representable phase is returned with probability near one, not with certainty unless the offset vanishes.
// Target: quantum-error-correction.bigb
Use CNOT gates to encode one logical qubit and zero ancillas into the repetition subspace spanned by . Apply the phase gate in parallel to all physical qubits, then undo the encoding. The logical phase is multiplied by in one oracle-time layer. This copies computational-basis labels coherently rather than cloning an arbitrary quantum state. Blocks of sizes prepare a dyadic Fourier phase state using parallel oracle applications.
For a -dimensional unitary operator , a maximally mixed state on its target is the equal mixture of these orthonormal eigenvectors. Therefore quantum phase estimation with register size produces label with probabilityThis follows by linearity of unitary time evolution and the Born rule on the spectral mixture. If every eigenphase has an exact -grid label, that label has probability equal to its multiplicity divided by . Otherwise the exact distribution has tails, and the nearest labels are guaranteed only the nearest-integer success bound for quantum phase estimation weighted by the corresponding spectral probabilities.
For a unitary operator eigenphase , an -qubit quantum phase estimation register of size has output probability amplitudeChoose the nearest integer label to , with labels understood modulo , and put , taking the representative . The finite geometric series gives . For , concavity of sine gives , while . Thus the probability of the nearest label is at least . At it is exactly one. If two labels tie for nearest, each satisfies the bound.
For the phase gate , apply powers to a uniform quantum superposition on qubits. Binary positional weights multiply the phases into on basis vector . The inverse quantum Fourier transform returns exactly, by orthogonality of roots of unity. Preparing the powers by repeated applications uses copies of ; this does not claim a number of gate calls polynomial in . If is odd, its powers generate the entire set of dyadic phase gates because has a modular inverse modulo .
An eigenstate with phase becomes an eigenstate with phase under the tensor product of copies of the unitary operator. A promise prevents modulo-one aliasing. For and dyadic , exact quantum phase estimation then needs phase bits and queries to a supplied joint controlled oracle. This is a saving in joint-oracle calls, not in the total number of individual oracle invocations needed to build that joint operation.
Choose eigenphase representatives for a unitary operator and a positive integer . Its positive-phase fractional power acts on each eigenstate by . This branch uses arguments in and can differ from the usual complex principal branch using . For exactly dyadic phases, exact quantum phase estimation stores each label in a coherent phase register; bitwise phase gates multiply it by the required phase, and inverse phase estimation removes the labels. Keeping the phase register unmeasured preserves arbitrary eigenstate superpositions and resets the ancilla qubits. With only controlled- and controlled- primitives, the direct method uses oracle calls for exact phase bits.
Let a Hermitian operator have dyadic eigenvalues in for known , with controlled access to the unitary operator . This interval ensures that different eigenvalues have different eigenphases; exact representability alone would not exclude phase aliasing, as and both give phase zero. Let a real function obey , and assume the required quantum variable rotations are available. Coherent exact quantum phase estimation, a quantum variable rotation and uncomputation implementPostselection on flag one gives normalized, with probability , provided this vector is nonzero. Erasing the eigenvalue label by uncomputation is essential to preserve coherence between different eigenvectors. On this dyadic spectrum, gives , so reversing the phase-estimation gates is possible using forward controlled- calls. The choice multiplies by ; a scaled reciprocal gives the different filter used in the HHL algorithm.
If lies in the kernel of , then has no normalized quantum state. A request to produce that normalized vector with positive probability is consequently undefined. For example, on one qubit has distinct dyadic eigenvalues, but annihilates . The corrected filtering assertion requires ; it cannot be repaired by assigning a positive success probability to this input.
For and normalized , filtering by succeeds withThe inequality follows by replacing each nonnegative by its minimum and using . Equality holds exactly when all occupied eigenvectors belong to the minimum-eigenvalue eigenspace. If , success is positive exactly for inputs outside the kernel of .
If , controlled powers of applied to a uniform -state control register produceThese states are the Fourier basis. Applying the inverse quantum Fourier transform and measuring returns with probability one.
Articles by others on the same topic
The Quantum Fourier Transform (QFT) is a quantum analogue of the classical discrete Fourier transform (DFT). It is a linear transformation that takes quantum states and transforms them into a superposition of frequencies, which is incredibly useful in various quantum algorithms, especially in algorithms for factoring integers and solving problems in quantum computing.
Sample implementations: