\documentclass[12pt]{article}\usepackage{epsfig} \textwidth 6in\textheight 8.5in\topmargin 0in\oddsidemargin 0.25in\evensidemargin 0.25in%======================== CROSS-REFERENCING ================== \newcommand{\app}[1]{Appendix~\ref{sect.#1}} \newcommand{\sect}[1]{\S\ref{sect.#1}}      % Ref. to section or subsection                                        %   to appear as, say, $2.37 \newcommand{\baresect}[1]{\ref{sect.#1}}      % Ref. to one more section or                                 %    subsection to appear as, say, 2.37 \newcommand{\eq}[1]{Eq.~(\ref{eq.#1})}	% Ref. to equation \newcommand{\bareeq}[1]{(\ref{eq.#1})}	% Ref. to equation \newcommand{\fig}[1]{Fig.~\ref{fig.#1}} \newcommand{\barefig}[1]{\ref{fig.#1}} \newcommand{\sectlabel}[1]{\label{sect.#1}} \newcommand{\eqlabel}[1]{\label{eq.#1}}% common number for a group of equations% a better way would be for mathletters to work directly with all%   equation, eqnarray, etc. environments rather than needing equationGroup...\newcounter{eqletter} \setcounter{eqletter}{0}\newenvironment{mathletters}{\setcounter{eqletter}{0}\refstepcounter{equation}% increment eqn number, make this ref for label\renewcommand{\theequation}{\arabic{equation}\alph{eqletter}}}{}% within mathletters, use equationGroup to group equations with same number\newenvironment{equationGroup}{\addtocounter{equation}{-1} % undo increment from equation environment\stepcounter{eqletter}\begin{equation}}{\end{equation}}%======================== FIGURES ========================\newcommand{\figdef}[3]{% label, body, caption\begin{figure}[!htb] \centering\leavevmode#2% \caption{\small #3} \label{fig.#1}\end{figure}                 }%======================== COMMON EXPRESSIONS ========================% boolean values -- command absorbs any following space, so must use e.g. \true\ ...\newcommand{\true}{\mbox{\sc true}}\newcommand{\false}{\mbox{\sc false}}% number of 1-bits in an assignment; inner braces required e.g. for a^\ones{x y}\newcommand{\ones}[1]{{| #1 |}}% bitwise and operation\newcommand{\bitA}{\wedge}% W matrix with hat: unnormalized version of the matrix\newcommand{\W}{\hat{W}}% expectation value\newcommand{\expect}[1]{% body\left\langle #1 \right\rangle}% state vectors\newcommand{\stateVec}[2]{ \pmatrix{ #1 \cr #2 \cr } }\newcommand{\stateVecV}[2]{ \pmatrix{ #1 \cr \vdots \cr #2 \cr } }\newcommand{\stateVecB}[4]{ \pmatrix{ #1 \cr #2 \cr #3 \cr #4 \cr } }% ket\newcommand{\ket}[1]{ { \left| #1 \right> }}\newcommand{\muCrit} { {\mu_{\rm crit}} }\newcommand{\cAvg} { { c_{\rm avg} }}%\newcommand{\mMax} { { m_{\rm max} }}\newcommand{\mMax} { M }\newcommand{\Nproblems}{ { N_{\rm problems} }}\newcommand{\Psoln}{ { P_{\rm soln} }}\newcommand{\Psoluble}{ { P_{\rm soluble} }}\newcommand{\Ns} { {N_s} }\newcommand{\Nss} { {N_{s'}} }\newcommand{\Nboth} { {N_{\rm both}} }\newcommand{\Nother} { {N_{\rm other}} }% scaled summation variables\newcommand{\s}[1]{ \hat{#1} }\newcommand{\sNs} { {\s{N}_s} }\newcommand{\sNss} { {\s{N}_{s'}} }\newcommand{\sNboth} { {\s{N}_{\rm both}} }\newcommand{\sNother} { {\s{N}_{\rm other}} }%=============================================\begin{document}\title{Single-Step Quantum Search Using Problem Structure}\author{Tad Hogg \\Xerox Palo Alto Research Center \\3333 Coyote Hill Road, Palo Alto, CA 94304 \\hogg@parc.xerox.com}\maketitle\begin{abstract}The structure of satisfiability problems is used to improve searchalgorithms for quantum computers and reduce their required coherencetimes. The asymptotic average behavior of the these algorithms isdetermined exactly, and used to identify the best algorithm from amonga class of methods that use only a single coherent evaluation ofproblem properties. The resulting algorithm improves on previousquantum algorithms for most random $k$-SAT problems, but remainsexponential for hard problem instances.  Compared to good classicalmethods, the algorithm performs better, on average, for weakly andhighly constrained problems but worse for hard cases, indicating theneed to include additional problem structure in quantum algorithms.\end{abstract}\section{Introduction}Quantumcomputers~\cite{benioff82,bernstein92,deutsch85,deutsch89,divincenzo95,feynman86,lloyd93,rieffel98}offer the possibility of faster combinatorial search by operatingsimultaneously on all search states. For instance, quantum computerscan rapidly factor integers~\cite{shor94}, a problem thought to beintractable for classical machines. A number of algorithms have beenproposed for combinatorial searchproblems~\cite{boyer96,brassard98,cerf98,cerny93,grover96,grover97a,hogg97,terhal97}. Inparticular, without making use of problem structure, quantum computersresult in a square root improvment in performance. This unstructuredsearch is the quantum equivalent of the classical generate-and-testprocedure and is the best improvement possible in this case. Furtherimprovement in performance requires using problem structure in thesearch, just as with classical heuristics.A major challenge in realizing the potential of quantum computersis maintaining coherence over many computationalsteps~\cite{landauer94a,unruh94,haroche96,monroe96a}. While thisdifficulty seems unlikely to be a fundamentallimitation~\cite{berthiaume94,shor95,knill98} and small quantumcomputations have been implemented~\cite{chuang98,chuang98a}, thetechnical challenge of maintaining coherence can be reduced bydeveloping quantum algorithms that minimize the required coherencetime.Thus an important open question is the extent to which problemstructure can not only improve the performance of quantum search butalso reduce the number of steps, and hence the required coherencetime. As an extreme case, we consider the performance of single-stepquantum search, i.e., algorithms that make use of only a singleevaluation of structure associated with a problem. Single-step searchis very effective for highly constrained problems~\cite{hogg98},outperforming both unstructured quantum search and classicalheuristics in these cases.  By requiring only one step, it also needsless coherence time than the exponentially many steps required by theunstructured algorithm, and hence should be easier to implement. Canthe technique used for highly constrained problems be extended to themore challenging case of hard search problems with an intermediatenumber of constraints~\cite{cheeseman91,hogg95e}? Conversely, to whatextent does the restriction to a single step limit the extent to whichthe capabilities of quantum computers can be used?Addressing these questions requires determining the asymptoticbehavior of the algorithm. Algorithms that use problem structure, suchas classical heuristics, are often difficult to analyze theoreticallydue to the complicated dependencies introduced by the characteristicsof the particular problem instance. Thus one is often forced to useempirical evaluation, which is a major limitation for evaluatingquantum algorithms since classical simulations of quantum algorithmshave an exponential slowdown. By limiting the use of suchdependencies, a single-step search algorithm can be simpler to analyzethan multistep quantum searches.This paper, demonstrates the potential of this approach for algorithmsthat use the number of conflicts in each search state. Furthermore, weshow how to evaluate the asymptotic average scaling behavior of thealgorithm directly, rather than relying on empirical evaluation. Thisevaluation is used to optimize the algorithm, and also demonstrates ageneral technique for studying the average behavior of quantum searchalgorithms.In the remainder of this paper, we first summarize the satisfiabilitysearch problem and then describe a class of one-step quantumalgorithms for this problem. This class includes both the previousunstructured and highly constrained methods as special cases. In\sect{analysis}, the average behavior of these algorithms isdetermined. This result is then used to identify the best performingalgorithms for problems with differing degrees of constraint in thefollowing two sections. Finally we discuss the precision requirementson the parameters used in the algorithms and some additionalproperties of the search behavior.\section{Satisfiability}\sectlabel{sat}One well-studied compbinatorial search problem~\cite{garey79} issatisfiability (SAT), which consists of a logical propositionalformula in $n$ variables $V_1,\ldots,V_n$ and the requirement to finda value (\true\ or \false) for each variable that makes the formulatrue. This problem has $N=2^n$ assignments. For $k$-SAT, the formulaconsists of a conjunction of clauses and each clause is a disjunctionof $k$ variables, any of which may be negated. For $k \geq 3$ theseproblems are NP-complete. An example of such a clause for $k=3$, withthe third variable negated, is $V_1$ OR $V_2$ OR (NOT $V_3$), which isfalse for exactly one assignment for these variables: $\{V_1=\false,V_2=\false, V_3=\true\}$. A clause with $k$ variables is false forexactly one assignment to those variables, and true for the other$2^k-1$ choices.  Since the formula is a conjunction of clauses, asolution must satisfy every clause. We say an assignment conflictswith a particular clause when the values the assignment gives to thevariables in the clause make the clause false.  For example, in a fourvariable problem, the assignment $$\{V_1=\false, V_2=\false,V_3=\true, V_4=\true\}$$ conflicts with the $k=3$ clause given above,while $$\{V_1=\false, V_2=\false, V_3=\false, V_4=\true\}$$ doesnot. Thus each clause is a constraint that adds one conflict to allassignments that conflict with it. The number of distinct clauses $m$is then the number of constraints in the problem.The assignments for SAT can also be viewed as bit-strings with thecorrespondence that the $i^{th}$ bit is 0 or 1 according to whether$V_i$ is assigned the value false or true, respectively. In turn,these bit-strings are the binary representation of integers, rangingfrom 0 to $2^n-1$.  For definiteness, we arbitrarily order the bits sothe values of $V_1$ and $V_n$ correspond, respectively, to the leastand most significant bits of the integer. For example, the assignment$$\{V_1=\false, V_2=\false, V_3=\true, V_4=\false\}$$ corresponds tothe integer whose binary representation is 0100, i.e., the number 4.For bit-strings $r$ and $s$, let $\ones{s}$ be the number of 1-bits in$s$ and $r \bitA s$ the bitwise AND operation on $r$ and $s$. Thus$\ones{r \bitA s}$ counts the number of 1-bits both assignments havein common. We also use $d(r,s)$ as the Hamming distance between $r$and $s$, i.e., the number of positions at which they have differentvalues. These quantities are related by\begin{equation}\eqlabel{hamming}d(r,s) = \ones{r} + \ones{s} - 2 \ones{r \bitA s}\end{equation}Let $c(s)$ be the number of conflicts for assignment $s$ in a givenSAT problem.An example 1-SAT problem with $n=2$ is the propositional formula (NOT$V_1$) AND (NOT $V_2$).  This problem has a unique solution:$\{V_1=\false, V_2=\false\}$, an assignment with the bitrepresentation 00. The remaining assignments for this problem have bitrepresentations 01, 10, and 11.Theoretically, search algorithms are often evaluated for the worstpossible case. However, in practice, search problems are often foundto be considerably easier than suggested by these worst caseanalyses~\cite{hogg95e}.  This observation leads to examining thetypical behavior of search algorithms with respect to a specified {\emensemble} of problems, i.e., a class of problems and a probability foreach to occur. A commonly studied ensemble is random $k$-SAT,specified by the number of variables $n$, the size of the clauses $k$and the number of distinct\footnote{This ensemble differs slightlyfrom other studies where the clauses are not required to be distinct.}clauses $m$. A problem instance is created by randomly selecting $m$distinct clauses from the set of all possibleclauses~\cite{nijenhuis78}. When $n$ is large, the typical behavior ofrandom $k$-SAT is determined by $\mu = m/n$, the ratio of clauses tovariables. In particular, for each $k$ there is a threshold value$\muCrit$ on $\mu$ below which most random $k$-SAT problems aresoluble and above which most have nosolutions~\cite{crawford95,selman95}. For $k=3$, this value isapproximately $\muCrit=4.2$.The quantum searches considered here are incomplete methods, i.e.,they can find a solution if one exists but can never guarantee nosolution exists. For studying such algorithms, the ensembles wouldideally contain only instances with a solution. For example, we couldconsider the ensemble of random {\em soluble} $k$-SAT, in which eachinstance with at least one solution is equally likely to appear.Unfortunately, this ensemble does not have a simple expression for thenumber of problems as required for the analytic performance evaluationgiven below. Instead, for $\mu < \muCrit$, most random problems indeedhave a solution so random $k$-SAT is useful for studying incompletesearch methods for underconstrained problems.Randomly selected overconstrained problems usually have no solutionsso random SAT is not a useful ensemble when $\mu>\muCrit$. Analternative with simple analytic properties is the ensemble with aprespecified solution. In this case, a particular assignment isselected to be a solution. Then the $m$ clauses are selected fromamong those that do not conflict with the prespecifiedsolution. Compared to random selection among soluble problems, using aprespecified solution is more likely to pick problems with manysolutions, resulting in somewhat easier search problems, on average.Each clause in a $k$-SAT formula conflicts with exactly one of the$2^k$ possible assignments for the variables that appear in theclause. Thus the average number of conflicts in an assignment is$\cAvg = m/2^k$. While this average is the same for {\em all} SAT problemswith given $m$ and $k$, the variance in the number of conflicts variesfrom problem to problem. For the random ensemble, the average value ofthe variance is $\cAvg (1-2^{-k})$.  Thus when $m \gg 1$, the relativedeviation decreases as $O(1/\sqrt{m})$ and hence most assignments have anumber of conflicts very close to the average.\section{Quantum Search Algorithms}Quantum computers use physical devices whose full quantum state can becontrolled. For example~\cite{divincenzo95}, an atom in its groundstate could represent a bit set to 0, and an excited state for 1. Theatom can be switched between these states and also be placed in auniquely quantum mechanical {\em superposition} of these values, whichcan be denoted as a vector $\stateVec{\psi_0}{\psi_1}$, with acomponent (called an {\em amplitude}) for each of the correspondingclassical states for the system. These amplitudes are complex numbers.A quantum machine with $n$ quantum bits exists in a superposition ofthe $2^n$ classical states for $n$ bits.  The amplitudes have aphysical interpretation: when the computer's state is measured, thesuperposition randomly changes to one of the classical states with$|\psi_s|^2$ being the probability to obtain the state $s$. Thusamplitudes satisfy the normalization condition $\sum_s |\psi_s|^2 =1$. This measurement operation is used to obtain definite results froma quantum computation.Quantum algorithms use operations that rapidly manipulate theamplitudes in a superposition. Because quantum mechanics is linear andthe normalization condition must always be satisfied, these operationsare limited to unitary linear operators. That is, a state vector$\psi$ can only change to a new vector $\psi^\prime$ related to theoriginal one by a unitary transformation, i.e., $\psi' = U \psi$ where$U$ is a unitary matrix\footnote{A complex matrix $U$ is unitary when$U^\dagger U = I$, where $U^\dagger$ is the transpose of $U$ with allelements changed to their complex conjugates. Examples includepermutations, rotations and multiplication by phases (complex numberswhose magnitude is one).} of dimension $2^n \times 2^n$. In spite ofthe exponential size of the matrix, in many cases the operation can beperformed in a time that grows only as a polynomial in $n$ by quantumcomputers~\cite{boyer96,hoyer97}. Importantly, the quantum computerdoes not explicitly form, or store, the matrix $U$. Rather it performsa series of elementary operations whose net effect is to produce thenew state vector $\psi'$. The components of the new vector are notdirectly accessible: rather they determine the probabilities ofobtaining various results when the state is measured.Search algorithms for SAT problems can make use of readily computedproperties of individual assignments, e.g., a test of whether a givenassignment is a solution. With quantum computers, these properties canbe evaluated simutaneously for all assignments. In this paper we focuson algorithms that make use of this simutaneous evaluation just once.\subsection{Single-Step Search}Single-step methods could be implemented in a variety of ways. Onesimple approach starts with an equal superposition of all theassignments, adjusts the phases based on the number of conflicts ineach of the assignments, and then mixes the amplitudes from differentassignments. This algorithm requires only a single testing of theassignments, corresponding to a single classical search step.For a $k$-SAT problem with $n$ variables and $m$ clauses, thealgorithm takes the following form.  The initial state has amplitude$\psi_s=2^{-n/2}$ for each of the $2^n$ assignments $s$, and the finalstate vector is $\phi = U P \psi $ where the matrices $P$ and $U$ aredefined as follows. The matrix $P$ is diagonal with $P_{ss} =p_{c(s)}$ depending on the number of conflicts $c$ in the assignment$s$, ranging from 0 to $m$.The mixing matrix is defined in terms of two simpler operations: $U =W T W$.  The Walsh transform $W$ has entries\begin{equation}\eqlabel{W}W_{rs} = 2^{-n/2} (-1)^\ones{r \bitA s}\end{equation}for assignments $r$ and $s$ and can be implementedefficiently~\cite{boyer96,grover96}.  The matrix $T$ is diagonal withelements $T_{rr}=t_{\ones{r}}$ depending only on the number of 1-bitsin each assignment, ranging from 0 to $n$.  These definitions for $W$and $T$ lead to a mixing matrix $U$ whose elements $U_{rs}=u_{d(r,s)}$depend only on the Hamming distance between the assignments $r$ and$s$~\cite{hogg98}, with\begin{equation}\eqlabel{u}u_d = 2^{-n} \sum_{h z} (-1)^z {d \choose z} {n-d \choose h-z} t_h\end{equation}Unlike previous algorithms, where the phase choices are restricted to$\pm 1$ or powers of $i$, this algorithm potentially uses a differentphase choice for each number of conflicts and each number of 1-bits inan assignment. Because the number of conflicts in a given assignmentis efficiently computable for SAT problems, these phase choices can beefficiently implemented~\cite{hogg98b}.This procedure defines a class of algorithms. A particular choice ofthe phases $p_c$ and $t_h$ is required to complete the algorithm'sspecification. For example, the choices $p_0=1$, $t_0=1$ and theremaining phases set to $-1$ gives a single step of the unstructuredsearch algorithm~\cite{grover96}. Similarly, $p_c=i^c$ and $t_h=i^h$gives an algorithm appropriate for maximally constrained 1-SATproblems~\cite{hogg98}.\subsection{Selecting Phase Values}\sectlabel{scaling}To motivate the choice of phases appropriate for large $k$-SATproblems, note that the number of assignments with $h$ 1-bits is $n\choose h$. So for large $n$, most states have $h$ close to$n/2$. Similarly, the number of assignments at Hamming distance $d$from a given solution is $n \choose d$, which is also concentratednear $d=n/2$. Because the algorithm starts with an equal amplitude inall states, achieving significant amplitude in a given solution withthe mixing matrix $U$ requires significant contribution from the vastmajority of states whose distance from that solution, $d$, is close to$n/2$. Thus for large $n$, we can expect the behavior of the algorithmto be dominated by the behavior of $u_d$ near $d=n/2$. In turn, thisleads to a focus on the behavior of the phases $t_h$ for $h$ near$n/2$.Similarly, for the phases $p_c$ based on the number of conflicts inthe states, provided the number of clauses is large, i.e., $m \gg 1$,most assignments will have nearly the average number of conflicts$\cAvg= m/2^k$. Thus the behavior of the algorithm will be dominatedby the phase choices near this average value.Asymptotically, as $n$ increases we can expect the behavior of thephases near the average values will be the only important choicesinfluencing the algorithm's behavior.  A constant value for the phasesjust gives an overall phase factor for the resulting amplitude, whichhas no effect on the probability to find a solution but can be chosento slightly simplify the analysis. Thus we are led to consider alinear variation in the phase values. In this case, the phase choicesare described by two constants $\rho$ and $\tau$ so\begin{equation}\eqlabel{rho}p_c = e^{i \pi \rho (c-\cAvg)}\end{equation}and\begin{equation}\eqlabel{th}t_h = e^{i \pi \tau (h-n/2)}\end{equation}Because $c$ and $h$ are integers, it is sufficient to consider valuesfor $\rho$ and $\tau$ in the range $-1$ to 1. Furthermore, changingthe sign of both $\rho$ and $\tau$ simply changes the resultingamplitude to its complex conjugate.  Thus we can further restrictconsideration to $\tau$ in the range 0 to 1.From \eq{u}, this choice for $t_h$ and the binomial theorem give\begin{equation}\eqlabel{ud}u_d = \cos^n\left(  \frac{\pi \tau}{2} \right) \tan^d\left(  \frac{\pi \tau}{2} \right) (-i)^d\end{equation}For example, when $\tau=1/2$, $u_d = 2^{-n/2} (-i)^d$ as used forsolving 1-SAT problems~\cite{hogg98}. When $1/2 < \tau <1$, themagnitude of $u_d$ increases with $d$, leading to relatively littleconnection between solutions and states at distances less than $n/2$from them. For $k$-SAT problems, states with relatively few conflictstend to be clustered. So we can expect it will be advantageous toemphasize the mixing at distances less than $n/2$ by selecting $\tau <1/2$. As shown below, the best values for $\tau$ do indeed satisfythis criterion.Completing the algorithm requires particular choices for $\rho$ and$\tau$.  The asymptotic analysis given below shows how these choices canoptimize the performance based on the values of $k$ and $m/n$.\section{Analysis for Random $k$-SAT}\sectlabel{analysis}After completing the algorithm, the amplitude in assignment $r$ is\begin{equation}\eqlabel{phi}\phi_r = \sum_s U_{rs} P_s \frac{1}{2^{n/2}} = \frac{1}{2^{n/2}} \sum_{s} u_{d(r,s)} \sum_c p_c \chi(s,c)\end{equation}where $\chi(s,c)$ is 1 if the assignment $s$ has $c$ conflicts, andotherwise $\chi(s,c)=0$. The probability to find a solution when thisstate is measured is\begin{equation}\eqlabel{pSoln}\Psoln = \sum_{\{r | \mbox{\scriptsize $r$ is a solution}\}} |\phi_r|^2 = \sum_r |\phi_r|^2 \chi(r,0)\end{equation}When the phase choices are particularly simple, as with theunstructured search algorithm~\cite{grover96}, or the problem has asimple relation between Hamming distance from a solution and number ofconflicts, as in 1-SAT problems~\cite{hogg98}, this expression for$\Psoln$ can be evaluated to give a simple analytic result. In moregeneral cases, the solution probability can only be evaluated with aclassical simulation, limiting the study of more complex algorithms orproblem structures to relatively small sizes. A third approach toevaluating $\Psoln$ is to average over an ensemble of problems. Thisapproach is developed in the remainder of this section and shows howthe structure of search problem ensembles can be used to analyze theasymptotic behavior of the algorithm, and hence used to select thebest phase values to use.\subsection{Average Behavior}Averaging over a simple ensemble of problems reduces the evaluation ofthe algorithm's behavior to that of counting the likelihood of varioustypes of problems in the ensemble. Using \eq{phi} and \bareeq{pSoln},the average probability of finding a solution is\begin{equation}\eqlabel{pSolnAvg}\expect{\Psoln}=\frac{1}{2^n} \sum_r \sum_{ss'} u_{d(r,s)} u_{d(r,s')}^*  	\sum_{cc'} p_c p_{c'}^* \expect{\chi(s,c) \chi(s',c')\chi(r,0)}\end{equation}The expected value $\expect{\chi(s,c) \chi(s',c')\chi(r,0)}$ is justthe fraction of problems for which $r$ is a solution and $s$ and $s'$have, respectively, $c$ and $c'$ conflicts. To evaluate this sum, let$a$ be the number of conflicts $s$ and $s'$ have in common, and let$b=c-a$ and $b'=c'-a$ be their respective numbers of distinctconflicts. With \eq{rho}, the inner sum over $c$ and $c'$ in\eq{pSolnAvg} becomes\begin{equation}\eqlabel{cSum}\sum_{bb'} e^{i \pi \rho (b-b')} \sum_a \expect{\chi(s,b+a) \chi(s',b'+a)\chi(r,0)}\end{equation}The sum over $a$ just gives the fraction of problems$\Nproblems(b,b')/\Nproblems$ for which $r$ is a solution and $s$ and$s'$ have, respectively, $b$ and $b'$ unique conflicts.Here $\Nproblems$ is the number of problems in the ensemble.This expectation value is readily determined for the ensemble ofrandom $k$-SAT with $m$ clauses which has $\mMax = {n\choose k} 2^k $ possible clauses to select from and\begin{equation}\Nproblems = {\mMax \choose m}\end{equation}possible problems, each of which is equally likely to be selected.$\Nproblems(b,b')$ is the number of ways $m$ clauses can be selectedfrom the $\mMax$ available to satisfy the conditions on $r$, $s$ and $s'$.\figdef{venn}{\epsfig{file=venn.eps,height=1.5in}}{Clause selection. The figure shows how the $\mMax$ possible clausesare grouped. The dark gray region represents clauses that conflictwith $r$ and so cannot be selected. The white regions representclauses that conflict only with $s$ or $s'$. The selected clauses mustinclude $b$ and $b'$ conflicting only with $s$ and $s'$,respectively. The remaining $m-b-b'$ clauses must be selected from thelight gray region: conflicting with both $s$ and $s'$ or withneither.}The possible clause selection is illustrated in \fig{venn}. For givenassignments $r$, $s$ and $s'$, let $\Ns$ and $\Nss$ be the number ofclauses that conflict only with $s$ and $s'$, respectively, and$\Nother$ the number that do not conflict with $r$ and conflict withboth $s$ and $s'$ or neither (the light gray region in \fig{venn}).Then we have\begin{equation}\eqlabel{problems}\Nproblems(b,b') = {\Ns \choose b} {\Nss \choose b'} {\Nother \choose m-b-b'}\end{equation}as the number of problems for which $s$ and $s'$ have, respectively,$b$ and $b'$ unique conflicts, and $r$ is a solution. \figdef{wxyz}{\begin{picture}(140,100)	\put(85,100){\makebox(0,0){$ \overbrace{\makebox(120,0){}}^n $}}	\put(20,70){		\begin{picture}(120,20)		\put(0,0){\framebox(120,20){}}		\end{picture}	}	\put(20,45) {	\begin{picture}(120,20)		\put(0,0){\framebox(60,20){}}		\put(60,0){\framebox(60,20){\rule{60pt}{20pt}}}	\end{picture}	}	\put(20,20) {	\begin{picture}(120,20)		\put(0,0){\framebox(30,20){}}		\put(30,0){\framebox(60,20){\rule{60pt}{20pt}}}		\put(90,0){\framebox(30,20){}}	\end{picture}	}	\put(35,10){\makebox(0,0){$w$}}	\put(65,10){\makebox(0,0){$x$}}	\put(95,10){\makebox(0,0){$y$}}	\put(125,10){\makebox(0,0){$z$}}	\put(10,80){\makebox(0,0){$r$}}	\put(10,55){\makebox(0,0){$s$}}	\put(10,30){\makebox(0,0){$s'$}}\end{picture}}{Grouping of variables based on assigned values in $r$, $s$ and $s'$,each shown as a horizontal box schematically indicating valuesassigned to each of the $n$ variables. In each assignment, the valuegiven in $r$ to a variable is shown as white, while black indicatesthe opposite value. In this diagram, variables are grouped accordingto the differences in values they are given in the threeassignments. For instance, the first group, consisting of $w$variables, has those variables assigned the same value in all threeassignments.}To determine values for $\Ns$, $\Nss$ and $\Nother$,consider the $n$ variables in four mutually exclusive groups based onthe values they are assigned in $r$, $s$ and $s'$, as illustrated in\fig{wxyz}:\begin{enumerate}\item the $w$ variables with the same values in all three assignments\item the $x$ variables with the same value in $r$ and $s$, but opposite value in $s'$\item the $y$ variables with the same value in $s$ and $s'$, opposite that of $r$\item the $z$ variables with the same value in $r$ and $s'$, but opposite value in $s$\end{enumerate}Assignment $r$ conflicts with $n \choose k$ clauses leaving$\mMax - {n \choose k}$ clauses available for selection.The principle of inclusion and exclusion~\cite{palmer85} gives thenumber of available clauses that conflict with\begin{mathletters}\eqlabel{clauses}  % clauses refers to the group of equations\begin{itemize}\item both $s$ and $s'$is the number that conflict with both $s$ and $s'$ minus the number ofthose that also conflict with $r$:\begin{equationGroup}\Nboth = {w + y \choose k} - {w \choose k}\end{equationGroup}\item $s$ only is\begin{equationGroup}\Ns = {n \choose k} - {w+x \choose k} - \Nboth\end{equationGroup}\item $s'$ only is\begin{equationGroup}\Nss = {n \choose k} - {w+z \choose k} - \Nboth\end{equationGroup}\item both $s$ and $s'$ or with neither is\begin{equationGroup}\Nother = {n \choose k}(2^k-1) - \Ns - \Nss\end{equationGroup}\end{itemize}\end{mathletters} % can add \eqlabel to individual group members if neededThrough the expressions of \eq{clauses}, $\Nproblems(b,b')$ given in\eq{problems} depends on $w$, $x$, $y$ and $z$, but otherwise isindependent of the choice of assignments $r$, $s$ and$s'$. Furthermore, $n=w+x+y+z$, $d(r,s)=y+z$ and $d(r,s')=x+y$.  Thus,in \eq{pSolnAvg} the sum over the assignments $s$ and $s'$ can be rewrittenas a sum over $x$, $y$ and $z$ (with $w=n-x-y-z$) times the number ofways to pick $s$ and $s'$ with assigned values matching each otherand those of $r$ as specified by the values of $w$, $x$, $y$ and $z$. Thislatter quantity is just the multinomial coefficient $n \choosew,x,y,z$.  Finally, because the quantities in the sum depend on $w$,$x$, $y$ and $z$ but not the specific choice of the assignment $r$,the sum $2^{-n} \sum_r$ appearing in \eq{pSolnAvg} just givesone. Thus for the ensemble of random $k$-SAT, \eq{pSolnAvg} becomes\begin{equation}\eqlabel{pSolnRandom}\expect{\Psoln}= \sum_{xyz} {n \choose w,x,y,z} u_{y+z} u_{x+y}^* \sum_{bb'}  e^{i \pi \rho (b-b')} \frac{\Nproblems(b,b')}{\Nproblems}  \end{equation}\subsection{Asymptotic Behavior}For the random $k$-SAT ensemble, \eq{pSolnRandom} gives the exactvalue for $\expect{\Psoln}$. Its asymptotic behavior as the number ofvariables and clauses increases can be determined using Stirling'sformula for the binomial coefficients~\cite{abramowitz65} and thenexpressing the sum as an integral that can be readily analyzed.The discussion in \sect{scaling} indicates the main contribution tothe sums of \eq{pSolnRandom} is from assignments with close to theaverage number of conflicts, $\cAvg= m/2^k$. That is, terms for which$b$ and $b'$ are $O(m)$. We thus use the scaled values $\s{b} = b/m$and $\s{b'}=b'/m$ to simplify the analysis. Similarly the maincontribution in the outer sum comes from values of $d(r,s)=y+z$ and$d(r,s')=x+y$ close to $n/2$. This suggests the scaling $\s{w} =w/n$,...,$\s{z} = z/n$. As we will see below, these are indeed theappropriate scaling behaviors for the dominant contributions to thesum.\subsubsection{Sum over Conflicts}With $w,x,y,z$ scaling as $O(n)$, the number of possible clauses$\mMax$ and each value in \eq{clauses} scale as ${n \choose k} =O(n^k)$. This value is much larger than the actual number of clauses$m$ that appear in hard problems, for which $m = O(n)$. We considerthe scaling for $m$ of $1 \ll m \ll n^k$. A convenient scaling for thenumbers of available clauses is $\s{N}_{\ldots} = N_{\ldots}/\mMax$ sothat\begin{eqnarray}\eqlabel{Nscaled}\sNboth 	&=&	\frac{(\s{w} + \s{y})^k - \s{w}^k}{2^k}  \\\sNs 	&=&	\frac{1 - (\s{w}+\s{x})^k}{2^k} - \sNboth	\nonumber \\\sNss 	&=&	\frac{1 - (\s{w}+\s{z})^k}{2^k} - \sNboth	\nonumber \\\sNother &=&	1-2^{-k} - \sNs - \sNss				\nonumber\end{eqnarray}with corrections of order $1/n$.When $R=O(n^k)$ and $S=O(m) \ll \sqrt{R}$, $R \choose S$ scales as $e^{S +S \log(R/S)} /\sqrt{2\pi S}$. Thus $\Nproblems(b,b')/\Nproblems$ scalesas $\exp(m X) m^{-1} Y$where\begin{equation}X = 	  \s{b}  \log \frac{\sNs}{\s{b}} 	+ \s{b}' \log \frac{\sNss}{\s{b}'}	+ (1-\s{b}-\s{b}') \log \frac{\sNother}{1-\s{b}-\s{b}'}\end{equation}and\begin{equation}Y = \frac{1}{2 \pi \sqrt{\s{b} \s{b}' (1-\s{b}-\s{b}')}}\end{equation}For the inner sum of \eq{pSolnRandom}, this quantity is multiplied by$\exp(i \pi m \rho (\s{b} - \s{b}'))$ and summed over $b$ and $b'$. When$m$ is large, this sum can be approximated by an integral over the scaledvariables $\s{b}$ and $\s{b}'$. This change to using scaled variablesintroduces a power of $m$ for each variable, so the sum is asymptotic to\begin{equation}m \int d\s{b} \,d\s{b}' \,Y \exp(m (X + i \pi \rho (\s{b} - \s{b}')))\end{equation}The asymptotic behavior of this integral as $m \rightarrow \infty$ isreadily evaluated by the method of steepest descents~\cite{bender78}.This involves considering complex values for the integration variablesand noting that the value of the integral is dominated by its behavioraround a stationary point, i.e., values for $\s{b}$ and $\s{b}'$ forwhich $X + i \pi \rho (\s{b} - \s{b}')$ has zero derivatives withrespect to $\s{b}$ and $\s{b}'$. Specifically, the integral isasymptotic to the value of the integrand at the stationary pointmultiplied by $2 \pi m^{-1} /\sqrt{-\det D}$ where $D$ is the matrixof 2nd derivatives of $X + i \pi \rho (\s{b} - \s{b}')$ evaluated atthe stationary point, and $\det D$ is its determinant. Evaluatingthese derivatives then shows the inner sum is asymptotic to $\exp(m I)$with\begin{equation}I = \log \left( 	e^{i \pi \rho} \sNs	+ e^{-i \pi \rho} \sNss	+ \sNother \right)\end{equation}which depends on $\s{w},\ldots,\s{z}$ through \eq{Nscaled}.As presented above, the expansion of the binomials involved in thissum required assuming $m \ll \sqrt{n^k}$. When $m$ is larger thanthis, some of the corrections to the expansion no longer go to zero as$m$ increases. However, if $\rho$ is small, specifically of order$n/m$, these additional corrections do not change the final asymptoticresult. As described below, this behavior of $\rho$ is the appropriatechoice for $m \gg n$ so we use this result over the full set ofscaling behaviors for $m$.\subsubsection{Sum Over Variable Groupings}For the remaining sum in \eq{pSolnRandom}, over $x$, $y$ and $z$, themultinomial scales as\begin{equation}{n \choose w,x,y,z} \sim \exp(n H) n^{-3/2} \sqrt{\frac{1}{(2 \pi)^3 \s{w} \s{x} \s{y} \s{z}}}\end{equation}with\begin{equation}\eqlabel{H}H = -\s{w} \log \s{w}-\ldots-\s{z} \log \s{z}\end{equation}and $\s{w} = 1 - \s{x}-\s{y}-\s{z}$.The $u_{y+z} u_{x+y}^*$ factors equal $\exp(n U)$ with\begin{equation}U = 2 \beta_C + \beta (\s{x}+2\s{y}+\s{z}) + i \pi (\s{x}-\s{z})/2\end{equation}where, from \eq{ud},\begin{eqnarray}\beta_C & = & \log(\cos(\pi \tau/2)) \\\beta  & = & \log(\tan(\pi \tau/2)) \nonumber\end{eqnarray}Combining these values with the result from the inner sum again givesa sum that can be approximated by an integral. After changing to scaledvariables this becomes\begin{equation}\eqlabel{integral}\expect{\Psoln} \sim  n^{3/2} \int d\s{x} \,d\s{y} \,d\s{z} \,	\sqrt{\frac{1}{(2 \pi)^3 \s{w} \s{x} \s{y} \s{z}}} \exp(n (H+U) + m I)\end{equation}with $\s{w}=1-\s{x}-\s{y}-\s{z}$.  The method of steepest descentsapplies to this integral. Thus, its asymptotic behavior is determinedby the stationary point, namely the values of $\s{x}$, $\s{y}$ and$\s{z}$ for which the derivatives of $n (H+U) + m I$ with respect tothese three variables are zero. Let $\Delta$ be the corresponding $3\times 3$ matrix of 2nd derivatives and $A$ the value of $-(H + U + Im/n)$, both evaluated at this point. The asymptotic behavior is then\begin{equation}\eqlabel{saddle}\expect{\Psoln} \sim 	\sqrt{\frac{-1}{\s{w} \s{x} \s{y} \s{z} \det \Delta}} \exp(-n A)\end{equation}evaluated at the stationary point.These quantitites depend on the parameters $k$, $\mu=m/n$,$\rho$ and $\tau$.Because of the powers of $k$ introduced with the numbers of availableclauses in \eq{Nscaled}, the stationary point has no simple closedform. However, it can be readily evaluated numerically. Thisevaluation can be used to select values for $\rho$ and $\tau$ tominimize the decay rate $A$. In this way the asymptotic analysis basedon the ensemble average can be used to optimize the searchalgorithm. In the following sections we describe the resultingbehavior of these optimal choices for problems with various scalingsof the number of clauses $m$.\section{Solving Hard Problems}For random $k$-SAT, the hardest problem instances are concentrated ata threshold value of $\mu=m/n$ depending on $k$. For 3-SAT, thisthreshold is at $\mu=4.2$~\cite{crawford95}. Thus we examine thebehavior of the single step algorithm when $\mu$ is constant.  In thiscase, the minimum decay rate $A$ is shown in \fig{optimal}.  Thecorresponding best choices for $\rho$ and $\tau$ are shown in\fig{parameters}. As one caveat, these values were obtained by numericalminimization of $A$ so could be local minima. If so, other choices for$\rho$ and $\tau$ would give even better performance than the valuesreported here.For comparison, \fig{optimal} also shows the scaling of randomselection, $\expect{S}/2^n$, where $S$ is the number of solutions. Theexpected number of solutions, and its exponential scaling, is readilycomputed for random $k$-SAT~\cite{williams92}. The unstructured searchrequires multiple steps, with a cost on the order of $\sqrt{S/2^n}$for a problem with $S$ solutions. As an approximate indication of theaverage cost for a problem ensemble in \fig{optimal}, we use$\sqrt{\expect{S/2^n}}$ instead of the exact value$\expect{\sqrt{S/2^n}}$ which cannot be analytically computed.\figdef{optimal}{\epsffile{optimal.eps}}{Smallest exponential decay rate $A$ for $\expect{\Psoln}$ as a function of$\mu=m/n$ for random 3-SAT. For comparison, the gray and dashed curvesshow the scaling for random selection and, approximately, forunstructured search.}\begin{table}[ht]\caption{Best parameter values and scaling behavior for single-step search of3-SAT problems for random and prespecified solutionensembles.}\label{values}\begin{center}\begin{tabular}{r|ccc||ccc} 	& \multicolumn{3}{c}{random} & \multicolumn{3}{c}{prespecified} \\$\mu$	& $\tau$	& $\rho$ 	& $A$ & $\tau$	& $\rho$  & $A$ \\ \hline1 & 	0.238 &  0.348 &  $0.027$ & 	0.239 &  0.344 &  $0.026$ \\2 & 	0.260 &  0.291 &  $0.094$ &  	0.262 &  0.286 &  $0.088$ \\3 & 	0.275 &  0.249 &  $0.181$ &  	0.278 &  0.242 &  $0.162$ \\4 & 	0.286 &  0.218 &  $0.280$ & 	0.293 &  0.211 &  $0.231$ \\5 &	0.295 &  0.195 &  $0.386$ & 	0.304 &  0.188 &  $0.281$ \\6 &	0.303 &  0.176 &  $0.497$ &	0.311 &  0.172 &  $0.309$\end{tabular}\end{center}\end{table}\figdef{parameters}{\epsffile{parameters.eps}}{Optimal choices of $\tau$ (black) and $\rho$ (gray) as a function of$\mu=m/n$. Solid curves are for the random 3-SAT ensemble and the dashedcurves are for the ensemble with a prespecified solution.}An important observation from these results is even the best use ofproblem structure based only on the number of conflicts cannot removethe exponential search cost with a single step algorithm of the typedescribed here. Thus for problems with $m=O(n)$, any possibility forfurther improvements in search performance requires more sophisticatedalgorithms, such as using multiple steps or incorporating additionalproblem structure. For example, using neighborhood information iscrucial for the performance of classical heuristics. As onecomparison, the cost of a classical heuristic method is empiricallyobserved~\cite{crawford95} to scale as $2^{n/19.5}$ for random 3-SATproblems near $\mu=4.2$, corresponding to a value of $A$ equal to$\log(2)/19.5=0.036$. This scaling is better than the single-stepquantum algorithm.A second observation from \fig{optimal} is, for $\mu$ less than about3.5, the optimal choices of $\rho$ and $\tau$ give exponentiallybetter performance, on average, than the unstructured searchalgorithm, which also requires multiple steps. Thus this analysisdemonstrates how the structure of simple search ensembles can beexploited to improve quantum search performance and simultaneouslyreduce the required coherence time. Moreover, by giving the actualasymptotic scaling this result is more definitive than prior empiricalstudies of algorithms based on classical simulations of smallproblems~\cite{hogg97}.Beyond $\mu=4.2$, the fraction of soluble problems in the random3-SAT ensemble, $\Psoluble$, drops to zero as $n$ increases. Sincethis analysis averages over {\em all}\/ problems in the ensemble,$\expect{\Psoln} \leq \Psoluble$. The performance of this algorithmfor overconstrained soluble problems is given instead by$\expect{\Psoln}/\Psoluble$. Unfortunately, this ensemble does nothave a simple expression for $\Psoluble$, or even just its leadingexponential scaling, making this evaluation difficult.  Instead onecould use empirical classical search to evaluate $\Psoluble$ andestimate its scaling behavior as a function of $\mu$. However, thistechnique is increasingly difficult as $\mu$ increases due to therapidly decreasing fraction of soluble problems in the ensemble.An alternate approach is to examine an ensemble where all problems aresoluble and that is analytically simple, e.g., the ensemble with aprespecified solution. The evaluation of $\expect{\Psoln}$ proceeds asshown above, with the addition of needing to keep track of thedistances of the sets $r$, $s$ and $s'$ to the prespecified solution(which affects the available number of clauses that can be selected toproduce the required numbers of conflicts).  The resulting optimalbehavior is shown in \fig{prespecified}, with the corresponding bestvalues for $\rho$ and $\tau$ given in \fig{parameters}. The decay ratedecreases as $\mu$ increases past 7, i.e., problems become easier asthe number of clauses increases. Presumably a similar behavior wouldbe seen for the soluble cases in the random ensemble as well becausethese two ensembles are fairly similar when $\mu$ is large. On theother hand, random selection and the unstructured algorithm do notimprove as $\mu$ increases: they do not take advantage of thestructure of highly constrained problems.\figdef{prespecified}{\epsffile{prespecified.eps}}{Smallest exponential decay rate $A$ for $\expect{\Psoln}$ as a function of$\mu=m/n$ for 3-SAT with prespecified solution. For comparison, thegray and dashed curves show the scaling for random selection and,approximately, for unstructured search.}Since classical simulations of quantum algorithms are limited to fewvariables, this asymptotic analysis can also indicate of the extent towhich these simulations match the asymptotic behavior. An example is\fig{scaling} showing that the behavior matches that fromTable~\ref{values} for $\mu=2$ and $\mu=4$ even with a small number ofvariables.\figdef{scaling}{\epsffile{scaling.eps}}{Optimal asymptotic behavior of $\expect{\Psoln}$ for 3-SAT with$\mu=2$ (gray) and 4 (black) on a log-scale vs.~$n$. The points showthe exact values of $\expect{\Psoln}$.}\section{Limiting Cases}The behavior of the minimum decay rate shown in \fig{optimal} and\barefig{prespecified} suggests that $A$ decreases toward zero forsmall and large values of $\mu$ for soluble problems. This isconfirmed in \fig{limits} which shows the behavior of both ensemblesover a larger range of values.As $\mu \rightarrow 0$, the figure shows the minimum decayrate is nearly a straight line with slope 2 on this log-log plot,indicating $A = O(\mu^2)$ in this limit. With this limitingbehavior $\expect{\Psoln}$ decays as $\exp(-A n)=\exp(O(m^2/n))$.In particular, if $m$ grows no faster than $\sqrt{n}$, $\expect{\Psoln}$ will remain $O(1)$ as $n$ increases.Similarly, as $\mu \rightarrow \infty$, \fig{limits} shows $A$decreasing in a straight line with slope $-1$, indicating $A =O(1/\mu)$. Correspondingly, $\expect{\Psoln}$ then decays as$\exp(O(n^2/m))$. So if $m$ grows at least as fast as $n^2$, theprobability to find a solution, on average, will remain $O(1)$ as $n$increases.\figdef{limits}{\epsffile{limits.eps}}{Limiting behaviors, on a log-log plot, for exponential decay rate$A$. Behavior for random 3-SAT (black curve, up to $\mu=6$),prespecified solution 3-SAT (gray curve, for $\mu$ between 0.1 and 40)and the upper bound based on probability to find the prespecifiedsolution (black curve, for $\mu \ge 20$). For comparison the dashedlines show the limiting behaviors for small and large $\mu$, whichcorrespond very closely to the exact values for $\mu<0.3$ and$\mu>1000$.}In the remainder of this section, we confirm these limitingobservations from \fig{limits}. While such weakly and highlyconstrained problems are fairly simple, the single-step algorithmoutperforms the best classical heuristic methods for these cases,which require evaluating $O(n)$ assignments on average.%This analysis also improves on previous work~\cite{hogg97c} showing $O(1)$ behavior for highly constrained problems, but only when $m$ grew faster than a particular multiple of $n^2$ (equal to 17.3 for $k=3$).\subsection{Solving Weakly Constrained Problems}When $1 \ll m \ll n$, the decay rate $A = -(H + U + I m/n)$,can be treated through an expansion in the small quantity $\mu=m/n$.Specifically, the location of the stationary point for the variables$\s{x}$, $\s{y}$ and $\s{z}$ is determined, to $O(1)$, by settingthe derivatives of $H+U$ to zero. The contribution from the sumover conflicts, $\mu I$, only introduces corrections of $O(\mu)$.The expression $H+U$ evaluated at the $O(1)$ values for the stationarypoint is zero, for {\em any}\/ choice of the parameters $\rho$ and$\tau$. The $O(\mu)$ values and the contribution from $\mu I$ thengive a scaling for $\expect{\Psoln}$ of $\exp(O(m))$.  However, for anappropriate choice of $\tau$ and $\rho$, the coefficient of this$O(m)$ term can be set to zero, so that the actual scaling isdominated by the $O(\mu^2)$ correction, i.e., $\exp(O(n \mu^2))$corresponding to the behavior seen in \fig{limits}.While the final result of this analysis does not have a simple closedform for the parameter values that eliminate the $O(m)$ decay, theyare determined by trigonometric equations. These arise from setting tozero the derivatives of the $O(m)$ contribution with respect to $\tau$and $\rho$. The optimal choice for $\tau$ is determined by\begin{equation}2 \cos^k \left( \frac{\pi \tau}{2} \right) \cos\left(k \frac{\pi \tau}{2} \right) = 1\end{equation}With this value for $\tau$, $\rho$ must then satisfy $\sin(\pi (\rho +k \tau))=0$. Among the many possible solutions for $\rho$ and $\tau$,we select the one in the range 0 to 1 for definiteness. For $k=3$these equations give $\tau = 0.201389$ and $\rho=0.395832$, whichcorrespond to the limiting values in \fig{parameters} as $m/n\rightarrow 0$.These values of the parameters and the corresponding stationary pointin \eq{saddle} give $\expect{\Psoln} \sim e^{-\alpha_{\rm weak}m^2/n}$. The decay rate is thus $A = \alpha_{\rm weak} \mu^2$. When$m$ grows no faster than $\sqrt{n}$, $\expect{\Psoln}=O(1)$.  Thisperformance is better than any classical heuristic, and also improveson the unstructured quantum search since solutions are still rare.As an example, when $k=3$, $\alpha_{\rm weak}=0.029405$. Thecorresponding decay rate $A$ is shown as the dashed line in\fig{limits} for the $\mu \rightarrow 0$ limit.% expected number of solutions: 2^n Binomial[Binomial[n,k] (2^k-1),m]/Binomial[Binomial[n,k] 2^k,m]\begin{table}[ht]\caption{Scaling of $\expect{\Psoln}$ from \eq{pSolnRandom} and$\expect{S}/2^n$ for weakly constrained random 3-SAT with $m=2\protect\sqrt{n}$.}\label{table.weak}% \protect required for \sqrt in caption ????\begin{center}\begin{tabular}{cccc}$n$ 	& $m$ 	& $\expect{\Psoln}$ & $\expect{S}/2^n$ \\ \hline4	& 4	& 0.908 	& 0.569 \\9	& 6	& 0.897 	& 0.447 \\16	& 8	& 0.894 	& 0.343 \\25	& 10	& 0.893 	& 0.263 \\36	& 12	& 0.892		& 0.201\end{tabular}\end{center}\end{table}% values from best/c/data/optUR-2sqrt.datAn example of the approach to the asymptotic behavior is given inTable~\ref{table.weak} for $m = 2 \sqrt{n}$. In this case, theasymptotic scaling limit is $\exp(-4 \alpha_{\rm weak})=0.889$. Thisbehavior compares with the still rapid decrease in expected fractionof solutions which scales as $\expect{S}/2^n = (1-2^{-k})^m$ or$(7/8)^m$ for $k=3$. Thus the unstructured search scaling for thiscase is $(7/8)^{\sqrt{n}}$ which still decreases faster thanpolynomially.\subsection{Solving Highly Constrained Problems}For $m \gg n$, we focus on the ensemble of problems with aprespecified solution. In fact, with this many clauses, there arerelatively few solutions in addition to the prespecified one. Thus asimpler evaluation considers the probability that the quantum searchfinds the prespecified solution, rather than {\em any}\/solution. This quantity is a lower bound on $\expect{\Psoln}$, and isa tight bound when $m$ is large.This lower bound is given by setting assignment $r$ in \eq{pSolnAvg}to be the prespecified solution rather than summing over all possibleassignments.  The derivation leading to \eq{pSolnRandom} proceeds asbefore except for two changes. First, eliminating the sum over $r$gives an additional factor of $2^{-n}$. Second, the number of possibleproblems $\Nproblems$ replaced by\begin{equation}\mMax - {n \choose k} \choose m\end{equation}reflecting the smaller number of problems with a prespecified solution.The asymptotic analysis gives an additional overall factorof $ 2^{-n} (1-2^{-k})^{-m}$. The resulting decay rate for$\expect{\Psoln}$ then has an upper bound given by the value of $-(H +U - \log 2 + (I - \log (1-2^{-k}) )) m/n)$ evaluated at thecorresponding stationary point.For $m \gg n$, we can expand the stationary point evaluationin powers of $1/\mu$. Following the behavior for the optimal valueof $\rho$ suggested by \fig{parameters} and the values obtained inconnection with \fig{limits}, we take $\rho$ to be proportional to$1/\mu$. The $O(1)$ values for the stationary point in this case aresimply $\s{x}=\s{y}=\s{z}=1/4$. Because $\rho \rightarrow 0$, theleading behavior for $I$ is just $\log(1-2^{-k})$ so the exponentialscaling of $O(m)$ is exactly zero. The contributions to the scaling of$O(n)$ can be made equal to zero by selecting $\tau=1/2$ and $\rho =2^{k-2}(2^k-1)/(k \mu)$. The simple form for the $O(1)$ stationary pointvalues also allows evaluating the overall $O(1)$ asymptotic behavior.Specifically, with these parameters, the scaling of the probability tofind the prespecified solution is\begin{equation}\frac{4}{\sqrt{16 + (k-1)^2 \pi^2}} \exp \left(-\frac{(2^k-1)^3 \pi^2}{16 k^2}  \frac{n^2}{m} \right)\end{equation}The corresponding value for the decay rate, $A=(2^k-1)^3 \pi^2/(16 k^2\mu)$, is shown in \fig{limits}.In particular, when $m$ is at least $O(n^2)$, we have $O(1)$performance, duplicating the behavior seen with highly constrained$k$-SAT problems~\cite{hogg98}.\section{Required Precision}We have presented the scaling behavior of $\expect{\Psoln}$ forappropriate choices of $\rho$ and $\tau$. In particular, forsufficiently weakly or highly constrained problems $\expect{\Psoln}$is $O(1)$, which is better performance than possible withclassical methods for these easy problems.One important question in realizing such scaling is that of therequired precision in implementing the parameters. Fortunately, theserequirements are not particularly strict because the parameters appearin the exponents. In particular, an error of $\epsilon$ in $\rho$ or$\tau$ will give error $O(\epsilon^2)$ in the exponent. E.g., forweakly constrained case, this gives exponential decay of$\exp(O(\epsilon^2) m )$. To maintain $O(1)$ behavior, $\epsilon$ willneed to be small enough so that $\epsilon^2 m = O(1)$, i.e., theprecision requirement is $\epsilon = O(1/\sqrt{m})$. Similarly, for $m\gg n$, such parameter errors give exponential decay of$\exp(O(\epsilon^2) n )$, so the precision requirement is $\epsilon =O(1/\sqrt{n})$.Thus only a square root precision in the implementation of the valuesof $\rho$ and $\tau$ is required. While by no means trivial, thisshows the algorithm does not require exponentially precise parametervalues to achieve the scaling.The precise scaling is determined by the size of the secondderivatives of the exponent around the maximum. For $k=3$, aroot-mean-square combined error of $\epsilon$ in $\rho$ and $\tau$introduces at worst a factor $\exp(-3.18 \epsilon^2 m)$. This isgreater than 1/2 provided $\epsilon < 0.46/\sqrt{m}$. For example,with $m = 2 \sqrt{n}$, this requirement is satisfied for a 10,000variable problem provided $\epsilon < 0.033$, which allows, roughly, a10\% error in the values.% underconstrained.nb (precision requirement example for k=3)\section{Problem Search Costs}The ensemble average leading to \eq{pSolnRandom} provides a directanalysis of $\expect{\Psoln}$. This technique can also be generalizedto quantities involving positive integer powers of $\Psoln$, such asthe variance. However, there remain a number of additional propertieswhose ensemble behavior cannot be expressed in simple form.  One suchquantity is the expected solution cost which, for any particularproblem, is $1/\Psoln$. Since ensembles that include even one problemwith no solutions will have $\expect{1/\Psoln} = \infty$, a moreuseful quantity is its median value or the behavior of itsdistribution to identify the extent to which the algorithm performswell for many or most problems. Such quantities require classicalsimulation to evaluate. A comparison of these quantities is given inTable~\ref{cost}. We see that $\frac{1}{\expect{\Psoln}}$ underestimatesthe median search cost, but is a better estimate than $\expect{1/\Psoln}$even when the latter is restricted to soluble problems.\begin{table}[ht]\caption{Comparison of search cost estimates based on 1000 soluble random 3-SAT problems.}\label{cost}\begin{center}\begin{tabular}{r|ccc||ccc}        & \multicolumn{3}{c}{$\mu=2$} & \multicolumn{3}{c}{$\mu=4$} \\$n$	& $\frac{1}{\expect{\Psoln}}$	& ${\rm median}\left( \frac{1}{\Psoln} \right)$ 	& $\expect{\frac{1}{\Psoln}}$ & 	 $\frac{1}{\expect{\Psoln}}$	& ${\rm median}\left( \frac{1}{\Psoln} \right)$ 	& $\expect{\frac{1}{\Psoln}}$ \\ \hline~ & & & & & & \\10 & 	2.6 &  2.6 &  2.8 & 	15 &  17 &  25 \\20 & 	6.6 &  6.8 &  7.4 &  	228 &  352 &  705\end{tabular}\end{center}\end{table}Quantum search works by using correlation between distance fromsolution and number of conflicts. This is very different fromproperties used by classical searches. An interesting question is theextent to which these properties are different, e.g., to what extentare some problems hard for quantum search but easy for classical onesand vice versa. An indication is given in \fig{classical}.Specifically, the expected quantum search cost for a single instanceis given by $1/\Psoln$. For a classical comparison, each problem wassolved repeatedly with the GSAT local searchmethod~\cite{selman92}. The expected search cost was computed by theratio of the total number of GSAT steps to the number of solutionsfound by these repeated searches. The figure shows a generalcorrelation between search difficulty for the two methods, but withsubstantial variation.The figure also shows the absolute number of steps required for thequantum method is considerably larger than the classical heuristic forthese problems. This contrasts with sufficiently weakly or highlyconstrained problems where the quantum method requires $O(1)$ stepswhile the classical search uses $O(n)$. Achieving further improvementfor the quantum search may require incorporating into the phasechoices the neighborhood information used in the classical heuristic.\figdef{classical}{\epsffile{classical.eps}}{Comparison of quantum and classical search for random 3-SAT with $n=20$ and $m=80$. Each point shows the expected search cost for a single problem instance.}%Show distribution of solution probabilities. ApEn does not appear to identify atypical cases (1/Psoln vs. ApEn) (see compare.m in repair/c/approxEnt)\section{Discussion}We have shown how an analysis based on ensemble averages can be usedto design quantum search algorithms. The resulting algorithm wasevaluated for satisfiability problems with various numbers ofconstraints, including those in the hard region as well as the easierweakly and highly constrained cases. Compared to unstructured search,this gives average behavior that, in most cases, is exponentiallybetter. Moreover, this performance is obtained with only a singleevaluation of the assignment properties rather than the exponentiallylarge number of repeated evaluations required by the unstructuredmethod. Thus this single-step algorithm requires much less coherencetime for the quantum operations.  The new quantum algorithm introduced in this paper does not achievethe performance of existing classical heuristics for hard problems,but is better for sufficiently weakly and highly constrained cases interms of the number of search steps required. Classical and quantumsearch steps both require about the same number of elementaryoperations. However, the extent to which differences in number ofsearch steps translate into differences in actual execution timedepends on details of implementation and developments of quantumcompiler technology for optimizing the choice of basicoperations. Classical heuristics use more properties of the problem than thealgorithm described here. These properties include the differencebetween the number of conflicts in an assignment and those of itsneighbors, and the conflicts associated with partialassignments. Incorporating such information in the quantum algorithm,through additional variation in the phase values, may improve quantumsearch.An important advantage of basing the algorithm on ensembles is the useof average quantities of ensemble rather than requiring knowledge ofthe quantities for an individual search problem. This contrasts withthe unstructured search method which requires knowledge of the numberof solutions for a particular problem, or various values must be triedrepeatedly~\cite{boyer96}.  An interesting open question is whetherthe algorithm, e.g., the choice of $\rho$ and $\tau$, could beimproved by adjusting the values based on readily computedcharacteristics of an individual problem instance. In effect thiswould amount to using a more specific ensemble whose instances aremore likely to be similar to the given instance than random problems.This observation raises the question of identifying a reasonableensemble for a given problem.The technique, introduced in this paper, of evaluating asymptoticbehavior for a problem ensemble could be useful for evaluating avariety of quantum algorithms that are not easily addressedtheoretically and hence would otherwise require slow classicalsimulation. This evaluation requires only that the propertiesof assignments used by the algorithm and the nature of the ensembleallow for an explicit determination of the ensemble averages,in analogy with \eq{pSolnRandom}. Furthermore, in many respectsthis analysis is simpler than that for heuristic classical methods.This is because classical searches introduce correlations in theirpath through a search space based on a series of heuristic choices.Accounting for the variation due to these choices is difficultto model theoretically. By contrast, the quantum search, by in effectexploring all search paths simultaneously, avoids this difficultythereby giving relatively simple analytic expressions for theaverage behavior.The power of this algorithm comes from exploiting the correlationbetween the number of conflicts and the distance from a solution amongthe large number of assignments that have close to the average numberof conflicts and differ by about $n/2$ values from a solution.  Theresulting behavior of the scaling rate as a function of $\mu$ givesanother perspective on the nature of the phase transition and the hardproblems. That is, near the transition region, this correlation isweakest, reducing the amount of oscillatory behavior that can beremoved from the sum of $\expect{\Psoln}$ by appropriate choices ofthe phase parameters.  This correlation is perfect for maximallyconstrained problems, but enough remains for harder problems tosubstantially improve the search performance.More generally, the significance for quantum search of suchcorrelations within individual problems provide an alternateperspective on the distinction between easy and hard probleminstances.  This perspective is unlike classical heuristics that relyon behavior of states near solutions as guides, and can become stuckin local minima or among large collections of assignments with thesame number of conflicts~\cite{frank97}. For the quantum algorithm,local minima are not an issue: instead it is the limited correlationbetween distance and conflicts for states {\em far}\/ from solutionsthat prevents efficient search. Because of these very differentcharacteristics, an interesting direction for future work isidentifying individual problems or problem ensembles where thecorrelations are stronger even though the local minima for statesrelatively near solutions remain. In such cases, quantum algorithmscould perform much better than classical heuristics.\section*{Acknowledgments}I have benefited from discussions with Carlos Mochon, Wolf Polak andEleanor Rieffel. The On-Line Encyclopedia of IntegerSequences~\cite{sloane73} was helpful in identifying the exact form ofthe optimal parameters for highly constrained problems.% for submission insert result of bibtex directly into this file%\bibliography{physrev,received}%\bibliographystyle{plain}\begin{thebibliography}{10}\bibitem{abramowitz65}M.~Abramowitz and I.~Stegun, editors.\newblock {\em Handbook of Mathematical Functions}.\newblock Dover, New York, 1965.\bibitem{bender78}Carl~M. Bender and Steven~A. Orszag.\newblock {\em Advanced Mathematical Methods for Scientists and Engineers}.\newblock McGraw Hill, NY, 1978.\bibitem{benioff82}P.~Benioff.\newblock Quantum mechanical hamiltonian models of {Turing} machines.\newblock {\em J. Stat. Phys.}, 29:515--546, 1982.\bibitem{bernstein92}Ethan Bernstein and Umesh Vazirani.\newblock Quantum complexity theory.\newblock In {\em Proc. 25th ACM Symp. on Theory of Computation}, pages 11--20,  1993.\bibitem{berthiaume94}Andre Berthiaume, David Deutsch, and Richard Jozsa.\newblock The stabilization of quantum computations.\newblock In {\em Proc. of the Workshop on Physics and Computation  (PhysComp94)}, pages 60--62, Los Alamitos, CA, 1994. IEEE Press.\bibitem{boyer96}Michel Boyer, Gilles Brassard, Peter Hoyer, and Alain Tapp.\newblock Tight bounds on quantum searching.\newblock In T.~Toffoli et~al., editors, {\em Proc. of the Workshop on Physics  and Computation (PhysComp96)}, pages 36--43, Cambridge, MA, 1996. New England  Complex Systems Institute.\bibitem{brassard98}Gilles Brassard, Peter Hoyer, and Alain Tapp.\newblock Quantum counting.\newblock {Los Alamos} preprint quant-ph/9805082, May 27 1998.\bibitem{cerf98}Nicolas~J. Cerf, Lov~K. Grover, and Colin~P. Williams.\newblock Nested quantum search and {NP}-complete problems.\newblock {Los Alamos} preprint quant-ph/9806078, June 23 1998.\bibitem{cerny93}Vladimir Cerny.\newblock Quantum computers and intractable ({NP}-complete) computing problems.\newblock {\em Physical Review A}, 48:116--119, 1993.\bibitem{cheeseman91}Peter Cheeseman, Bob Kanefsky, and William~M. Taylor.\newblock Where the really hard problems are.\newblock In J.~Mylopoulos and R.~Reiter, editors, {\em Proceedings of  IJCAI91}, pages 331--337, San Mateo, CA, 1991. Morgan Kaufmann.\bibitem{chuang98a}Isaac~L. Chuang, Neil Gershenfeld, and Mark Kubinec.\newblock Experimental implementation of fast quantum searching.\newblock {\em Physical Review Letters}, 80:3408--3411, 1998.\bibitem{chuang98}Isaac~L. Chuang, Lieven M.~K. Vandersypen, Xinlan Zhou, Debbie~W. Leung, and  Seth Lloyd.\newblock Experimental realization of a quantum algorithm.\newblock {\em Nature}, 393:143--146, 1998.\newblock Los Alamos preprint quant-ph/9801037.\bibitem{crawford95}James~M. Crawford and Larry~D. Auton.\newblock Experimental results on the crossover point in random {3SAT}.\newblock {\em Artificial Intelligence}, 81:31--57, 1996.\bibitem{deutsch85}D.~Deutsch.\newblock Quantum theory, the {Church-Turing} principle and the universal  quantum computer.\newblock {\em Proc. R. Soc. London A}, 400:97--117, 1985.\bibitem{deutsch89}D.~Deutsch.\newblock Quantum computational networks.\newblock {\em Proc. R. Soc. Lond.}, A425:73--90, 1989.\bibitem{divincenzo95}David~P. DiVincenzo.\newblock Quantum computation.\newblock {\em Science}, 270:255--261, 1995.\bibitem{feynman86}R.~P. Feynman.\newblock Quantum mechanical computers.\newblock {\em Foundations of Physics}, 16:507--531, 1986.\bibitem{frank97}J.~Frank, P.~Cheeseman, and J.~Stutz.\newblock When gravity fails: Local search topology.\newblock {\em J. of Artificial Intelligence Research}, 7:249--281, 1997.\bibitem{garey79}M.~R. Garey and D.~S. Johnson.\newblock {\em Computers and Intractability: A Guide to the Theory of  NP-Completeness}.\newblock W. H. Freeman, San Francisco, 1979.\bibitem{grover97a}Lov~K. Grover.\newblock Quantum computers can search arbitrarily large databases by a single  query.\newblock {Los Alamos} preprint quant-ph/9706005, Bell Labs, 1997.\bibitem{grover96}Lov~K. Grover.\newblock Quantum mechanics helps in searching for a needle in a haystack.\newblock {\em Physical Review Letters}, 78:325--328, 1997.\bibitem{haroche96}Serge Haroche and Jean-Michel Raimond.\newblock Quantum computing: Dream or nightmare?\newblock {\em Physics Today}, 49:51--52, August 1996.\bibitem{hogg97}Tad Hogg.\newblock A framework for structured quantum search.\newblock {\em Physica D}, 120:102--116, 1998.\newblock Los Alamos preprint quant-ph/9701013.\bibitem{hogg98}Tad Hogg.\newblock Highly structured searches with quantum computers.\newblock {\em Physical Review Letters}, 80:2473--2476, 1998.\newblock Preprint at  pub\-lish.aps.org/eprint/gate\-way/eplist/aps1997oct30\_002.\bibitem{hogg95e}Tad Hogg, Bernardo~A. Huberman, and Colin Williams.\newblock Phase transitions and the search problem.\newblock {\em Artificial Intelligence}, 81:1--15, 1996.\bibitem{hogg98b}Tad Hogg, Carlos Mochon, Eleanor Rieffel, and Wolfgang Polak.\newblock Tools for quantum algorithms.\newblock {Los Alamos} preprint quant-ph/9811073, Xerox, Sept. 1998.\bibitem{hoyer97}Peter Hoyer.\newblock Efficient quantum transforms.\newblock {Los Alamos} preprint quant-ph/9702028, February 1997.\bibitem{knill98}Emanuel Knill, Raymond Laflamme, and Wojciech~H. Zurek.\newblock Resilient quantum computation.\newblock {\em Science}, 279:342--345, 1998.\bibitem{landauer94a}Rolf Landauer.\newblock Is quantum mechanically coherent computation useful?\newblock In D.~H. Feng and B-L. Hu, editors, {\em Proc. of the Drexel-4  Symposium on Quantum Nonintegrability}, Boston, 1994. International Press.\bibitem{lloyd93}Seth Lloyd.\newblock A potentially realizable quantum computer.\newblock {\em Science}, 261:1569--1571, 1993.\bibitem{monroe96a}Christopher Monroe and David Wineland.\newblock Future of quantum computing proves to be debatable.\newblock {\em Physics Today}, 49:107--108, November 1996.\bibitem{nijenhuis78}A.~Nijenhuis and H.~S. Wilf.\newblock {\em Combinatorial Algorithms for Computers and Calculators}.\newblock Academic Press, New York, 2nd edition, 1978.\bibitem{palmer85}E.~M. Palmer.\newblock {\em Graphical Evolution: An Introduction to the Theory of Random  Graphs}.\newblock Wiley Interscience, NY, 1985.\bibitem{rieffel98}Eleanor~G. Rieffel and Wolfgang Polak.\newblock An introduction to quantum computing for non-physicists.\newblock {Los Alamos} preprint quant-ph/9809016 TR-98-044, FXPAL, Sept. 8  1998.\bibitem{selman95}Bart Selman and Scott Kirkpatrick.\newblock Critical behavior in the computational cost of satisfiability  testing.\newblock {\em Artificial Intelligence}, 81:273--295, 1996.\bibitem{selman92}Bart Selman, Hector Levesque, and David Mitchell.\newblock A new method for solving hard satisfiability problems.\newblock In {\em Proc. of the 10th Natl. Conf. on Artificial Intelligence  (AAAI92)}, pages 440--446, Menlo Park, CA, 1992. AAAI Press.\bibitem{shor95}P.~Shor.\newblock Scheme for reducing decoherence in quantum computer memory.\newblock {\em Physical Review A}, 52:2493--2496, 1995.\bibitem{shor94}Peter~W. Shor.\newblock Algorithms for quantum computation: Discrete logarithms and  factoring.\newblock In S.~Goldwasser, editor, {\em Proc. of the 35th Symposium on  Foundations of Computer Science}, pages 124--134, Los Alamitos, CA, November  1994. IEEE Press.\bibitem{sloane73}Neil Sloane.\newblock {\em A Handbook of Integer Sequences}.\newblock Academic Press, NY, 1973.\newblock On-line version available at  http://www.research.att.com/$\sim$njas/sequences.\bibitem{terhal97}Barbara~M. Terhal and John~A. Smolin.\newblock Single quantum querying of a database.\newblock {Los Alamos} preprint quant-ph/9705041 v4, IBM, Nov. 14 1997.\bibitem{unruh94}W.~G. Unruh.\newblock Maintaining coherence in quantum computers.\newblock {\em Physical Review A}, 51:992--997, 1995.\bibitem{williams92}Colin~P. Williams and Tad Hogg.\newblock Exploiting the deep structure of constraint problems.\newblock {\em Artificial Intelligence}, 70:73--117, 1994.\end{thebibliography}\end{document}