Cyclic shift operator 2026-09-25
On a basis indexed by , a cyclic shift operator has the form . The quantum Fourier transform simultaneously diagonalizes all such shifts.
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 amplitude
The 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 .
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 .
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.
Fourier sample Created 2026-10-07 Updated 2026-10-14
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.
Hidden subgroup problem 2026-09-24
The hidden subgroup problem asks for a subgroup given an oracle that is constant on each left coset of and takes different values on different cosets. Abelian instances are solved by preparing coset states and applying a group quantum Fourier transform.
Prepare the uniform pure state
Every permutation matrix fixes this vector, so RandomPermute returns with certainty. Choose an orthonormal basis with first vector , for example the quantum Fourier transform basis. Under RandomReset, the returned state is , which gives each of the measurement labels probability .
Guess RandomPermute on label 0 and RandomReset on every other label. Then
This is invariant-pure-state discrimination against a maximally mixed reset. It also agrees with the Holevo–Helstrom theorem: the eigenvalues of are once and with multiplicity , giving optimal equal-prior success . This confirms optimal discrimination of these returned states, in addition to constructing the requested strategy.[ref] For , the actions coincide and the formula correctly gives random-guessing success .
On an -dimensional register, the quantum Fourier transform with positive-exponent convention is
It is the unitary version of the discrete Fourier transform on amplitudes. The inner product of columns is , equal to one when and zero otherwise by a finite geometric series, so the transformation is unitary.
For the qubit implementation take , write in most-significant-bit-first order, and put . Expanding separates the Fourier phase as a product. The resulting dyadic quantum Fourier transform circuit identity is
Indeed the phase on output bit is , depending on the last input bits; multiplying the factors recovers and the normalization .
Implement the product in reverse wire order as follows. Process input wire , starting at . A Hadamard gate maps to . For each still-unprocessed wire , apply a controlled phase gate with control , target , and target phase
On a computational-basis input this multiplies the target's one-component by , so the processed wire becomes exactly . Continue through all wires and reverse their order using SWAP gates. This equals the boxed transform on every basis vector and therefore on arbitrary superpositions by linearity; it does not require learning the input bits by measurement.
There are . A swap is three controlled-NOT gates, since the alternating control directions send successively to , then , and finally . Thus the exact transform uses one- and two-qubit gates from this phase-gate family, polynomial in the register size . This is a circuit-complexity statement, not a claim that all transformed amplitudes can be read out efficiently. If a fixed finite gate alphabet is required, the phase rotations must instead be synthesized to the desired accuracy; the exact count treats them as the available simple rotation gates.
Let be a unitary operator and suppose initially that the target is an eigenstate with , . Use control qubits, so . Hadamard gates prepare the uniform superposition . For each binary control position , apply the controlled unitary gate . The resulting state is
Apply the inverse quantum Fourier transform, with convention , and measure the control. The exact amplitude and probability are
For an exactly representable phase , orthogonality of roots of unity makes the outcome certain. Otherwise the finite geometric series gives
The estimate is , with phases interpreted modulo one.
To prove an error bound, choose a nearest label to on the circular grid and put in the interval . For , concavity of sine on gives , while . Therefore the nearest-integer success bound for quantum phase estimation is
Here . At an exact grid point the probability is one. If two nearest labels tie, either one separately has the displayed lower bound.
For high confidence one can prove a stronger quantum phase estimation tail bound. Let be the centered distance between and , chosen with . The denominator estimate implies away from the exact-phase case. A label at circular integer distance from has , and there are at most two labels at each such distance. For , summing the tails gives
On the complementary event the circular phase error is at most . Thus, for desired bits of accuracy, take with and to obtain
Taking makes the right side at most . This adds only control qubits. Efficient QFT is not by itself a guarantee of efficient controlled powers of an arbitrary : implementing them by repeated oracle calls uses calls. The modular-arithmetic application has efficient powers, as follows.
Assume and , and let be the multiplicative order of modulo . Define the unitary operator on , and extend it as the identity on unused computational-basis labels of the binary register. Coprimality makes multiplication a permutation, so this extension really is unitary. The orbit of consists of the distinct states . Its modular multiplication eigenstates are
The last relation follows by shifting the index cyclically; orthogonality follows from the finite Fourier sum. We do not need to know to prepare one of these eigenstates: the readily prepared target obeys
Running quantum phase estimation on this state produces the mixture of the eigenphase distributions, each with weight , because the target eigenstates are orthogonal. Thus it samples a uniformly random phase label and estimates with the bounds just proved. Equivalently the state before the inverse QFT is , which is obtained by quantum modular exponentiation directly.
The controlled power multiplies by , whose constant is computed by repeated squaring. Under the assumed efficient modular exponentiation, these controlled multiplications and the QFT use a number of gates polynomial in the register lengths. Taking requires only phase qubits. The nearest-label event has probability at least and yields an estimate within of . Since , continued-fraction recovery in quantum order finding then identifies the reduced fraction . The denominator is , not necessarily : when and are coprime it is the desired order, and when they are not it is only a divisor. One may test candidate denominators using modular exponentiation and repeat with fresh samples; denominators from successful samples can also be combined by a least common multiple. The probability of a nearest-label sample with coprime to is at least . These qualifications explain exactly what the phase estimate yields without falsely assuming that the unknown order or an eigenstate was available at the start.
Apply one Hadamard gate independently to each qubit. These gates act in parallel, so the quantum circuit implements with gates and depth one.
Figure 1.
Parallel Hadamard gates implementing the binary Fourier transform
. Details.
For a computational basis state, factorization gives
The exponent is the dot product over the finite field , because multiplying the separate signs adds their exponents modulo two. This is the Walsh-Hadamard transform, equivalently the quantum Fourier transform on the finite Abelian group .
In particular, the all-zero input becomes the uniform coherent superposition . It is a useful initial operation because an oracle can then act on all amplitudes in one call, and subsequent interference can reveal a global property. Measurement alone does not read all function values: the later interference step is what turns the preparation into an algorithmic advantage.
Put and write , with normalized. The Hadamard gates prepare the control register in . Controlled powers of the unitary operator then give quantum phase kickback:
Thus the register quantum state is , while the target remains . Define the quantum Fourier transform by . Its inverse gives
When , the inner finite geometric series equals if and zero otherwise. Therefore exact quantum phase estimation gives
The quantum phase, rather than an unrestricted integer , is recovered modulo .
The printed circuit has no bit-reversal swaps. Its top control uses , and its measured top wire gives the least significant output bit. Write . Before the top wire's final Hadamard gate, its relative quantum phase is , so that gate produces . The controlled inverse quantum phase gates then subtract its contribution from lower wires. More generally, before the final Hadamard gate on wire , the relative quantum phase is
so that wire gives deterministically. For the three-wire drawing, the correct interpretation is
Equivalently, its Fourier-inversion circuit is , where reverses the register bits. Relabeling the measured bits or appending swaps gives the usual integer output. This bit convention matters, for example, when quantum phase produces top-to-bottom bits , representing the label four rather than one.
With the negative exponential convention of the specified quantum Fourier transform, the amplitude of computational outcome is
If , every summand is one. Otherwise this finite geometric series has ratio with , so it equals . Thus
The Born rule gives outcome with probability one when performing a quantum measurement in the computational basis. Recover the promised phase as modulo . Using the opposite Fourier sign would instead return the label , so the sign convention matters.
Write the promised phase as . Prepare three logical qubits in and attach zero ancillas in three blocks of sizes four, two and one. A block of size is prepared by fanout CNOT gates as
Apply one copy of to every physical qubit in every block, all in the same time step. Undo each fanout. The logical block output is and every ancillary wire returns to zero. This is parallel phase multiplication by coherent fanout; its intermediate entanglement copies basis labels, and does not clone an arbitrary quantum state.
For block weights , the three logical wires now contain
Apply the specified negative-sign quantum Fourier transform and measure. Part (a) gives label deterministically. Thus seven parallel phase-gate applications, on three logical wires and four ancillas, identify the phase in one oracle time step. Preparation, uncomputation and the Fourier transform cost no time under the stated model; using serial powers would not meet the time requirement.
Set . Applying the inverse quantum Fourier transform to the register in part (a) gives probability amplitude at label equal to
Choose nearest to , with reduced modulo at the phase boundary. Then the difference can be represented with . For , sum the finite geometric series to obtain
Let . On , concavity of sine gives , the line through its endpoint values. Also . Therefore
and the Born rule proves the nearest-integer success bound for quantum phase estimation:
If , every summand is one and the probability is exactly one. If the scaled phase is halfway between two integers, either nearest label separately satisfies the displayed bound. Interpreting the measured integer as gives the closest available -bit phase estimate modulo one.
Choose an orthonormal eigenbasis of , with eigenphases , counting multiplicity. The maximally mixed state is basis independent, so
Linearity means that the experiment is the equal mixture of the two eigenstate experiments. After the inverse quantum Fourier transform, the joint state is , where and
Thus the exact output distribution for quantum phase estimation with a maximally mixed target is
For a nonzero phase mismatch, the squared probability amplitude is , with value one at an exact match. If both eigenphases are exactly representable on the -point grid, their two labels occur with probability each; coincident labels have their probabilities added. For general eigenphases there can be nonzero probabilities at other labels, so it would not be exact to list only the two best approximations with probability each. Each eigenphase is sampled with spectral weight , and its nearest-label event has conditional probability at least . In particular a nearest label for one eigenphase has unconditional probability at least , with additional contributions possible from the other phase.
With access to the uncontrolled physical gate, use single-qubit process tomography. Prepare the positive eigenstate of each of , apply , and on independent copies measure each of . Arbitrary single-qubit rotation gates let one prepare these inputs and rotate each measurement into the computational basis. The nine measured means are
They determine the real rotation matrix of the Bloch vector, and hence the action of on every qubit state. To see precisely what this identifies, suppose another unitary has the same action. Then commutes with every Pauli matrix. Commuting with makes it diagonal; commuting with makes its diagonal entries equal. Therefore .
Consequently tomography determines , and its eigenvalues, up to a common phase. More explicitly, write a representative as . Its eigenvalues are and , and its Bloch vector action is rotation through about . The measured rotation identifies the unordered relative eigenphase information; for example . Once a representative with a specified overall phase is supplied, diagonalizing that representative gives the corresponding two eigenvalues.
The common phase itself cannot be recovered with the stated uncontrolled access. Indeed, for every input, including inputs entangled with ancillas. Replacing by therefore leaves every such preparation-and-measurement experiment unchanged, whereas it multiplies both eigenvalues by . For example, and are indistinguishable physical gates under these operations. This proves that the request for absolute eigenvalue phases needs an additional phase reference or controlled-gate assumption: the global phase of an uncontrolled quantum gate is unobservable. The controlled powers in the earlier parts supply that extra resource, since changes a relative phase between the two control branches.
The practical advantages are that no unknown eigenstate preparation, controlled powers, entangling gates or inverse quantum Fourier transform are needed: a fixed set of single-qubit preparations and measurements suffices. The disadvantages are statistical estimation and the phase ambiguity just proved. Estimating the bounded Pauli measurement means to additive accuracy at fixed confidence requires order independent repetitions, giving the usual sampling cost for this direct procedure. The earlier quantum phase estimation circuit uses phase qubits and high controlled powers to resolve scale in one coherent experiment with a constant success bound; constructing those powers from controlled uses of costs gate calls, so its exponential-looking precision is not obtained with only uses of . Repetitions can raise confidence. Finally, full process tomography grows exponentially with the number of system qubits, whereas the eigenstate-based phase procedure can estimate a selected eigenphase without reconstructing the entire operator.
The inverse quantum Fourier transform in the original PDF has matrix elements multiplying . The converted TeX incorrectly repeats in the bra; using the actual PDF operator,
If , every summand of the inner sum is one, so it equals . If , let . Then and , and the finite geometric series gives . This is orthogonality of roots of unity. Hence
A quantum measurement in the computational basis consequently returns the integer with probability one.
Cyclic periodicity on implies that the least positive period divides : the shifts preserving the function form a subgroup of the cyclic group. Injectivity within one period says that distinct residue classes modulo have distinct function values. Write .
Prepare the uniform superposition state by applying the quantum Fourier transform to , and evaluate reversibly into a second quantum register. This is efficient because the given classical Boolean circuit can be converted into a reversible circuit, with its workspace cleaned by uncomputation. The resulting quantum state is
Measuring the function quantum register leaves a uniform coset state for some . The amplitude at after a quantum Fourier transform is
The finite geometric series is zero unless is a multiple of , and then equals . Thus a computational-basis measurement produces a uniform Fourier sample
The exact period recovery from a Fourier sample computes
A greatest common divisor is computable in time polynomial in . The candidate is always a divisor of the true period, and equals it precisely when is coprime to .
For the success flag, compute and compare with . If , injectivity within the first period makes these unequal. If , periodicity makes them equal, including . Hence accept and output exactly when this comparison succeeds; otherwise report failure. This is heralded exact quantum period finding when the period divides the register size, with no false acceptance. The case succeeds even on the sample .
The exact success probability is
where is the Euler totient function. For , the prime-product formula gives . A Rosser–Schoenfeld totient bound supplies the needed lower bound for large . Every single attempt, including verification, has the assumed polynomial-in- gate cost. Repeating times gives constant success probability with a certified result whenever one is found.
The printed in the totient hint should be a lower-bound statement, . Literally, is false: at primes , . Likewise the exact single-sample success probability need not be ; for prime period it tends to one. The useful intended guarantee is the displayed inverse-log-log lower bound, not a universal upper bound. If an algorithm satisfying the literal success upper bound is desired, one can additionally accept an otherwise certified run only when independent fair bits are all zero. This retains a detectable failure flag and polynomial runtime, and has success at most , but deliberately weakens the useful guarantee. The standard unsuppressed algorithm above gives the stronger intended performance. Small can be handled directly. Primary evidence for the totient lower bound is Theorem 15, equations (3.41)–(3.42), in denisevellachemla.eu/Rosser-Schoenfeld-1962.pdf .
Let . The positive-exponent quantum Fourier transform gives . Reindexing the cyclic shift operator gives
Thus is an eigenstate with eigenvalue , with this sign fixed by the printed quantum Fourier transform convention.
Prepare the first two qutrits in and the answer qutrit in . The modular-addition quantum oracle applies to the answer. Its eigenvalue produces quantum phase kickback, leaving
Apply to each input qutrit, then measure them in the computational basis. The result is
The preparation, inverse transforms and measurements are independent of , and there is exactly one use of . This is qutrit linear-function identification, the ternary version of Bernstein-Vazirani phase kickback.
The quantum circuit has one control wire per binary digit and one target quantum register. Every control starts in , receives a Hadamard gate, controls the corresponding power , and then enters the collective inverse quantum Fourier transform. Only the control register is measured; the target stays in .
Figure 1.
Exact dyadic phase-estimation circuit with controlled powers, inverse Fourier transform, and little-endian output bits
. Details.
The omitted intermediate wires continue the pattern . The inverse quantum Fourier transform black box is defined on the integer basis with , so the displayed ordering introduces no hidden bit reversal. The measured bits satisfy
Each controlled power box represents sequential controlled- uses when only that primitive is available.