{'fraction_non_alphanumeric': 0.04355871174234847, 'fraction_numerical': 0.008401680336067214, 'mean_word_length': 4.721602288984263, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Period Finding with Adiabatic Quantum Computation

We outline an efficient quantum-adiabatic algorithm that solves Simon's problem, in which one has to determine the `period', or xor-mask, of a given black-box function. We show that the proposed algorithm is exponentially faster than its classical counterpart and has the same complexity as the corresponding circuit-based algorithm. Together with other related studies, this result supports a conjecture that the complexity of adiabatic quantum computation is equivalent to the circuit-based computational model in a stronger sense than the well-known, proven polynomial equivalence between the two paradigms. We also discuss the importance of the algorithm and its theoretical and experimental implications for the existence of an adiabatic version of Shor's integer factorization algorithm that would have the same complexity as the original algorithm.


INTRODUCTION
Theoretical research on quantum computing is motivated by the exciting possibility that quantum computers are inherently more efficient than classical computers due to the advantages that the laws of quantum mechanics provide, such as parallelism, tunneling and entanglement. The actual implementation of quantum computing devices is however hindered by many challenging difficulties, the most prominent of which being the control or removal of quantum decoherence [1]. Recent theoretical work [2][3][4], as well as promising experimental research findings [5][6][7] in the field of Adiabatic Quantum Computing (AQC) suggest that a leading candidate to be the first device to solve practical classically-hard problems using quantum principles is the so called 'quantum annealer', which implements the simple yet potentiallypowerful quantum-adiabatic algorithmic approach proposed by Farhi et al. [8] about a decade ago.
Within the Quantum Adiabatic Algorithm (QAA) approach, the solution to an optimization problem is encoded in the ground state of a 'problem' HamiltonianĤ p . To find the solution, the system is prepared in the ground state of another 'driver' HamiltonianĤ d that must not commuteĤ p and has a ground state that is fairly easy to prepare. The Hamiltonian of the system is then slowly modified fromĤ d toĤ p , using the linear interpolation, i.e.,Ĥ(s) = sĤ p + (1 − s)Ĥ d where s(t) is a parameter varying smoothly with time from 0 to 1. If this process is done slowly enough, the system will stay close to the ground state of the instantaneous Hamiltonian throughout the evolution [9,10], so that one finally obtains a state close to the ground state ofĤ p . At this point, measuring the state will give the solution of the original problem with high probability. The running time T of the algorithm determines the efficiency, or complexity, of the QAA and normally scales inversely with a small power of the minimum gap of the system [8,11].
The experimental studies mentioned above, as well as other theoretical work such as the theorem of polynomial equivalence between AQC and circuit-based computing [12,13], provide ample motivation for searching for adiabatic algorithms that would reveal the inherent potential encompassed in AQC. However, despite intensive research (see, e.g., Ref. [14][15][16][17][18][19][20] and references therein), to date, most attempts aimed at finding practical efficient AQC algorithms have failed. Valuable insight into why this is so, may be obtained by considering, in the context of AQC, problems for which there are known circuit-based algorithms that exhibit 'quantum speedups'. Devising 'optimal' adiabatic algorithms for these, that would have the same complexity as their circuit analogues, may reveal important features of AQC that have perhaps not been properly utilized thus far [21]. Several known examples for adiabatic analogues to circuit-based algorithms are Grover's unstructured search problem [22] and Quantum Counting [23], both of which have successfully recovered the quadratic quantum speedups exhibited by their circuit-model counterparts, thereby hinting at the potential power of AQC.
Perhaps the most important class of problems exhibiting quantum speedups is that of the Hidden Subgroup Problem (HSP) [24], which encompasses most of the quantum algorithms found so far that are exponentially faster than their classical counterparts (e.g., period-finding, order-finding and discrete logarithms). In HSPs, one is given a function from a finitely generated group to a finite set. The function is known to be constant on the cosets of a subgroup whose generating set needs to be found. Finding adiabatic algorithms for problems in this class that have the same complexities as their circuit-based counterparts, is therefore of considerable importance.
The simplest HSP considered in the context of AQC is the problem of Deutsch and Josza [25], which has been shown to have an O(1) complexity, similarly to the circuit-based result, and is therefore exponentially faster than the deterministically classical algorithm [26] (see also Ref. [27,28]). Here, we devise a QAA for a more challenging HSP, namely, Simon's problem [29], which was the first to exhibit exponential speedup over classical probabilistic algorithms.
In Simon's problem one is asked to find the 'period' of a function from n-bit strings to (n − 1)-bit strings that is 'promised' to be constant only over inputs that are related by an unknown xor mask (the period). Although of a somewhat artificial nature, the significance of Simon's problem stems from the fact that it shares many similarities with, and in fact was also the motivation for, Shor's integer factorization algorithm [30], which in itself is based on a 'genuine' period-finding problem. A derivation of a quantum adiabatic integer factorization algorithm that would have the same complexity as Shor's original circuit, together with the aforementioned significant experimental advancements in the construction and operation of quantum annealers, may have considerable theoretical as well as practical impact and implications in the field of Quantum Computing and beyond it, as Shor's algorithm may be used to break the RSA publickey cryptosystem. In that sense, a quantum-adiabatic Simon's problem algorithm is an important first step towards that goal.
Before we consider the full complexity of Simon's problem, let us first study the related, albeit simpler, HSP devised by Bernstein and Vazirani (BV) [31]. The algorithm given here will help lay the groundwork for the discussion of the more elaborate algorithm for Simon's problem.

THE BERNSTEIN-VAZIRANI PROBLEM
In the BV problem, one is given a black box that evaluates the function where w k and a k (k = 0..n − 1) are the bits of the two integers w and a, respectively, and the function f (·) takes the integer w into the modulo-2 sum of the products of corresponding bits of a and w. The task is to find the integer a with as few queries of f (·) as possible.
While the best classical algorithm to do this requires n queries of f (·) [e.g., with the inputs w = 2 k (k = 0..n − 1) revealing the bits of a one at a time], quantum circuitbased algorithms have been shown to require O(1) queries to perform the same task [31]. Here, we show that, similarly to the quantum circuit algorithm, there is a corresponding adiabatic algorithm that requires a running time that does not scale with input size.
To show this, we first note that the function f (·) can be encoded as the following problem Hamiltonian: Here, σ z (σ x ) denotes a Pauli matrix in the z-direction (x-direction) , the letter (A) labels the n-bit subspace for the input states |w and (B) denotes a 1-bit 'output' subspace for the outcome |f (w) = |0 or |1 (the state |0 shall represent a spin pointing in the positive zdirection). For all configurations |w of the input bits for which f (w) = 1,Ĥ p has value −1 if the output qubit is |1 and 0 if the output qubit is |0 . For all configurations |w for which f (w) = 0,Ĥ p has value −1 if the output qubit is |0 and 0 otherwise. Combining both cases, we see that the ground state ofĤ p has energy −1 and is 2 nfold degenerate: The action ofĤ p on 'classical' configurations |w ⊗ |0 will give an eigen-energy of −1 if f (w) = 0 and zero otherwise. The above encoding may therefore be considered as the hermitian analogue of the unitary oracle of the analogous circuit-based problem. It should be noted nonetheless, that as an oracle, the problem Hamiltonian for the Bernstein-Vazirani problem suggested above (as well as that of Simon's problem discussed next) is not expected to, nor will it be in the general case, easily implementable. This is of course also true for the corresponding classical oracle as well as the unitary oracle of the quantum circuit-model algorithm.
Before moving on to describing a quantum adiabatic algorithm for the BV problem, let us first make the following simple yet important observation. Given a system described by a Hamiltonian of the formĤ = w (|w w|) where w labels basis states in subsystem (A), and an initial state w where c w are complex coefficients obeying w |c w | 2 = 1, the state of the system at time t may be written as w . For each state |w in subsystem A, there is an independently evolving state in subsystem B that is not affected by the evolutions corresponding to other states |w ′ . This statement may be readily verified by plugging |ψ(t) into the Schrödinger equation forĤ. The above 'parallelism' will be used in what follows to construct many-qubit adiabatic Hamiltonians that would simultaneously execute a multitude of two-level adiabatically-evolving systems. Since the runtime for the evolution of each subsystem will not depend on the size of the entire system, the resultant total evolution will likewise not require a running time that scales with system size. This unusual property [15,18,20] will be key in the construction of the adiabatic BV and Simon's algorithms, which we address next.
To construct a QAA for the BV problem we shall choose the driver Hamiltonian: [We shall henceforth omit the subspace labels (A) and (B) in favor of a more compact notation.] The total Hamiltonian can therefore be written aŝ where eachĤ w acts only inside the second subspace and, following Eqs. (2), (3) and (4), can be written aŝ Having set up the problem and driver Hamiltonians, the QAA is as follows.
• Step 1: As the initial state, prepare the equal superposition of all computational-basis states where |+ (|− ) denotes the state of all spins of the appropriate subsystem pointing in the positive (negative) x-direction (note that this is easily done).
• Step 2: Evolve the system under the Hamiltonian, Eq. (4), where s, the adiabatic parameter, is varied at a constant rate from s = 0 at t = 0 to s = 1 at t = T for some n-independent runtime T .
Utilizing the observation made above, the evolution of the total wave-function is split to 2 n decoupled 1-qubit evolutions, each described by the simple gapped two-level systemĤ w , Eq.(5), with the initial condition |ψ(t = 0) w = |+ . Therefore, an appropriately-long (but n-independent) runtime T will evolve each |ψ(t = 0) w into the ground state of the problem Hamiltonian ofĤ w , namely, into |ψ(t = T ) w = |f (w) with an arbitrarily high accuracy that depends on T . It is important to note that there will be no relative phases between the different final states |f (w) . As a result, the final state of the entire system will be The above decoupled evolution may be viewed as 'adiabatic quantum parallelism' as it describes the (coherent) evolution of many adiabatic systems that evolve in parallel, such that the coherent superposition of the end states may be utilized to extract important information about the system (as is shown in the next step).
• Step 3: At the end of the evolution, perform an xbasis measurement of the qubit of the second subsystem. Noting that |f (w) may be written as: the measurement will collapse the wave-function into one of two states with equal probability: or Now, if |ψ + is obtained, then one must go back to Step 1 and restart the algorithm, as the resulting state will contain no information about a (in fact, |ψ + is the initial state). Otherwise, the resulting state will encode all the bits of a, namely a k , each corresponding to a different orientation of the spin along the x-axis. The probability that the algorithm would fail after r runs of the QAA is exponentially small, namely, P failure = 2 −r but more importantly, n-independent.
We have thus shown that the BV problem can be solved using a quantum adiabatic algorithm in O(1) runtime, i.e., with complexity that is equivalent to that of the corresponding circuit-based algorithm, which requires only one call to the unitary quantum oracle.
Before moving on, we note here that while the problem Hamiltonian, Eq. (2), is diagonal, the state of the system at the end of the adiabatic evolution is a superposition of computational-basis states. In practice, this would require a high level of coherence, a property that is sometimes not strictly necessary for other adiabatic quantum computations.
We now turn to address the somewhat more complicated HSP devised by Simon [29], utilizing for that purpose the concepts presented above.

SIMON'S PROBLEM
The problem devised by Simon [29] was the first to demonstrate a quantum algorithm solving a black-box problem that is exponentially faster than any probabilistic classical algorithm. In Simon's problem, we are given a promise that there is an n-bit positive integer a such that for any two n-bit inputs w = y, a black-box function g(·) : {0, 1} n → {0, 1} n−1 would output the (n − 1)-bit integers g(w) = g(y) if and only if w ⊕y = a. The symbol ⊕ denotes here the bitwise-xor operation. We are then asked to find the 'period' (or, 'xor-mask') of the function, namely a, with as few queries of g(·) as possible. While classical algorithms require O(2 n/2 ) queries of g(·), Simon [29] devised a circuit-based quantum algorithm that can perform this task with O(n) queries [32].
In the context of QAA, the oracle g(·) can be encoded as the problem Hamiltonian h[y, g(w)]|y y| , (11) where h[y, g(w)] is the Hamming distance between y and g(w). Here, y ∈ {0, 1} n−1 labels a bit configuration in the second subsystem. The ground state of the total Hamiltonian is 2 n -fold degenerate, namely, |w ⊗ |g(w) for all w ∈ {0, 1} n . An alternative and more illuminating way to writeĤ p would bê where σ k z denotes a Pauli matrix acting on the k-th bit of the second subsystem and g k (w) is the k-th bit of g(w). This illustrates the fact that the spins of the second subsystem for each |w are not coupled to one another.
Similarly to the BV problem, we shall choose the driver Hamiltonian for Simon's algorithm to be the transversefield Hamiltonian on the second subsystem, namely: The total Hamiltonian can therefore be written aŝ H = w |w w| ⊗Ĥ w , whereĤ w acts only on the second subsystem and can be written aŝ Having constructed the problem and driver Hamiltonians, the algorithm is as follows.
• Step 1: As the initial state, prepare the equal superposition of all computational-basis states: • Step 2: Evolve the system using a constantrate adiabatic evolution for a fixed (i.e., an nindependent) amount of time T . The Hamiltoni-ansĤ w are each an uncoupled system of n-spins. It should therefore be clear that the wave-functions of the n-spins will evolve simultaneously and independently into the ground state of the problem Hamiltonian for every w (for an appropriately-chosen T ), yielding |ψ(t = T ) w = |g(w) . The final state of the entire system will therefore be • Step 3: A z-basis measurement of the second subsystem will collapse the wave-function into a state where w * is a random bit configuration, f (·) is the BV function, Eq. (1), and |x are x-basis states. A subsequent x-basis measurement of the first subsystem will, similarly to the circuit-based algorithm, yield a state |x * whose bit representation is orthogonal to that of a (modulo 2), namely, obeying f (x) = 0.
• Step 4: As in the circuit-based model, each time Steps 1 through 3 are repeated, with high probability, a different state |x that is orthogonal to a will be obtained [32]. The different runs will thus produce (n − 1) linear equations in the bits of a that are highly likely to be independent of one another [33]. Solving the resultant system of equations will produce the bits of a. The total query complexity of the entire process is therefore O(n), similarly to the circuit-based case.

SUMMARY AND CONCLUSIONS
We have outlined two quantum adiabatic algorithms to solve the HSPs proposed by Bernstein and Vazirani [31] and the 'period-finding' problem devised by Simon [29]. For the BV problem, an algorithm with an O(1) complexity has been found [in contrast to its O(n) classical counterpart], whereas for Simon's problem we have devised an efficient O(n) algorithm which is to be contrasted with the exponentially-slow classical algorithm. The complexities of both algorithms have been found to be the same as the analogous circuit-based results.
The importance of the algorithm constructions given above, lies in the fact that these do not use the (suboptimal) polynomial-equivalence prescription of 'translating' circuit-based algorithms to quantum-adiabatic ones [12]. The adiabatic Simon's algorithm given here is therefore one of very few 'genuine' quantum-adiabatic algorithms that provide an exponential speedup over probabilistic classical algorithms, and with no complexity overhead, thereby exhibiting the full potential power encompassed in AQC.
In addition, along with other recent results comparing circuit-based and adiabatic algorithms [23,26], this study provides further corroboration to a conjecture that suitably-constructed quantum adiabatic algorithms have the same complexities as their circuit-based counterparts. This claim is a stronger statement than the theorem establishing a (weaker) polynomial equivalence [12,13] between the two computing paradigms, and still awaits formal proof (or disproof).
We note here that the algorithms proposed here are not of the 'traditional' AQC form, in the sense that the ground-states of the adiabatic Hamiltonians presented here are highly degenerate. As was also briefly discussed above, it follows that the algorithms suggested here may therefore require higher levels of coherence than that needed for traditional AQC. An important question that still remains is whether or not one could construct adiabatic algorithms that are of the same complexity as their circuit-model counterparts, but that would also possess the robustness of the 'usual' AQC. This is particularly of significance if one is to consider the actual implementation of algorithms similar to the ones presented here, on real, finite-temperature, noisy quantum annealers.
Finally, it is plausible to believe that the algorithm given above to Simon's problem will provide the basis, as well as further motivation, for devising a quantum adiabatic algorithm for integer factorization, as the two problems are known to share many similarities. Such an algorithm would presumably have the same complexity as Shor's original algorithm [30] and will therefore be more efficient than the analogous polynomial-equivalence construction. An adiabatic Shor's algorithm would require replacing Simon's black-box function with the encoding of a 'real' periodic function and, as a next step, would necessitate the construction of an adiabatic algorithm for the Quantum Fourier Transform. An efficient quantumadiabatic integer factorization algorithm that will be implementable on a real many-qubit quantum annealer in the near future, would undoubtedly have considerable theoretical as well as practical implications both in the field of Quantum Computing and well beyond it.
We thank Peter Young, Siddharth M. Krishnan, David Gosset and Mohammad Amin for useful comments and discussions.