Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Physical Review A

Generalized Deutsch-Jozsa problem and the optimal quantum algorithm

Daowen Qiu, Shenggen Zheng

Published Jun 20, 2018• 31 citations
Publisher

Abstract

The Deutsch-Jozsa algorithm is one of the first examples of a quantum algorithm that is exponentially faster than any possible deterministic classical algorithm. It was proposed by Deutsch and Jozsa in 1992 with improvements by Cleve, Ekert, Macchiavello, and Mosca in 1998. The Deutsch-Jozsa problem is a promise problem and we can equivalently describe it as a partial function ${\text{DJ}}_{n}^{0}:{{0,1}}^{n}\ensuremath{\rightarrow}{0,1}$ defined as ${\text{DJ}}_{n}^{0}(x)=1$ for $|x|=n/2, {\text{DJ}}_{n}^{0}(x)=0$ for $|x|=0,n$, and it is undefined for the rest of the cases, where $n$ is even, and $|x|$ is the Hamming weight of $x$. The optimal quantum algorithm needs only one query to compute ${\text{DJ}}_{n}^{0}$ but the classical deterministic algorithm requires ${2}^{n\ensuremath{-}1}+1$ queries to compute it in the worse case. In this article, we generalize the Deutsch-Jozsa problem as ${\text{DJ}}_{n}^{k}(x)=1$ for $|x|=n/2, {\text{DJ}}_{n}^{k}(x)=0$ for $|x|$ in the set ${0,1,...,k,n\ensuremath{-}k,n\ensuremath{-}k+1,...,n}$, and it is undefined for the rest of the cases, where $0\ensuremath{\le}k<n/2$. In particular, we give and prove an optimal exact quantum query algorithm with complexity $k+1$ for computing the generalized Deutsch-Jozsa problem ${\text{DJ}}_{n}^{k}$. It is clear that the case of $k=0$ is in accordance with the Deutsch-Jozsa problem. Also, we give a method for finding the approximate and exact degrees of symmetric partial Boolean functions.

DOI
10.1103/physreva.97.062331

Related papers

Characterizations of symmetrically partial Boolean functions with exact quantum query complexity

Daowen Qiu, Shenggen Zheng

We give and prove an optimal exact quantum query algorithm with complexity $k+1$ for computing the promise problem (i.e., symmetric and partial Boolean function) $DJ_n^k$ defined as: $DJ_n^k(x)=1$ for $|x|=n/2$, $DJ_n^k(x)=0$ for $|x|$ in the set $\{0, 1,\ldots, k, n-k, n-k+1,\ldots,n\}$, and it is undefined for the rest cases, where $n$ is even, $|x|$ is the Hamming weight of $x$. The case of $k=0$ is the well-known Deutsch-Jozsa problem. We outline all symmetric (and partial) Boolean functions with degrees 1 and 2, and prove their exact quantum query complexity. Then we prove that any symmetrical (and partial) Boolean function $f$ has exact quantum 1-query complexity if and only if $f$ can be computed by the Deutsch-Jozsa algorithm. We also discover the optimal exact quantum 2-query complexity for distinguishing between inputs of Hamming weight $\{ \lfloor n/2\rfloor, \lceil n/2\rceil \}$ and Hamming weight in the set $\{ 0, n\}$ for all odd $n$. In addition, a method is provided to determine the degree of any symmetrical (and partial) Boolean function.

arXiv:1603.06505•Mar 21, 2016•8 citations

Exact Quantum 1-Query Algorithms and Complexity

Daowen Qiu, Guoliang Xu

Deutsch–Jozsa problem (D–J) has exact quantum 1-query complexity (“exact” means no error), but requires super-exponential queries for the optimal classical deterministic decision trees. D–J problem is equivalent to a symmetric partial Boolean function, and in fact, all symmetric partial Boolean functions having exact quantum 1-query complexity have been found out and these functions can be computed by D–J algorithm. A special case is that all symmetric Boolean functions with exact quantum 1-query complexity follow directly and these functions are also all total Boolean functions with exact quantum 1-query complexity obviously. Then there are pending problems concerning partial Boolean functions having exact quantum 1-query complexity and new results have been found, but some problems are still open. In this paper, we review these results regarding exact quantum 1-query complexity and in particular, we also obtain a new result that a partial Boolean function with exact quantum 1-query complexity is constructed and it cannot be computed by D–J algorithm. Further problems are pointed out for future study.

SPIN•Aug 12, 2021•3 citations

DE-QUANTIZING THE SOLUTION OF DEUTSCH'S PROBLEM

Cristian S. Calude

Probably the simplest and most frequently used way to illustrate the power of quantum computing is to solve the so-called Deutsch's problem. Consider a Boolean function f: {0,1} → {0,1} and suppose that we have a (classical) black box to compute it. The problem asks whether f is constant [that is, f(0) = f(1)] or balanced [f(0) ≠ f(1)]. Classically, to solve the problem seems to require the computation of f(0) and f(1), and then the comparison of results. Is it possible to solve the problem with only one query on f? In a famous paper published in 1985, Deutsch posed the problem and obtained a "quantum" partial affirmative answer. In 1998, a complete, probability-one solution was presented by Cleve, Ekert, Macchiavello and Mosca. Here we will show that the quantum solution can be de-quantized to a deterministic simpler solution which is as efficient as the quantum one. The use of "superposition," a key ingredient of quantum algorithm, is — in this specific case — classically available.

International Journal of Quantum Information•May 30, 2007•20 citations

Distributed exact quantum algorithms for Deutsch-Jozsa problem

Hao Li, Daowen Qiu, Le Luo

Deutsch-Jozsa (DJ) problem is one of the most important problems demonstrating the power of quantum algorithm. DJ problem can be described as a Boolean function $f$: $\{0,1\}^n\rightarrow \{0,1\}$ with promising it is either constant or balanced, and the purpose is to determine which type it is. DJ algorithm can solve it exactly with one query. In this paper, we first discover the inherent structure of DJ problem in distributed scenario by giving a number of equivalence characterizations between $f$ being constant (balanced) and some properties of $f$'s subfunctions, and then we propose three distributed exact quantum algorithms for solving DJ problem. Our algorithms have essential acceleration over distributed classical deterministic algorithm, and can be extended to the case of multiple computing nodes. Compared with DJ algorithm, our algorithms can reduce the number of qubits and the depth of circuit implementing a single query operator. Therefore, we find that the structure of problem should be clarified for designing distributed quantum algorithm to solve it.

arXiv:2303.10663•Mar 19, 2023•5 citations

On the exact quantum query complexity of $\text{MOD}_m^n$ and $\text{EXACT}_{k,l}^n$

Yao, Penghui, Ye, Zekun

The query model has generated considerable interest in both classical and quantum computing communities. Typically, quantum advantages are demonstrated by showcasing a quantum algorithm with a better query complexity compared to its classical counterpart. Exact quantum query algorithms play a pivotal role in developing quantum algorithms. For example, the Deutsch-Jozsa algorithm demonstrated exponential quantum advantages over classical deterministic algorithms. As an important complexity measure, exact quantum query complexity describes the minimum number of queries required to solve a specific problem exactly using a quantum algorithm. In this paper, we consider the exact quantum query complexity of the following two $n$-bit symmetric functions $\text{MOD}_m^n:\{0,1\}^n \rightarrow \{0,...,m-1\}$ and $\text{EXACT}_{k,l}^n:\{0,1\}^n \rightarrow \{0,1\}$, which are defined as $\text{MOD}_m^n(x) = |x| \bmod m$ and $ \text{EXACT}_{k,l}^n(x) = 1$ iff $|x| \in \{k,l\}$, where $|x|$ is the number of $1$'s in $x$. Our results are as follows: i) We present an optimal quantum algorithm for computing $\text{MOD}_m^n$, achieving a query complexity of $\lceil n(1-\frac{1}{m}) \rceil$ for $1 < m \le n$. This settles a conjecture proposed by Cornelissen, Mande, Ozols and de Wolf (2021). Based on this algorithm, we show the exact quantum query complexity of a broad class of symmetric functions that map $\{0,1\}^n$ to a finite set $X$ is less than $n$. ii) When $l-k \ge 2$, we give an optimal exact quantum query algorithm to compute $\text{EXACT}_{k,l}^n$ for the case $k=0$ or $k=1,l=n-1$. This resolves the conjecture proposed by Ambainis, Iraids and Nagaj (2017) partially.

arXiv:2303.10935•Mar 20, 2023•0 citations

De-Quantising the Solution of Deutsch's Problem

Cristian S. Calude

Probably the simplest and most frequently used way to illustrate the power of quantum computing is to solve the so-called {\it Deutsch's problem}. Consider a Boolean function $f: \{0,1\} \to \{0,1\}$ and suppose that we have a (classical) black box to compute it. The problem asks whether $f$ is constant (that is, $f(0) = f(1)$) or balanced ($f(0) \not= f(1)$). Classically, to solve the problem seems to require the computation of $f(0)$ and $ f(1)$, and then the comparison of results. Is it possible to solve the problem with {\em only one} query on $f$? In a famous paper published in 1985, Deutsch posed the problem and obtained a ``quantum'' {\em partial affirmative answer}. In 1998 a complete, probability-one solution was presented by Cleve, Ekert, Macchiavello, and Mosca. Here we will show that the quantum solution can be {\it de-quantised} to a deterministic simpler solution which is as efficient as the quantum one. The use of ``superposition'', a key ingredient of quantum algorithm, is--in this specific case--classically available.

arXiv:quant-ph/0610220•Oct 26, 2006•1 citation
The Deutsch-Jozsa algorithm is one of the first examples of a quantum algorithm that is exponentially faster than any possible deterministic classical algorithm. It was proposed by Deutsch and Jozsa in 1992 with improvements by Cleve, Ekert, Macchiavello, and Mosca in 1998. The Deutsch-Jozsa problem is a promise problem and we can equivalently describe it as a partial function DJn0:0,1n\ensuremath→0,1{\text{DJ}}_{n}^{0}:{{0,1}}^{n}\ensuremath{\rightarrow}{0,1}DJn0​:0,1n\ensuremath→0,1 defined as DJn0(x)=1{\text{DJ}}_{n}^{0}(x)=1DJn0​(x)=1 for ∣x∣=n/2,DJn0(x)=0|x|=n/2, {\text{DJ}}_{n}^{0}(x)=0∣x∣=n/2,DJn0​(x)=0 for ∣x∣=0,n|x|=0,n∣x∣=0,n, and it is undefined for the rest of the cases, where nnn is even, and ∣x∣|x|∣x∣ is the Hamming weight of xxx. The optimal quantum algorithm needs only one query to compute DJn0{\text{DJ}}_{n}^{0}DJn0​ but the classical deterministic algorithm requires 2n\ensuremath−1+1{2}^{n\ensuremath{-}1}+12n\ensuremath−1+1 queries to compute it in the worse case. In this article, we generalize the Deutsch-Jozsa problem as DJnk(x)=1{\text{DJ}}_{n}^{k}(x)=1DJnk​(x)=1 for ∣x∣=n/2,DJnk(x)=0|x|=n/2, {\text{DJ}}_{n}^{k}(x)=0∣x∣=n/2,DJnk​(x)=0 for ∣x∣|x|∣x∣ in the set 0,1,...,k,n\ensuremath−k,n\ensuremath−k+1,...,n{0,1,...,k,n\ensuremath{-}k,n\ensuremath{-}k+1,...,n}0,1,...,k,n\ensuremath−k,n\ensuremath−k+1,...,n, and it is undefined for the rest of the cases, where 0\ensuremath≤k<n/20\ensuremath{\le}k<n/20\ensuremath≤k<n/2. In particular, we give and prove an optimal exact quantum query algorithm with complexity k+1k+1k+1 for computing the generalized Deutsch-Jozsa problem DJnk{\text{DJ}}_{n}^{k}DJnk​. It is clear that the case of k=0k=0k=0 is in accordance with the Deutsch-Jozsa problem. Also, we give a method for finding the approximate and exact degrees of symmetric partial Boolean functions.
We give and prove an optimal exact quantum query algorithm with complexity k+1k+1k+1 for computing the promise problem (i.e., symmetric and partial Boolean function) DJnkDJ_n^kDJnk​ defined as: DJnk(x)=1DJ_n^k(x)=1DJnk​(x)=1 for ∣x∣=n/2|x|=n/2∣x∣=n/2, DJnk(x)=0DJ_n^k(x)=0DJnk​(x)=0 for ∣x∣|x|∣x∣ in the set {0,1,…,k,n−k,n−k+1,…,n}\{0, 1,\ldots, k, n-k, n-k+1,\ldots,n\}{0,1,…,k,n−k,n−k+1,…,n}, and it is undefined for the rest cases, where nnn is even, ∣x∣|x|∣x∣ is the Hamming weight of xxx. The case of k=0k=0k=0 is the well-known Deutsch-Jozsa problem. We outline all symmetric (and partial) Boolean functions with degrees 1 and 2, and prove their exact quantum query complexity. Then we prove that any symmetrical (and partial) Boolean function fff has exact quantum 1-query complexity if and only if fff can be computed by the Deutsch-Jozsa algorithm. We also discover the optimal exact quantum 2-query complexity for distinguishing between inputs of Hamming weight {⌊n/2⌋,⌈n/2⌉}\{ \lfloor n/2\rfloor, \lceil n/2\rceil \}{⌊n/2⌋,⌈n/2⌉} and Hamming weight in the set {0,n}\{ 0, n\}{0,n} for all odd nnn. In addition, a method is provided to determine the degree of any symmetrical (and partial) Boolean function.
Deutsch–Jozsa problem (D–J) has exact quantum 1-query complexity (“exact” means no error), but requires super-exponential queries for the optimal classical deterministic decision trees. D–J problem is equivalent to a symmetric partial Boolean function, and in fact, all symmetric partial Boolean functions having exact quantum 1-query complexity have been found out and these functions can be computed by D–J algorithm. A special case is that all symmetric Boolean functions with exact quantum 1-query complexity follow directly and these functions are also all total Boolean functions with exact quantum 1-query complexity obviously. Then there are pending problems concerning partial Boolean functions having exact quantum 1-query complexity and new results have been found, but some problems are still open. In this paper, we review these results regarding exact quantum 1-query complexity and in particular, we also obtain a new result that a partial Boolean function with exact quantum 1-query complexity is constructed and it cannot be computed by D–J algorithm. Further problems are pointed out for future study.
Probably the simplest and most frequently used way to illustrate the power of quantum computing is to solve the so-called Deutsch's problem. Consider a Boolean function f: {0,1} → {0,1} and suppose that we have a (classical) black box to compute it. The problem asks whether f is constant [that is, f(0) = f(1)] or balanced [f(0) ≠ f(1)]. Classically, to solve the problem seems to require the computation of f(0) and f(1), and then the comparison of results. Is it possible to solve the problem with only one query on f? In a famous paper published in 1985, Deutsch posed the problem and obtained a "quantum" partial affirmative answer. In 1998, a complete, probability-one solution was presented by Cleve, Ekert, Macchiavello and Mosca. Here we will show that the quantum solution can be de-quantized to a deterministic simpler solution which is as efficient as the quantum one. The use of "superposition," a key ingredient of quantum algorithm, is — in this specific case — classically available.
Deutsch-Jozsa (DJ) problem is one of the most important problems demonstrating the power of quantum algorithm. DJ problem can be described as a Boolean function fff: {0,1}n→{0,1}\{0,1\}^n\rightarrow \{0,1\}{0,1}n→{0,1} with promising it is either constant or balanced, and the purpose is to determine which type it is. DJ algorithm can solve it exactly with one query. In this paper, we first discover the inherent structure of DJ problem in distributed scenario by giving a number of equivalence characterizations between fff being constant (balanced) and some properties of fff's subfunctions, and then we propose three distributed exact quantum algorithms for solving DJ problem. Our algorithms have essential acceleration over distributed classical deterministic algorithm, and can be extended to the case of multiple computing nodes. Compared with DJ algorithm, our algorithms can reduce the number of qubits and the depth of circuit implementing a single query operator. Therefore, we find that the structure of problem should be clarified for designing distributed quantum algorithm to solve it.
On the exact quantum query complexity of MODmn\text{MOD}_m^nMODmn​ and EXACTk,ln\text{EXACT}_{k,l}^nEXACTk,ln​
The query model has generated considerable interest in both classical and quantum computing communities. Typically, quantum advantages are demonstrated by showcasing a quantum algorithm with a better query complexity compared to its classical counterpart. Exact quantum query algorithms play a pivotal role in developing quantum algorithms. For example, the Deutsch-Jozsa algorithm demonstrated exponential quantum advantages over classical deterministic algorithms. As an important complexity measure, exact quantum query complexity describes the minimum number of queries required to solve a specific problem exactly using a quantum algorithm. In this paper, we consider the exact quantum query complexity of the following two nnn-bit symmetric functions MODmn:{0,1}n→{0,...,m−1}\text{MOD}_m^n:\{0,1\}^n \rightarrow \{0,...,m-1\}MODmn​:{0,1}n→{0,...,m−1} and EXACTk,ln:{0,1}n→{0,1}\text{EXACT}_{k,l}^n:\{0,1\}^n \rightarrow \{0,1\}EXACTk,ln​:{0,1}n→{0,1}, which are defined as MODmn(x)=∣x∣ mod m\text{MOD}_m^n(x) = |x| \bmod mMODmn​(x)=∣x∣modm and $ \text{EXACT}_{k,l}^n(x) = 1$ iff ∣x∣∈{k,l}|x| \in \{k,l\}∣x∣∈{k,l}, where ∣x∣|x|∣x∣ is the number of 111's in xxx. Our results are as follows: i) We present an optimal quantum algorithm for computing MODmn\text{MOD}_m^nMODmn​, achieving a query complexity of ⌈n(1−1m)⌉\lceil n(1-\frac{1}{m}) \rceil⌈n(1−m1​)⌉ for 1<m≤n1 < m \le n1<m≤n. This settles a conjecture proposed by Cornelissen, Mande, Ozols and de Wolf (2021). Based on this algorithm, we show the exact quantum query complexity of a broad class of symmetric functions that map {0,1}n\{0,1\}^n{0,1}n to a finite set XXX is less than nnn. ii) When l−k≥2l-k \ge 2l−k≥2, we give an optimal exact quantum query algorithm to compute EXACTk,ln\text{EXACT}_{k,l}^nEXACTk,ln​ for the case k=0k=0k=0 or k=1,l=n−1k=1,l=n-1k=1,l=n−1. This resolves the conjecture proposed by Ambainis, Iraids and Nagaj (2017) partially.
Probably the simplest and most frequently used way to illustrate the power of quantum computing is to solve the so-called {\it Deutsch's problem}. Consider a Boolean function f:{0,1}→{0,1}f: \{0,1\} \to \{0,1\}f:{0,1}→{0,1} and suppose that we have a (classical) black box to compute it. The problem asks whether fff is constant (that is, f(0)=f(1)f(0) = f(1)f(0)=f(1)) or balanced (f(0)≠f(1)f(0) \not= f(1)f(0)=f(1)). Classically, to solve the problem seems to require the computation of f(0)f(0)f(0) and $ f(1)$, and then the comparison of results. Is it possible to solve the problem with {\em only one} query on fff? In a famous paper published in 1985, Deutsch posed the problem and obtained a ``quantum'' {\em partial affirmative answer}. In 1998 a complete, probability-one solution was presented by Cleve, Ekert, Macchiavello, and Mosca. Here we will show that the quantum solution can be {\it de-quantised} to a deterministic simpler solution which is as efficient as the quantum one. The use of ``superposition'', a key ingredient of quantum algorithm, is--in this specific case--classically available.