Quantum Algorithm for Monotonicity Testing on the Hypercube

In this note, we develop a bounded-error quantum algorithm that makes $\tilde O(n^{1/4}\varepsilon^{-1/2})$ queries to a Boolean function $f$, accepts a monotone function, and rejects a function that is $\varepsilon$-far from being monotone. This gives a super-quadratic improvement compared to the best known randomized algorithm for all $\varepsilon = o(1)$. The improvement is cubic when $\varepsilon = 1/\sqrt{n}$.


Introduction
The problem of testing monotonicity of Boolean functions is one of the fundamental-and most extensively studied-problems in property testing. Let denote the bitwise partial order on the Boolean hypercube {0, 1} n , i.e., x y iff x j ≤ y j for all j ∈ [n]. The function f : {0, 1} n → {0, 1} is monotone iff f (x) ≤ f (y) for all x y, and it is ε-far from monotone if it cannot be made monotone by changing its value on at most ε2 n inputs. An ε-tester for monotonicity is a randomized algorithm that distinguishes monotone functions from those that are ε-far from monotone with large (say, 2 3 ) probability. The study of the monotonicity testing problem was initiated by Goldreich et al. [12], who showed that it is possible to ε-test monotonicity of functions f : {0, 1} n → {0, 1} with O(n/ε) queries to f . Their algorithm is called the edge tester, and it is very simple: Repeatedly sample edges of the hypercube uniformly at random, and test whether the values of f on their endpoints violate monotonicity. The example of an anti-dictator function, f (x) = ¬x i , shows that the analysis of this algorithm is tight.
The edge tester remained the most efficient monotonicity testing algorithm for more than a decade, until Chakrabarti and Seshadhri [7] introduced a new ε-tester for monotonicity that requires only O(n 7/8 ε −3/2 ) queries. The Chakrabarti-Seshadhri algorithm, like the edge tester, is a pair tester : It repeatedly picks pairs of inputs x y from the hypercube and verifies that f (x) ≤ f (y) on each pair. Unlike the edge tester, however, the Chakrabarti-Seshadhri algorithm selects pairs of inputs that have Hamming distance up to O( √ n). The same high-level approach has since been used by Chen, Servedio, and Tan [9] to obtain a O(n 5/6 ε −4 )-query ε-tester for monotonicity and, very recently, by Khot, Minzer, and Safra in their beautiful paper [15] which shows that O( √ n/ε 2 ) queries suffice to ε-test monotonicity.
In summary, this line of research had led to two incomparable ε-testers for monotonicity: the edge tester with query complexity O(n/ε), and the Khot-Minzer-Safra algorithm with query complexity O( √ n/ε 2 ). The first one has better dependence on ε, the second one on n.
Furthermore, these two algorithms-along with every other algorithm that has been proposed for testing monotonicity of Boolean functions-are pair testers. Let us also note that pair testers are non-adaptive algorithms (they can select all their queries in advance) and have one-sided error (always accept a monotone function).
In this paper, we consider the query complexity of quantum algorithms that test monotonicity of Boolean functions. See [18] for a recent survey on quantum property testing. While the quantum query complexity of the monotonicity testing problem has not been explicitly studied before, we can apply quantum amplitude amplification [5] to obtain a quadratic improvement on the query complexity of any pair tester. As a result, the edge tester and Khot-Minzer-Safra algorithms imply that we can ε-test monotonicity with O( n/ε) and O(n 1/4 /ε) quantum queries, respectively. Our main result is a simple quantum algorithm that combines the best dependence from both of these algorithms.
Let us compare this result with known lower bounds on classical algorithms. Lower bounds for this problem are notoriously hard. For many years, the best known lower bound on the non-adaptive randomized query complexity was Ω(log n) for constant ε by Fischer et al. [11]. Recently, it was improved by Chen et al. [9,8] to almost Ω( √ n), essentially matching the query complexity of the Khot-Minzer-Safra algorithm. The best known adaptive lower bound is only Ω(log n), which immediately follows from the non-adaptive lower bound.
For pair testers, more lower bounds are known. First, Briët et al. [6] proved that any pair tester with query complexity of the form O(α(n)/ε) must have α(n) = Ω(n/ log n). Also, Khot, Minzer, and Safra [15] gave an example of a family of functions that are at distance Θ(1/ √ n) to being monotone, but for which any pair tester needs Ω(n 3/2 ) queries to find a non-monotone pair with constant probability. Our algorithm, on the other hand, needs only O( √ n) queries, which constitutes a cubic improvement. This is an interesting development, as very few super-quadratic but still polynomial speedups are known. We can only mention a cubic speed-up for exponential congruences by van Dam and Shparlinski [10], and quartic speed-ups for finding counterfeit coins by Iwama et al. [14], and learning the "exactly-half junta" by Belovs [3].
Our algorithm is based on technical results from [15] and the (dual) adversary bound. The latter characterises quantum query complexity up to a constant factor, as shown by Reichardt et al. [20,17]. Previously, the adversary bound was used for formula evaluation [21,22], triangle and other subgraph detection [2,16,4], the k-distinctness problem [1], and learning symmetric juntas [3]. This paper demonstrates an application to property testing.

Adversary Bound
In this section, we introduce the dual adversary bound. That is the main tool we use in the construction of our algorithm. We use it to distinguish total Boolean functions, so let us define the version of the bound tailored for this special case.
Let n be a positive integer, and assume that X and Y are two disjoint sets of total functions from {0, 1} n to {0, 1}. Let us also denote D = X ∪ Y. We will deal with the following problem. Given a query access to a function f ∈ X ∪ Y, the task is to detect whether f ∈ X or f ∈ Y. For this problem, the (dual) adversary bound is equal to the optimal value of the following optimization problem: subject to 1 for all f ∈ X and g ∈ Y; (1b) where X z are D × D positive semi-definite matrices. The adversary bound is very useful because of the following result: Theorem 2 ( [13,17]). The quantum query complexity of distinguishing X and Y is equal to the value of the adversary bound (1), up to a constant factor.
In particular, Theorem 2 implies that the value of every feasible solution to the optimization problem (1) gives an upper bound on the quantum query complexity of the corresponding problem.

Proof of Theorem 1
We complete the proof of Theorem 1 by constructing a feasible solution to the adversary bound (1) in the case where X is the set of all monotone functions and Y is the set of all functions that are ε-far away from any monotone function.
Let us introduce some additional notation. An edge of the hypercube is a pair xy, where Unlike the Khot-Minzer-Safra algorithm, which tests pairs of inputs at significant distance, our algorithm is essentially the edge tester. Our main contribution is the optimization of the O( n/ε) complexity, which we would get with the straightforward implementation, as mentioned in the introduction. For that, we need the following technical result: • the parts of the graph satisfy V ⊆ f −1 (1) and W ⊆ f −1 (0); • every edge e ∈ E is also a 10-edge of the hypercube; • the graph has |E| = Ω(ε2 n ∆(G f )/ log 2 n) edges, where ∆(G f ) is the maximal degree of G(f ).
For each f ∈ Y, let us fix a graph G f as in Lemma 3. Let E f be the set of edges of G f , and deg f (x) be the degree of a vertex x in G f .
We construct a feasible solution to (1) in the form X x = Y x + Z x . In the following, K and L are some constants that we will define later. The matrix Y x is defined by ψ where x ⊕j stands for the string x with the jth bit flipped.
Let us check that this satisfies (1b). Fix two functions f ∈ X and g ∈ Y. It is not hard to see that where [P ] = 1 iff the proposition P is true, and [P ] = 0 otherwise. On the other hand, ) ∧ (f (y) = g(y)) .
As for any xy ∈ E g , at least one of the conditions f (x) = g(x) or f (y) = g(y) is satisfied, the last two equations prove (1b). Let us estimate the objective value (1a) of this solution. For a function f ∈ X , we have Meanwhile, for g ∈ Y, we have Using the inequality x deg g (x) 2 ≤ ∆(G g ) x deg g (x) and the identity x deg g (x) = 2|E g |, we observe that We can now apply Lemma 3 to obtain x∈{0,1} n X x [[g, g]] ≤ log 2 n ε2 n · O K ∆(G g ) + L = log 2 n ε2 n · O K √ n + L .
Comparing (2) and (3), we see that the objective value is minimized when we set K =