Next Article in Journal
Dynamic-Step-Size Regulation in Pulse-Coupled Neural Networks
Previous Article in Journal
Fast Quantum Gates with Electric Field Pulses and Optical Tweezers in Trapped Ions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Phase Coordinate Uncomputation in Quantum Recursive Fourier Sampling

by
Christoffer Hindlycke
*,†,
Niklas Johansson
and
Jan-Åke Larsson
Department of Electrical Engineering, Linköping University, 581 83 Linköping, Sweden
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Entropy 2025, 27(6), 596; https://doi.org/10.3390/e27060596
Submission received: 14 April 2025 / Revised: 29 May 2025 / Accepted: 1 June 2025 / Published: 2 June 2025
(This article belongs to the Topic Quantum Information and Quantum Computing, 2nd Volume)

Abstract

:
Recursive Fourier Sampling (RFS) was one of the earliest problems to demonstrate a quantum advantage, and is known to lie outside the Merlin–Arthur complexity class. This work contains a new description of quantum algorithms in phase space terminology, demonstrating its use in RFS, and how and why this gives a better understanding of the quantum advantage in RFS. Most importantly, describing the computational process of quantum computation in phase space terminology gives a much better understanding of why uncomputation is necessary when solving RFS: the advantage is present only when phase coordinate garbage is uncomputed. This is the underlying reason for the limitations of the quantum advantage.

1. Introduction

Recursive Fourier Sampling (RFS) [1,2], originally introduced by Bernstein and Vazirani in 1993, was one of the earliest computational problems for which there existed a quantum algorithm apparently demonstrating an advantage over any classical algorithm. It is not known which complexity class RFS belongs to, but in the oracle paradigm it has been shown to lie outside Merlin–Arthur (MA) [3], which contains the Non-Deterministic Polynomial Time (NP) complexity class. Some further conjectures on which complexity class RFS may belong to are made in Ref. [4]. In spite of this, RFS has received scant attention, possibly in part owing to the implicit way in which it is formulated.
In this work, we provide a small generalization of RFS using updated notation, connect our generalization and previous formulations, and prove that uncomputation is necessary in a quantum solution to each RFS subproblem; this was already implied by existing complexity bounds. Our formulation does more since it enables a direct comparison with classical reversible computing where (computational coordinate) garbage is uncomputed to enable reversibility. In RFS, the uncomputation of phase coordinate garbage enables the quantum advantage. The mechanism of phase kickback [5,6,7] is an important quantum computational property that enables the quantum solution of RFS, in line with previous results [7] on, for instance, the Bernstein–Vazirani algorithm (which is equal to RFS for recursion depth 1). Here, we extend this picture to a full phase space description.
This is done by reformulating the oracles employed by RFS into the terminology of conjugate pair oracles that we define in this work; a conjugate pair oracle outputs a conjugate pair of two phase space coordinates, one in the computational basis and one in the phase basis. Describing and thereby understanding quantum computation in terms of phase space coordinates [8] has previously yielded a number of interesting results, such as the stabilizer formalism [9,10], several simple toy models, which nonetheless demonstrate a surprising number of quantum behaviors [7,11], and above all, quantum error-correcting codes [12,13,14]. This means of description thus allows for a rich representation while remaining accessible, in the sense that we may more easily understand what is happening during our computations. As RFS lies outside MA, our results lend credence to the conjecture [7] that oracle-paradigm bounds for the quantum advantage may be imposed by limited communication capacity rather than limited computational capacity: Any advantage seems to stem from the quantum oracle outputting (communicating) additional data compared to a classical oracle.
Below, we assume familiarity with basic linear algebra and quantum computation; for a comprehensive introduction, see [6]. We denote by x k a bitstring of some fixed length n k , and use “·” to denote the dot product modulo 2. The rest of this work is organized as follows. In Section 2, we describe Fourier Sampling, how to perform it using classical and quantum machines and how it can be used to solve a certain decision problem; we also explain the quantum algorithm’s use of phase kickback. Here, we make use of standard notation. Next, in Section 3, we describe Recursive Fourier Sampling, and how to perform it using classical and quantum machines. The presentation is more streamlined than in earlier works: A comparison to earlier presentations can be found in Appendix A. Then, in Section 4, we go on to describe the contributions of the present work by introducing the notion of conjugate pair oracles, use this notion to show that uncomputing phase coordinate garbage is the enabling mechanism behind the quantum solution of RFS, and provide a proof of why uncomputation cannot be avoided. We conclude by summarizing our main findings, briefly discuss the complexity of RFS, and point out some future avenues of research.

2. Fourier Sampling and Phase Kickback

Given a function φ encoded into the coefficients of the quantum state | φ = x = 0 N 1 φ ( x ) | x , the Quantum Fourier Transform (QFT) gives
Q F T | φ = χ = 0 N 1 φ ^ ( χ ) | χ .
A computational basis measurement outcome X will then be a sample from the distribution P ( X = χ ) = | φ ^ ( χ ) | 2 , known as Fourier Sampling, from the power spectrum of the function φ . Samples essentially give the inverse image of the power spectrum, e.g., frequencies absent from φ ^ will occur with probability 0.
The bit-wise Quantum Fourier Transform mod 2 (the Hadamard transform) was used by Bernstein and Vazirani in 1993 [1] to solve the following problem: given an oracle for the Boolean function f promised to be linear, i.e.,
f ( x ) = s · x ,
determine the unknown bitstring s. The linear choice of f is part of the original problem description. There is a version utilizing a non-linear (quadratic) f [15] but there exists no recursive variant of this problem.
A classical algorithm would need to call the corresponding classical reversible oracle
O f ( x , y ) = x , y + f ( x )
a total of n times (see Algorithm 1), since it can extract at most one bit of information from each call, available in the target bit y. Querying f with the argument x = 1 j where 1 j is the bitstring with only the jth bit set, the function output is ( s ) j , the jth bit of the bitstring s.
Algorithm 1 Classical Fourier Sampling
Entropy 27 00596 i001
The promise (2) tells us that if the initial bias y = 0 , the output target y will have the value s, since f ( 1 j ) = s · 1 j = ( s ) j .
An appropriate function for Fourier Sampling is ( 1 ) f ( x ) because the Hadamard transform of ( 1 ) f ( x ) = 1 2 f ( x ) is 1 2 f ^ ( χ ) = δ χ s , the Kronecker delta function, which equals 1 if χ = s and 0 otherwise. If one can generate a quantum state containing ( 1 ) f ( x ) in its coefficients, Fourier Sampling will give s (with probability 1). Quantum algorithms provide a way to accomplish this through a procedure known as phase kickback [5,7].
Phase kickback uses a quantum function oracle U f that preserves phase information,
U f x , y c x , y | x , y = x , y c x , y | x , y + f ( x ) ,
and elements of the phase basis in control and target registers, to move the function output from the target computational basis state in the right-hand side above, to the phase of the coefficients in the controlling register. Applying U f to the phase basis elements gives
U f H n + 1 | χ , υ = U f x , y ( 1 ) χ · x | x ( 1 ) υ y | y = x , y ( 1 ) χ · x | x ( 1 ) υ y | y + f ( x ) = x , y ( 1 ) χ · x | x ( 1 ) υ ( y f ( x ) ) | y = x , y ( 1 ) χ · x υ f ( x ) | x ( 1 ) υ y | y .
For Quantum Fourier Sampling, we use the Hadamard transform and bitwise addition modulo 2, and the Fourier variables are bitstrings x , χ of length n and bits y , υ . Then, the Fourier Sampling promise of Equation (2) gives
H n + 1 U f H n + 1 | χ , υ = H n + 1 x , y ( 1 ) ( χ + υ s ) · x | x ( 1 ) υ y | y = | χ + υ s , υ .
Bernstein and Vazirani [1] write this as an algorithm that solves the Fourier Sampling problem in one call to the quantum oracle, see Algorithm 2.
Algorithm 2 Quantum Fourier Sampling
  • Quantum oracle:  U f
  • Control: none
  • Bias/Target: qubit string | ψ x of length n
1:
create ancilla qubit | ψ y : = | 1
2:
apply  H n + 1 to | ψ x , ψ y
3:
apply  U f to | ψ x , ψ y
4:
apply  H n + 1 to | ψ x , ψ y
5:
discard ancilla  | ψ y
The promise (6) tells us that if the initial bias | ψ x = | χ = | 0 , measurement of the output | ψ x will give the outcome s (with probability 1), and also that the ancilla is fixed to a known value in step 5 so can be safely discarded.
The problem as stated so far is a sampling problem: sample from a specific probability distribution (output s with probability 1). In what follows, it will be useful to re-state the problem as a decision problem, that determines if a given bitstring x 1 belongs to the language L f 1 . In the decision problem version of Fourier Sampling, we are given a Boolean function of two arguments, promised to obey
f 2 ( x 1 , x 2 ) = s 1 ( x 1 ) · x 2 ,
and another Boolean function g 1 ( x 1 , s 1 ( x 1 ) ) that gives the answer to the problem upon input of s 1 ( x 1 ) (this latter function can be referred to as f 1 ( x 1 ) ). Given oracle access to f 2 and g 1 , we need to use classical or Quantum Fourier Sampling on the last argument of f 2 to obtain s 1 ( x 1 ) so that we can use g 1 to determine if x 1 belongs to L f 1 or not, to solve the decision problem.
Note that if g 1 is linear in the second argument and independent of the first, then there exists an x * so that g 1 ( x 1 , x 2 ) = x * · x 2 , and f 1 ( x 1 ) = g 1 ( x 1 , s 1 ( x 1 ) ) = x * · s 1 ( x 1 ) = f 2 ( x 1 , x * ) . Such a decision problem can be solved in a single call to f 2 ; thus problems with a linear g 1 (sometimes known as a parity function) are less interesting to study [1].

3. Recursive Fourier Sampling

There are, to the best of our knowledge, three formulations of RFS. The original was introduced by Bernstein and Vazirani in 1993 [1], further expanded on by the same authors in 1997 [2], and presented in a slightly different manner by Vazirani in 2002 [3]. In 2003, Aaronson [16] re-formulated RFS somewhat, in part by removing the bitstring size limitations. Finally, in 2008 Johnson [4] essentially combined elements of the two versions in another formulation. We shall make use of the definitions of Ref. [3], but remove the bitstring size limitations in keeping with [16], and add subscripts to function sequences for indexing the recursion level. A comparison of the notation for the different versions can be found in Appendix A.
RFS is a decision problem: it uses a so-called Fourier Sampling tree f k : 1 k l + 1 to decide whether a bitstring x 1 belongs to a language L f 1 or not. A Fourier Sampling tree is a Boolean function sequence such that for k > 1
f k ( x 1 , , x k ) = s k 1 ( x 1 , , x k 1 ) · x k .
We say that the sequence f k is derived from the sequence g k for 1 k l (and g k specifies the Fourier Sampling tree f k ) if
f k 1 ( x 1 , , x k 1 ) = g k 1 x 1 , , x k 1 , s k 1 ( x 1 , , x k 1 ) .
Now, given oracles for g k , 1 k l , and f l + 1 , the challenge is to determine f 1 ( x 1 ) , which in turn, tells us if x 1 is in the language L f 1 or not. Note that oracle access to f l + 1 , though not explicitly stated in [3], is necessary to perform Quantum Fourier Sampling as described there.
A classical algorithm would need to solve this recursively, at each step using the corresponding classical reversible oracle
O f k ( x 1 , , x k , y ) = x 1 , , x k , y + f ( x )
a total of n k times, since it can only extract (at most) one bit of information from each call, available in the target bit y. We here rewrite the explicit classical algorithm by McKague [17] in our notation, see Algorithm 3.
Algorithm 3 Classical Recursive Fourier Sampling
Entropy 27 00596 i002
From the promise (2), it follows that oracle access to f k + 1 gives us f ( x 1 , , x k , 1 j ) = ( s k ( x 1 , , x k ) ) j , so that x k + 1 = s k ( x 1 , , x k ) after the recursion for-loop. It then follows from the promise (9) that oracle access to g k with this value of x k + 1 gives oracle access to f k . That this holds for all k follows by induction, in particular, we obtain oracle access to f 1 so that we can calculate f 1 ( x 1 ) [17].
This algorithm needs n 2 n 3 n l + 1 calls to f l + 1 and n 2 n 3 n k calls to g k , 1 < k l , so the algorithm has the complexity O k = 2 l + 1 n k , which in the case of equal lengths n k = n is O ( n l ) [16]; the corresponding lower bound is then Ω ( n l ) [4], meaning we have a strict bound Θ ( n l ) . Calculating an exact bound for a problem given string lengths n 1 , , n k is easily done via the formula above.
A quantum oracle would, also here, be assumed to preserve phase information
U f k x 1 , , x k , y c x 1 , , x k , y | x 1 , , x k , y = x 1 , , x k , y c x 1 , , x k , y | x 1 , , x k , y + f ( x 1 , , x k ) .
Let H j denote the unitary that applies Hadamards on the qubits of | x j . Then, the Fourier Sampling promise of Equation (8), with parameters x 1 , , x k 1 , gives
( H k H ) U f k ( H k H ) | x 1 , , x k 1 , χ , υ = | x 1 , , x k 1 , χ + υ s k 1 ( x 1 , , x k 1 ) , υ .
The assumption (11) implies phase is preserved for a superposition of such input states. A quantum algorithm can now use such a quantum oracle and a different recursion [17], see Figure 1 and Algorithm 4.
Algorithm 4 Quantum Recursive Fourier Sampling
  • Level:  1 k l
  • Quantum oracles:  U f k + 1 and U g k
  • Controls: qubit strings | ψ x j , 1 j k
  • Bias/Target: single qubit | ψ y
1:
create ancilla qubit string | ψ x k + 1 : = | 0 and qubit | ψ y : = | 1
2:
apply  H n k + 1 + 1 to | ψ x k + 1 , ψ y
3:
apply  U f k + 1 to | ψ x 1 , , ψ x k + 1 , ψ y
4:
apply  H n k + 1 to | ψ x k + 1
5:
apply  U g k to | ψ x 1 , , ψ x k + 1 , ψ y
6:
apply  H n k + 1 to | ψ x k + 1
7:
apply  U f k + 1 to | ψ x 1 , , ψ x k + 1 , ψ y
8:
apply  H n k + 1 + 1 to | ψ x k + 1 , ψ y
9:
discard ancillas  | ψ x k + 1 , ψ y
With the ancillas | ψ x k + 1 , ψ y = | χ , υ = | 0 , 1 , it follows from Equation (12) that | ψ x k + 1 = | s k ( x 1 , , x k ) after step 4. It then follows from the promise (9) that oracle access to g k through U g k with this state | ψ x k + 1 gives oracle access to f k , creating U f k . Then steps 6–8 reset | ψ x k + 1 = | 0 so that it can be safely discarded, usually motivated by the need to enable interference [2,16]; the actual underlying reason is to ensure that phase preservation of U g k gives phase preservation of U f k , we will return to this point below. That we have oracle access to f k for all k follows by induction, in particular, we obtain oracle access to f 1 so that we can calculate f 1 ( x 1 ) [17]. c This algorithm needs 2 l calls to U f l + 1 , so the algorithm has the complexity O ( 2 l ) , and the corresponding lower bound is Ω ( 2 l ) [4,16], meaning we have a strict bound Θ ( 2 l ) .

4. Conjugate Pair Oracles and Phase Coordinate Uncomputation

We are now almost in a position to define and use conjugate pair oracles. This will yield an alternative description of RFS, in turn, enabling a proof that uncomputation is necessary in RFS, which (together with the conjugate pair formalism) is the main contribution of this work. As a conjugate pair oracle acts on a conjugate pair, we begin by defining the latter, as a representation based on phase space coordinates [8] and this idea allows for our results.
The Hadamard arrangement of the presented quantum algorithms is usually only seen as a convenient way to move f from the target register into the phase of the coefficients of the control register, to enable Fourier Sampling from that register [1]. The | ψ y = | υ bias input is converted into a negative phase ( 1 ) υ , which then enables the “phase kickback” of the function output into the phase of the control system, to enable the | ψ y = | s output if υ = 1 . However, this can be viewed in a different manner. The Fourier coordinate is a canonically conjugate phase space coordinate, often referred to as “the phase basis”.
In textbooks on quantum mechanics, one typically first encounters the canonically conjugate pair [ x , p ] of position x and momentum p. The brackets are here meant to indicate “the canonically conjugate pair” of physical quantities, not the commutator between two Hermitian operators as is commonplace in quantum mechanics. In quantum computing, the appropriate conjugate pair is computational basis and phase basis, the pair X = [ x , χ ] of computational basis bitstring x and phase bitstring χ , of equal length. It is this which we take as our definition of a conjugate pair, two bitstrings of equal length; this is then the length of the conjugate pair.
In quantum mechanics, if the state of the studied system is an element of the computational basis, then x is well-defined but χ is not; if the state is an element of the phase basis, then χ is well-defined but x is not. This is a consequence of the uncertainty relation [7]. Even partial knowledge of χ forces the value of x to be partially unknown, or really, partially unknowable, and vice versa. Therefore, we cannot access both entries of the conjugate pair X = [ x , χ ] , we must choose one of them. In other words: for a conjugate pair (when used in quantum computation) we may have that the computational basis bitstring is well-defined, or that the phase bitstring is well-defined, or that neither is well-defined (but never that both are well-defined).
Creating a computational basis state can now be seen as writing a well-defined value x into the computational basis part of the conjugate pair X = [ x , χ ] , and measuring in the computational basis can be seen as reading off the x value. Likewise, creating a phase basis state can now be seen as writing a well-defined value χ into the phase basis part of the conjugate pair X = [ x , χ ] , and measuring in the phase basis can be seen as reading off the χ value.
The Hadamard operation or bitwise Fourier transform mod 2 moves a potential well-defined value from the computational basis part to the phase basis part of the state and vice versa; an appropriate notation for a system where X has length n would be
H n X = H n [ x , χ ] = [ χ , x ] .
Re-writing Quantum Fourier Sampling from this point of view, the first two steps of the algorithm write information into the phase basis, and the final two steps read information from the phase basis [7]. The promise associated with a quantum oracle, that phase is preserved among the components of a superposition, now implies a simpler promise: that the oracle can calculate not one but two kinds of output. The standard function map
x f ( x ) ,
is still available, with the standard control and bias/target registers. However, a second function map is also available, the phase kickback map that we will denote
υ f ( υ ) ,
from the phase coordinate of the target/bias register to the phase coordinate of the control. The behavior of these two function maps can now be collected into a joint description: a conjugate pair oracle of the form in the following theorem.
Theorem 1. 
Under the promise (4) of phase preservation of the quantum function oracle, we can write down the pair of maps in the computational basis and phase basis, respectively, as the conjugate pair oracle
F [ x , χ ] , [ y , υ ] = x , χ + f ( υ ) , y + f ( x ) , υ .
where f ( υ ) is random with
f ( υ ) = υ T , p ( T = t ) = δ t 0 2 f ^ ( t ) 2
so that f ( υ ) is a Fourier sample of f when υ = 1 , thus the notation f ( υ ) with a checkmark (the Kronecker delta function δ t 0 equals 1 when t equals the all-zero vector, and the Fourier transform used is the Hadamard transform).
Proof. 
The computational coordinate map immediately follows from the function map of the quantum oracle. The phase coordinate map is obtained from phase preservation (4) and the identity ( 1 ) w = 1 2 w (skipping the steps already present in Equation (6)), through
H n + 1 U f H n + 1 | χ , υ = H n + 1 x , y ( 1 ) χ · x + υ f ( x ) | x ( 1 ) υ y | y = H n + 1 x , y ( 1 ) χ · x 1 2 υ f ( x ) | x ( 1 ) υ y | y = t , x ( 1 ) ( χ + t ) · x 1 2 υ f ( x ) | x , υ = t δ t 0 2 υ f ^ ( t ) | χ + t , υ
Therefore, the phase bit υ of the target system is unchanged, while the phase bitstring χ of the control is unchanged if υ = 0 , otherwise shifted with a random Fourier sample distributed as indicated in Equation (17).    □
The above should be read as follows: if the input computational basis bitstrings x , y are well-defined, the output computational basis bitstrings x , y + f ( x ) are well-defined so that f ( x ) can be deduced. Furthermore, if instead, the input phase basis bitstrings χ , υ are well-defined, the output phase basis bitstrings χ + f ( υ ) , υ are well-defined so that f ( υ ) can be deduced. By our definition of a conjugate pair, it is clear that only one part of the conjugate pair oracle F can be queried at any one time.
In Fourier sampling, the distribution of f is especially simple. There is an additional promise on the structure of f in Equation (2), which in conjunction with phase preservation, using Theorem 1, gives
f ( υ ) = υ s
with probability 1. Here, we must stress that the simplicity of this is a direct consequence of phase preservation (Theorem 1) and the additional promise of Equation (2). We can now solve the Fourier Sampling problem by just accessing this function in the phase information, this gives us Algorithm 5.
Algorithm 5 Conjugate Pair Oracle Fourier Sampling
  • Conjugate pair oracle:  F
  • Control: none
  • Bias/Target: conjugate pair X
1:
create ancilla  Y : = [ y , υ ] of length 1 with υ : = 1
2:
apply  F to ( X , Y )
3:
discard ancilla  Y
Theorem 2. 
For a target conjugate pair X = [ x , χ ] where the phase bitstring χ = 0 , Algorithm 5 solves Fourier Sampling. The solution is available after the algorithm as the phase bitstring χ.
Proof. 
If the input bias conjugate pair X = [ x , χ ] has well-defined phase χ = 0 , it follows from Equation (19) that the output conjugate pair X = [ x , χ ] has well-defined phase χ = s with probability 1.    □
The output χ is a bitstring of length n, so querying the phase part of the oracle can provide n bits of information in one use. This is obviously impossible for a classical oracle that returns a Boolean output.
Quantum Recursive Fourier Sampling can also be re-written from this point of view, adding some complication because of the k arguments x j ; each phase coordinate χ j will now be shifted with a separate f k , j . Theorem 1 generalizes in the following way.
Theorem 3. 
Under the promise (11) of phase preservation of the quantum function oracle, we can write down the pair of maps in the computational basis and phase basis, respectively, as the conjugate pair oracle
F k [ x 1 , χ 1 ] , , [ x k , χ k ] , [ y , υ ] = ( x 1 , χ 1 + f k , 1 ( υ , x 2 , , x k ) , x 2 , χ 2 + f k , 2 ( x 1 , υ , x 3 , x k ) , , x k , χ k + f k , k ( x 1 , , x k 1 , υ ) , y + f k ( x 1 , , x k ) , υ ) .
where f k , j ( x 1 , , x j 1 , υ , x j + 1 , , x k ) is random with
f k , j ( x 1 , , x j 1 , υ , x j + 1 , , x k ) = υ T j ( x 1 , , x j 1 , x j + 1 , , x k ) , p T j ( x 1 , , x j 1 , x j + 1 , , x k ) = t = δ t 0 2 f ^ k , j ( x 1 , , x j 1 , t , x j + 1 , , x k ) 2 .
Here, f ^ k , j is the Fourier transform on the j:th argument of f k , so that f k , j is a Fourier sample on the j:th argument of f when υ = 1 .
Proof. 
For each j, use Theorem 1 on the conjugate pair oracle function F k ( X 1 , , X j 1 , X , X j + 1 , , X k , Y ) . Theorem 1 applies because this converts the phase preservation of Equation (11) into that of Equation (4).    □
In RFS, we also have an additional promise on the structure of f k in Equation (8), but only for the last argument, and in conjunction with phase preservation, using Theorem 3, we obtain
f k , k ( x 1 , , x k 1 , υ ) = υ s k 1 ( x 1 , , x k 1 )
with probability 1. Again, we must stress that the simplicity of this is a direct consequence of phase preservation (Theorem 3) and the additional promise of Equation (8).
The other f k , j are random and depend on x i , i j , but we have no specific promised distribution when j < k ; this is simply not part of the problem description. Even so, we can solve Recursive Fourier Sampling by just accessing this function in the phase information of the k:th control. Note that a random value f k , j , j < k is added to each χ j , j < k during this process, which needs to be removed to preserve the value of χ j when calculating the next level. This gives us Algorithm 6.
Algorithm 6 Conjugate Pair Oracle Recursive Fourier Sampling
  • Level:  1 k l
  • Conjugate pair oracles:  F k + 1 and G k
  • Controls: conjugate pairs X j , 1 j k
  • Bias/Target: conjugate pair Y
1:
create ancillas  X k + 1 = [ x k + 1 , χ k + 1 ] with χ k + 1 : = 0 and Y = [ y , υ ] with υ : = 1
2:
apply  F k + 1 to ( X 1 , , X k + 1 , Y )
3:
apply  H n k + 1 to X k + 1
4:
apply  G k to ( X 1 , , X k + 1 , Y )
5:
apply  H n k + 1 to X k + 1
6:
apply  F k + 1 to ( X 1 , , X k + 1 , Y )
7:
discard ancillas  ( X k + 1 , Y )
Theorem 4. 
For a target conjugate pair Y = [ y , υ ] with phase bitstring υ = 1 , Algorithm 6 starting at level 1 solves Recursive Fourier Sampling. The solution is available after the algorithm as the phase bitstring χ 1 .
Proof. 
At level k, the proof has two parts: that oracle access to F k + 1 and G k give oracle access to F k ; and that the algorithm leaves the phase kick-back of F k in the arguments untouched. First, the ancillas ( X k + 1 , Y ) have well-defined phases ( 0 , 1 ) , so it follows from Equation (22) that X k + 1 has well-defined phase s k ( x 1 , , x k ) after applying F k + 1 the first time in step 2. The Hadamard of step 3 moves this into a well-defined computational basis value. It then follows from the promise (9) that oracle access to G k with this conjugate pair X k + 1 gives oracle access to F k , including the phase kickback map. Second, the transformation in step 6 is the exact inverse of the transformation in step 2, so the second addition will remove precisely the values added in step 2, so that χ j , j < k + 1 only contains the phase kickback of F k .
That we have oracle access to F k for all k follows by induction, in particular, we obtain oracle access to F 1 so that we can deduce f 1 ( x 1 ) from F 1 [ x 1 , χ 1 ] , [ y , υ ] = [ x 1 , χ 1 + f 1 ( υ ) ] , [ y + f 1 ( x 1 ) , υ ] by using the well-defined input x 1 and bias y = 0 . □
The crucial point here is that in this formulation of the problem and solution algorithm, although technically equivalent to the quantum formulation, steps 5 and 6 are no longer motivated by the somewhat unclear need to “uncompute ‘garbage’ [in the computational coordinate of the ancillary systems] left over by the first call, and thereby enable [proper] interference” [2,16]. Here, the motivation is much clearer: We need to uncompute the shift of the phase coordinate of the controlling systems with indices j < k + 1 , i.e., uncompute phase coordinate garbage, see Figure 2. This enables a direct comparison with classical reversible computing where (computational coordinate) garbage is uncomputed to enable reversibility. In RFS, the uncomputation of phase coordinate garbage enables the quantum advantage.
Corollary 1. 
When using Algorithm 6 to solve Recursive Fourier Sampling, the uncomputation in step 6 is necessary to uncompute phase coordinate garbage added to X j , j < k + 1 in step 2.
Proof. 
Step 2 of Algorithm 6 adds random values to the phase bitstrings of X j , j < k + 1 according to Equation (20). Step 6 is necessary to subtract values that are identical to the added values. □
The reason we need to perform uncomputation, to invert the addition of these additional phases, is that we are not guaranteed anything about the nature of f k , j , j < k + 1 , by the problem formulation. Adding such a guarantee in the problem statement could give a further quantum advantage, although that would require maintaining the classical complexity of the problem under such an addition. One possible addition is promising linear g k at every level, but as mentioned earlier, that would reduce the classical complexity considerably [1].

5. Conclusions

In this work, the main contribution is the notion of conjugate pair oracles, which enables a reformulation of RFS, in turn, providing a stronger argument for why uncomputation is necessary than previously available. We also provide a small generalization of Recursive Fourier Sampling: our generalized RFS contains both the original formulation by Bernstein and Vazirani [3] and the one by Aaronson [16] as special cases.
Uncomputation is needed because the function oracle (quantum or conjugate pair, both with phase kickback) adds random phase shifts, i.e., computational garbage, to the controlling registers. Furthermore, we are not guaranteed anything about the value or distribution of these phase shifts by the problem formulation; the only guarantee we have concerns the phase shift of the last argument. Adding further guarantees in the problem statement of the behavior of the involved functions could give a further quantum advantage, although that would require maintaining the classical complexity of the problem under such an addition; we conjecture that such a modification is possible.
It should be noted here that the complexity bound on solving RFS, i.e., the exact bound Θ ( 2 l ) mentioned at the end of Section 3 [4,16], already indicates that uncomputation is needed. However, phase kickback in the conjugate pair oracle paradigm presented here arguably gives a better understanding of the necessity of uncomputation of phase coordinate garbage within the Quantum RFS algorithm.
It has previously been established [7] that at least some problems in NP relative to an oracle (such as Simon’s algorithm [2]) use phase kickback as their driving mechanism. We now have that RFS, which in a very real sense is “more difficult” than Simon’s algorithm given that RFS lies outside MA relative to an oracle [3], relies on this very same property of quantum systems as the enabling computational resource. That is, in the oracle paradigm, it is not so much a matter of computational power enabling an advantage, but rather one of communication: accessibility of the relevant information outside the oracle. As long as the correct phase information is accessible, we can (apparently) solve extremely hard problems more efficiently than otherwise. This strengthens the argument [7] that phase kickback is an important property of quantum computational systems. Clearly, phase kickback is critical in enabling a quantum advantage in RFS.
This formalism gives a new understanding of the behavior of quantum algorithms such as Grover’s algorithm [18] or Shor’s algorithm [19], in that it allows the explicit tracking of the phase information in a quantum circuit [7,10]. It also points out a possible path towards proving a practically meaningful distinction between classical and quantum computation. Perhaps the difficulty in classically simulating quantum computation stems entirely from the difficulty in maintaining the correct phase map in a quantum computation. Investigating this venue more thoroughly may well lead to the unconditional separation theorem that the quantum information society is still striving for to this day.

Author Contributions

Conceptualization, C.H. and J.-Å.L.; methodology, C.H., N.J. and J.-Å.L.; validation, C.H. and J.-Å.L.; formal analysis, C.H., N.J. and J.-Å.L.; investigation, C.H. and J.-Å.L.; writing—original draft preparation, C.H.; writing—review and editing, C.H., N.J. and J.-Å.L.; visualization, C.H. and J.-Å.L.; supervision, J.-Å.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was partially funded by the Swedish Research Council through grant agreement no. 2023-05031.

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Previous Versions of RFS

In our formulation, there is no connection between the length n k of individual bitstrings x k and the total recursion depth l. This is not the case in [3], where given n 1 = n , the recursion depth l = log n , since there n k = n / 2 k 1 decrease exponentially. Our approach also generalizes the formulation of Aaronson [16] where n k = n and the nonlinear output function g are the same for all recursion levels. Both of these are special cases of our formulation, and so any algorithm and accompanying circuit that solves the latter also solves the former.
For completeness, we now give an explicit description of how to move between the notation of Aaronson [16] and the one used here. Note that the index order for x j is reversed with respect to Ref. [16]; we here also write uppercase G for the nonlinear output function of Ref. [16] to distinguish it from g k as used here. Aaronson [16] defines height-h Recursive Fourier Sampling, or RFSh, recursively as follows. We are given oracle access to a function A ( x 1 , , x h ) for all x 1 , , x h { 0 , 1 } n , and are promised the following:
(i)
For each fixed x h * , A ( x 1 , , x h 1 , x h * ) is an instance of RFSh−1 on x 1 , , x h 1 , having answer bit b ( x h * ) { 0 , 1 } ;
(ii)
There exists a secret string s { 0 , 1 } n such that b ( x h * ) = s · x h * for each x h * .
The answer bit to be returned is G ( s ) .
Given such an instance of RFSl+1, we can rewrite it as a Fourier Sampling tree { f k , 1 k l + 1 } derived from a sequence g k as follows. First, for each k we let the function f k equal the output A of the RFSk instance obtained recursively from promise (i). For k > 1 , we find from promise (ii) that
f k ( x 1 , , x k 1 , x k * ) = A ( x 1 , , x k 1 , x k * ) = b ( x k * ) = s · x k * ,
making f k a Fourier Sampling tree. We should point out here that s will actually depend on the free parameters x 1 , , x k 1 , which correspond to the explicit arguments of s k 1 ( x 1 , , x k 1 ) in Equations (8) and (9). We also know that the function output from RFSk−1 is
f k 1 ( x 1 , , x k 1 ) = A ( x 1 , , x k 1 ) = G ( s k 1 ( x 1 , , x k 1 ) ) ,
so, if we let
g k 1 ( x 1 , , x k ) = G ( x k ) ,
the Fourier Sampling tree f k is derived from the sequence g k . Oracle access to A ( x 1 , , x l + 1 ) and G ( x k ) gives oracle access to f l + 1 ( x 1 , , x l + 1 ) and g k 1 ( x 1 , , x k ) for all k, respectively.
Conversely, it is possible to rewrite a Fourier Sampling tree f k derived from g k as a recursively defined sequence of RFSk instances, if all n k = n and all g k 1 ( x 1 , , x k ) equal one and the same function of the last argument. Then, to create an RFSh instance, we let A ( x 1 , , x h ) = f h ( x 1 , , x h ) , and G ( x ) = g 1 ( 0 , x ) = = g l ( 0 , , 0 , x ) , which immediately fulfill promises (i) and (ii). Oracle access to f l + 1 ( x 1 , , x l + 1 ) and g 1 ( 0 , x ) gives oracle access to A ( x 1 , , x l + 1 ) and G ( x ) , respectively.

References

  1. Bernstein, E.; Vazirani, U. Quantum complexity theory. In Proceedings of the 25th Annual ACM Symposium on Theory of Computing (STOC ’93), San Diego, CA, USA, 16–18 May 1993; ACM: New York, NY, USA, 1993; pp. 11–20. [Google Scholar] [CrossRef]
  2. Bernstein, E.; Vazirani, U. Quantum Complexity Theory. SIAM J. Comput. 1997, 26, 1411–1473. [Google Scholar] [CrossRef]
  3. Vazirani, U. A Survey of Quantum Complexity Theory. In Proceedings of Symposia in Applied Mathematics; AMS: Providence, RI, USA, 2002; Volume 58, pp. 193–217. [Google Scholar] [CrossRef]
  4. Johnson, B.E. Upper and Lower Bounds for Recursive Fourier Sampling. Ph.D. Thesis, University California Berkeley, Berkeley, CA, USA, 2008. [Google Scholar]
  5. Cleve, R.; Ekert, A.; Macchiavello, C.; Mosca, M. Quantum algorithms revisited. Proc. R. Soc. Lond. Ser. A Math. Phys. Eng. Sci. 1998, 454, 339–354. [Google Scholar] [CrossRef]
  6. Nielsen, M.A.; Chuang, I.L. Quantum Computation and Quantum Information; Volume 10th Anniversary Edition; Cambridge University Press: Cambridge, UK, 2010. [Google Scholar]
  7. Johansson, N.; Larsson, J.Å. Quantum Simulation Logic, Oracles, and the Quantum Advantage. Entropy 2019, 21, 800. [Google Scholar] [CrossRef] [PubMed]
  8. Wootters, W.K. Picturing Qubits in Phase Space. arXiv 2003, arXiv:quant-ph/0306135. [Google Scholar] [CrossRef]
  9. Aaronson, S.; Gottesman, D. Improved Simulation of Stabilizer Circuits. Phys. Rev. A 2004, 70, 052328. [Google Scholar] [CrossRef]
  10. Hindlycke, C.; Larsson, J.Å. Efficient Contextual Ontological Model of n-Qubit Stabilizer Quantum Mechanics. Phys. Rev. Lett. 2022, 129, 130401. [Google Scholar] [CrossRef] [PubMed]
  11. Spekkens, R.W. Evidence for the Epistemic View of Quantum States: A Toy Theory. Phys. Rev. A 2007, 75, 032110. [Google Scholar] [CrossRef]
  12. Gottesman, D. Theory of Fault-Tolerant Quantum Computation. Phys. Rev. A 1998, 57, 127–137. [Google Scholar] [CrossRef]
  13. Shor, P. Fault-Tolerant Quantum Computation. In Proceedings of the 37th Annual Symposium on Foundations of Computer Science, Burlington, VT, USA, 14–16 October 1996; pp. 56–65. [Google Scholar] [CrossRef]
  14. Calderbank, A.R.; Rains, E.M.; Shor, P.W.; Sloane, N.J.A. Quantum Error Correction and Orthogonal Geometry. Phys. Rev. Lett. 1997, 78, 405–408. [Google Scholar] [CrossRef]
  15. Bravyi, S.; Gosset, D.; König, R. Quantum Advantage with Shallow Circuits. Science 2018, 362, 308–311. [Google Scholar] [CrossRef] [PubMed]
  16. Aaronson, S. Quantum Lower Bound for Recursive Fourier Sampling. Quantum Inf. Comput. 2003, 3, 165–174. [Google Scholar] [CrossRef]
  17. McKague, M. Interactive proofs with efficient quantum prover for recursive Fourier sampling. Chic. J. Theor. Comput. Sci. 2012, 18, 1–10. [Google Scholar] [CrossRef]
  18. Grover, L.K. A Fast Quantum Mechanical Algorithm for Database Search. In Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, Philadelphia, PA, USA, 22–24 May 1996; ACM: New York, NY, USA, 1996. STOC ’96. pp. 212–219. [Google Scholar] [CrossRef]
  19. Shor, P. Algorithms for Quantum Computation: Discrete Logarithms and Factoring. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM, USA, 20–22 November 1994; pp. 124–134. [Google Scholar] [CrossRef]
Figure 1. Quantum Recursive Fourier Sampling. The focus of the uncomputation is to reset the ancillary systems | x k + 1 to | 0 and | y to | 1 . The focus changes and becomes much clearer in the conjugate pair oracle paradigm in Section 4.
Figure 1. Quantum Recursive Fourier Sampling. The focus of the uncomputation is to reset the ancillary systems | x k + 1 to | 0 and | y to | 1 . The focus changes and becomes much clearer in the conjugate pair oracle paradigm in Section 4.
Entropy 27 00596 g001
Figure 2. Conjugate Pair Recursive Fourier Sampling. The focus of the uncomputation is to undo the shift of the phase coordinate of X 1 , , X k from the F k + 1 oracle.
Figure 2. Conjugate Pair Recursive Fourier Sampling. The focus of the uncomputation is to undo the shift of the phase coordinate of X 1 , , X k from the F k + 1 oracle.
Entropy 27 00596 g002
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Hindlycke, C.; Johansson, N.; Larsson, J.-Å. Phase Coordinate Uncomputation in Quantum Recursive Fourier Sampling. Entropy 2025, 27, 596. https://doi.org/10.3390/e27060596

AMA Style

Hindlycke C, Johansson N, Larsson J-Å. Phase Coordinate Uncomputation in Quantum Recursive Fourier Sampling. Entropy. 2025; 27(6):596. https://doi.org/10.3390/e27060596

Chicago/Turabian Style

Hindlycke, Christoffer, Niklas Johansson, and Jan-Åke Larsson. 2025. "Phase Coordinate Uncomputation in Quantum Recursive Fourier Sampling" Entropy 27, no. 6: 596. https://doi.org/10.3390/e27060596

APA Style

Hindlycke, C., Johansson, N., & Larsson, J.-Å. (2025). Phase Coordinate Uncomputation in Quantum Recursive Fourier Sampling. Entropy, 27(6), 596. https://doi.org/10.3390/e27060596

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop