Not-so-adiabatic quantum computation for the shortest vector problem

Since quantum computers are known to break the vast majority of currently-used cryptographic protocols, a variety of new protocols are being developed that are conjectured, but not proven to be safe against quantum attacks. Among the most promising is lattice-based cryptography, where security relies upon problems like the shortest vector problem. We analyse the potential of adiabatic quantum computation for attacks on lattice-based cryptography, and give numerical evidence that even outside the adiabatic regime such methods can facilitate the solution of the shortest vector and similar problems.


INTRODUCTION
The advent of quantum computers heralds an age of new computational possibilities. Two paradigms of quantum computing are gate model and adiabatic quantum computation (AQC): the gate model closely resembles current computing architecture, replacing bits with qubits and retaining control over the smallest buildingblocks of the system, and AQC in which the solution for the problem to be solved is encoded into the ground state of a Hamiltonian [1,2]. Typically one cannot prepare this ground state directly -otherwise the problem would be straightforward to solve. One therefore begins with a physical system with a Hamiltonian whose ground state one knows how to prepare. The adiabatic theorem then guarantees that a sufficiently slow change from this initial Hamiltonian to the problem Hamiltonian lets the system evolve into the ground state of the latter.
Both paradigms have been demonstrated to be equivalent [3], though there is not a general way of mapping from one paradigm to the other. The most impactful quantum algorithm discovered thus far is that of Shor for Integer Factorisation and Discrete Logarithm [4]. Quantum computing is expected to have far reaching consequences, influencing materials science [5], development of medicines [6], and many other disciplines. Crucially for information security though, large-scale quantum computers -through application of Shor's algorithm -will make obsolete most currently operational cryptosystems by solving the underlying mathematical problems that are intractable on classical hardware.

A. Cryptography
When two parties (Alice and Bob) want to communicate securely over an insecure channel they must use public key cryptography. In this case Alice has a public/private key pair. Anyone can encrypt messages using the public key, but only Alice can decrypt these messages as only she knows the private key. This means Bob can communicate securely without having to already share a secret with Alice. Generally speaking, the public key is derived from the secret key in a manner which is not easily reversible (this is called a trapdoor). Public key cryptography is not efficient, and so is mostly used for exchanging an initial secret securely, from which point onwards Alice and Bob can use more efficient private key cryptography, which is not relevant to this paper.
Some of today's most prevalent public key cryptosystems are RSA, Diffie Hellman key exchange, and ElGamal, the security of which rely on the hardness of Integer Factorisation and Discrete Logarithm [7][8][9]. These are public key cryptosystems. Reverse engineering the secret key from only the public key and other public information amounts to cracking the cryptosystem, and this is what Shor's algorithm allows us to do for the schemes listed above.
These developments have necessitated the creation of entire new families of cryptosystems -and the corresponding field of post-quantum Cryptography [9]. The security of each family is based on the hardness of one of a handful of 'contender problems'. One of these families is Lattice-Based Cryptography (or LBC). LBC is the most promising area, accounting for over half of the remaining candidate systems in the NIST Post-Quantum Cryptography Standardization process. Lattice-based constructions derive their security from the Shortest Vector Problem (more in Section II) and other closely related problems [10]. At present these problems are only conjectured hard, i.e. there is no proof that quantum computers cannot solve them in polynomial time (BQP), there is only an absence of algorithms that can do so either provably or heuristically. It is therefore essential to analyse the security of post-quantum cryptosystems, so as to either verify or disprove their resilience against attacks that may be aided by quantum logical elements.
tines to preexisting algorithms [11,12] which predominantly fall under either 'sieving' or 'enumeration'. Sieving takes a large basket of vectors and iteratively combines them to obtain smaller and smaller vectors, whereas enumeration evaluates all vectors in a ball around the origin. Central to these gate model algorithms is the quantum Fourier transform (QFT). The most popular approach has been the use of Grover search to quadratically speed up search of unsorted lists in these algorithms. In 2015, however, it was observed that Grover search could not be applied to enumeration [11], but recently a quantum tree algorithm [13] was utilised to achieve square root speed up of lattice enumeration with discrete pruning [14]. QFT is also a key component of quantum hidden subgroup algorithms which have also been applied to the shortest vector problem (SVP) on ideal lattices (these are structured lattices embedded in algebraic fields) [15,16].
Solving this lattice problem is in essence backwards engineering a private key from the public key and other public information (i.e. reversing the trapdoor process previously mentioned), hence compromising any cryptosystems based on the hardness of this problem (and other related problems). The Learning with Errors cryptosystem [17], and many LBC trapdoor functions [18], for example, can be shown to be at least as hard as solving various lattice problems. The concept behind Learning with Errors is the addition of Gaussian noise to a lattice equation, which is otherwise easy to solve via systems of linear equations. An important innovation was the introduction of the Smoothing Parameter [19], which describes how much noise can be added before the structure of the lattice is lost and the problem becomes meaningless. This technique of using noise to obfuscate solutions could make LBC a fruitful field in which to apply optimisation algorithms such as those enabled by AQC. At present the lattice community is still a long way from breaking these cryptosystems, as they tend to use lattices in hundreds of dimensions and the best algorithms at the time of writing scale exponentially in the dimension parameter.
The appeal of focusing on gate-model quantum algorithms is the rigorous complexity analyses that can be performed to give theoretical scaling. So far none of these gate-model algorithms threaten LBC. There has not yet been any work done on adiabatic quantum algorithms for LBC. Even though time complexity is generally difficult to estimate for this class of algorithms, they seem particularly suitable for attacks on LBC for two reasons: firstly, because Lattice problems can be formulated as optimisation problems [20] as we will demonstrate; secondly, while a major drawback of AQC is the prohibitive time cost of achieving adiabacity, this may not be a problem here as, up to a threshold, approximate solutions are also admissible. This is significant as it means it is not necessary to achieve adiabacity, thereby potentially avoiding the major time constraints associated with AQC. In this paper, we therefore employ AQC-style algorithms, but with sub-adiabatic time parameters.
In this work we demonstrate a mapping from the Euclidean norm of a vector to the energy of an ultra-cooled bosonic gas in a potential trap. To do so we use a generalised Bose-Hubbard Hamiltonian to describe the energy of the quantum system. We then present an AQC algorithm for solving one of the central lattice problems and analyse its performance on several instances of low dimensional lattices.

C. Structure
Section II introduces lattices and explains the shortest vector problem for which the algorithm is designed. It then covers the necessities regarding Adiabatic Quantum Computing (AQC). Section III outlines the Hamiltonian we will use, and then we build the mapping from lattice vector-norms to system Hamiltonian ultimately combining this into one SVP algorithm. In Section IV we analyse both analytical scaling and simulation results.

II. PRELIMINARIES
The length of a vector is defined in terms of a norm.
p . Any value of p ≥ 1 can be taken, but common choices are p = 2 and the infinity norm with x ∞ = lim p→∞ x p = max i { x i } the infinity norm l ∞ . For any choice of p there are two shortest vectors (as lattices are symmetric about the origin), but as these are the same up to sign, we refer to 'the', and not 'a' shortest vector, the length of which is denoted λ 1 (L).
When talking about approximation factors, we say γ = poly(N ) if γ grows asymptotically as O(N k ) for some constant k, and γ = exp(N ) if γ grows asymptotically as O(k N ) for some constant k. Similarly, we say an algorithm takes polynomial time if it requires poly(N ) operations to complete, and exponential time if it requires exp(N ) polynomial time operations to complete.
The dot product of two N -dimensional vectors is the canonical inner product on Euclidean space given by x · y = x 1 y 1 + ... + x N y N .

A. Lattices
Lattices simply put are a repeating pattern of points in space. In two dimensions, this looks similar to Fig 1, which shows that the same lattice can be described by multiple different bases (red arrows and green arrows are just two different bases -there are infinitely many different bases for any given lattice, in fact). All bases must have the same volume, but some contain much longer vectors than others, as can be seen by comparing the length of the red arrows with the length of the green arrows in where the b i are linearly independent and the lattice is embedded in the ambient space R N for some N ≥ k. The lattice is said to be full rank if N = k. Cryptographically, full rank lattices are the most relevant, and also the hardest for a particular dimension ambient space. Because of this, for the rest of this paper we will deal only with full rank integer lattices, i.e. those lattices for which the basis vectors have integer coordinates b i Z N . Throughout the rest of the paper we will treat B as a row basis There is no standardised convention in the cryptographic community (column bases vs row bases) and this choice is generally down to the author's preference. These lattices are in fact (a subset of) Euclidean lattices. The central problem that we set out to address is the shortest vector problem (SVP) which is simply the task of finding the shortest non-zero lattice vector.
Definition 2 Shortest Vector Problem: Let λ 1 (L) denote the length of the shortest nonzero vector in a lattice L. Given a basis B = {b 1 , ..., b N } describing L find the shortest nonzero vector such that Given a Lattice L determined by a basis B, every vector v in the lattice can be described as a linear combination of the basis vectors v = x·B as in Def 1. We will call this linear combination x the coefficient vector and denote the coefficient vector that achieves the shortest vector x min so that In the following we will denote the coordinates of a coefficient vector x as x i and the coordinates of x min as x i min to avoid confusion of subscripts. A variant of SVP is γ-approximate SVP.
Definition 3 SVP γ : given a basis B = {b 1 , ..., b N } describing a lattice L, find v such that v ≤ γ · λ 1 (L), Cracking this problem is also conjectured hard, and solving it would be considered fatal for LBC. It is this problem that this work targets as the quantum algorithm from Section III outputs a distribution over short vectors, as discussed in Section IV. As such, even if a quantum algorithm for finding the shortest vector is not feasible, finding somewhat short vectors may scale significantly better.
The format of the bases we work with to tackle the Shortest Vector Problem have an important bearing on the speed with which we can accomplish the task. With that in mind we will outline the forms of basis that we utilise in this work.
A note on lattice bases: in LBC there is much talk of 'good' bases and 'bad' bases. It is important to distinguish the two and discuss their significance in solving the central problems and compromising lattice-based cryptosystems. A 'good' basis is comprised of short vectors which are approximately orthogonal to each other. The conditions of shortness and orthogonality are essentially the same, but they mean that good bases already contain short vectors. In a lattice-based cryptosystem one would generate a good basis as a private key (for example, in NTRU [21] and GGH [22], but not in LWE [17]), and scramble it (making it 'worse' and the vectors less orthogonal) to create a bad basis, which would serve as a public key. The instances that are of interest to us are those of bad bases, from which we hope to derive short vectors. Two types of bases that are relevant to us are Hermite Normal Form bases, which are useful in that they are upper triangular and allow us to perform some useful manipulation later in the paper, and the LLL-reduced bases which are used as a benchmark and a starting point for many lattice algorithms.

Definition 4 Hermite Normal Form (HNF):
For any integer lattice row-basis B of rank N there exists a unique upper triangular basis H which satisfies the following conditions: or the columns above each pivot (the first nonzero entry from the left) H ii are reduced modulo the pivot HNF bases form a good starting point for some of the work in Appendix B. They are generally quite bad bases but have some nice properties which we will use. LLL-reduced bases [23] are better. The LLL algorithm runs in polynomial time, reducing bad bases to better ones; it outputs vectors which are exponentially larger than those which would be considered solutions to SVP γ , but is used as a benchmark in LBC cryptanalysis.
Then the basis B is LLL-reduced if there exists δ (0.25, 1] such that: LLL-reduced bases are not unique -there are potentially many different bases satisfying these conditions for any given lattice. In this respect they are different from HNF bases, which are unique for each lattice.

Definition 6
The Gram matrix G of a row basis B = {b 1 , ..., b N } is given by The Gram matrix will be enough to define H P entirely, as G ij is the dot product b i · b j and so will be used regularly in the following work.

B. Hamiltonian Evolution
The model system that we will use in the following for AQC algorithms is based on the Bose-Hubbard Hamiltonian describing bosonic particles in potential landscapes with sufficiently well pronounced minima that can be identified as sites [24][25][26][27], and in practice these sites often form a periodic structure, as depicted in Fig 2. The explicit Hamiltonian is comprised of a tunnelling term H 0 , an interaction term H I , and an onsite-energy term H C . The tunnelling term defined in terms of annihilation and creation operators a i and a † i of a particle at site j is typically restricted to tunnelling processes between neighbouring lattice sites, but also tunnelling between other pairs of sites would be fine for present purposes.
The interaction withn i = a † i a i and onsite term together define the problem Hamiltonian and the interaction constants v ij and onsite energies µ i will be determined by the underlying Euclidean lattice. In particular, it will be essential not only to consider onsite interactions i v iini (n i − 1) and interactions between neighbouring sites, but also long-range interactions.
With the choice of f (0) = 1 and g(0) = 0, the system Hamiltonian contains initially only the tunnelling term. It has comparatively simple eigenstates, and the system can thus be initialised in its ground state. As soon as the values of f (t), g(t) differ from their initial values, the system state will start to evolve in time, but the system will remain in the instantaneous ground state of its current Hamiltonian if the values of f (t), g(t) change sufficiently slowly [28]. Given the validity of such adiabatic dynamics, the system will thus end up in the ground state of the problem Hamiltonian H I + H C at the final point in time with f (T ) = 0 and g(T ) = 1.
Since besides the requirement of sufficiently slow changes, there are no further restrictions on f (t) and g(t) there is a continuum of possible sweeps. Knowledge of the spectrum of the underlying Hamiltonian could be used to find functions that make the adiabatic approximation particularly good. Since, however, the AQC should be applicable to the case in which finding this spectrum is beyond computational capabilities, we will not assume any suitably chosen functions, but simply a linear sweep throughout the rest of this paper.

III. QUANTUM ALGORITHM
In this section we formulate the quantum SVP algorithm and detail the mapping from vector norms to the Hamiltonian of Eq (3).
A. Problem Hamiltonian to l 2 norm The interaction term has an explicit distinction between the interaction v iini (n i − 1) of particles at the same site and the interaction v ijninj between particles at different sites. This distinction is necessary becausen i particles interact only with the remainingn i − 1 particles at the same site i, whereasn i particles at site i interact with alln j particles at site j. On the other hand, there is the onsite interaction term, and the onsite energies can always be chosen such that they compensate for the difference between the onsite and offsite interactions, i.e. such that which maps to the l 2 norm of a vector in a natural fashion.
A vector v L\{0} can be written as a unique combination of the basis vectors Remembering that B is a row basis for L, where b i are the rows. Expanding the square of the Euclidean norm of this vector term by term we have This can be expressed as Referring to (12), this form neatly fits that of the problem Hamiltonian H P with the identification ofṽ ij with the scalar product b i · b j of two basis vectors, and ofn i with the integer expansions coefficients x i . Generally, an experimentally observable expectation value of particle number at any given site does not need to be an integer, but at the end of the algorithm, where the tunnelling term is vanishing, any local particle number is indeed well defined without quantum fluctuations, so that the identification ofn i with x i is justified.
In terms of Def 6, the problem Hamiltonian for the AQC thus reads where all the interaction constants G ij are defined by the basis B and any positive number of particles can be found at any site, subject to availability of particles. Running this algorithm with K particles, they could theoretically occupy the sites in any non-negative combination summing to K, resulting in a Hilbert space of D Fock states [29], where D is and the Fock state with the lowest energy H P has a configuration of particles that when interpreted as the coefficient vector x, gives the shortest possible vector norm v under the constraint that See Appendix C for a worked-though example demonstrating the theory outlined up to this point.

B. Adaptation to Negative Coefficients
The mapping so far transforms the Euclidean norm squared of general lattice points v = x · B into the problem Hamiltonian energy where the x i is the number of particles at each siten i . The dilemma that this presents is that this only permits non-negative values for each of the x i . This is not a problem, however, as we show next how to modify the physical system such that H P generalises so as to return solutions that relate to negative x i values.
The solution that we propose is to add N m extra particles to the system (m particles for each site), and then by a change of variables use these particles as an offset, thereby permitting negative coefficients x i . The coefficients x i can now take values as low as −m, which occurs if the particle number at site i is zero. If there are m particles at site i then x i = 0 and so on. The new particle number can be written n i =n i + m. Denote this new problem Hamiltonian H P . Upon substituting this change of variables into Eq (12) the new problem Hamiltonian H P becomes To obtain the desired minimisation of the problem Hamiltonian H P from H P the chemical energy at each site needs to be reduced by a function of the column sum of the interaction matrix. The final term, being constant, can be corrected at a later stage so as to return the correct short lattice vectors but would not affect the energy spectrum of the Hamiltonian (other than a constant shift) or, consequently, which configuration of particles minimises the system energy.
To guarantee that the shortest vector lies in the solution set, the offset m must be larger than the infinity norm of the coefficient vector x min . That is, m ≥ x min ∞ where x min · B = λ 1 (L).

C. Multi-Run Quantum SVP
Above we have defined a mapping from the Euclidean length of a vector to the energy of an ultra-cooled bosonic gas trapped in a potential landscape. But choosing the parameters for total particle number K and length of time evolution T then performing the quantum algorithm are not enough, on their own, to obtain the shortest vector. One run of the algorithm described above contains K particles, but the Fock states in the solution space may not correspond to the required linear combination x min .
Take for example a 2D lattice basis for which the shortest vector is determined by x min = (3, 0), then λ 1 (L) is found by To obtain the shortest vector using the algorithm detailed above (assuming no prior knowledge about x min , and for simplicity setting offset m = 0) one would first run with particle number K = 1, then with K = 2, K = 3 and then possibly repeat a few more times to be sure the shortest vector has indeed been found. In this way, a search for the shortest vector consists of running the algorithm many times, each time incrementing K by 1 until confident that there are no shorter vectors to be found. The output of this algorithm, if performed adiabatically, will be a collection of coefficient vectors x and the resulting lattice vectors v = x · B, each of which return the shortest lattice vector possible for a particular choice of K, and among these samples will be the sought after shortest vector of length λ 1 (L).
The Multi-Run algorithm ensures that with well chosen m, K max , and sweep times the λ 1 (L) will definitely be correctly identified. This is after performing the sweeps for particle numbers K i = N m + i up to K c = K max = N m + c. The drawbacks of this method are that it is difficult to analyse rigorously due to the approximations required for the number of runs in order to ensure the presence of x min in the solution sets.
In the next part we present a more eloquent all-in-one algorithm where many different runs from this algorithm are combined into one larger run. It offers an O(n) improvement in space but at the cost of λ 1 (L) no longer corresponding to the ground state, but instead to the first excited state.
Appendix C illustrates what one of the runs would look like for a 2D lattice with no offset (m = 0).

D. Single-Run Quantum SVP
The aim of this algorithm is to generalise Multi-Run into one overarching algorithm (Single-Run) that encompasses all of the repetitions executed during the Multi-Run algorithm. Whereas before the coefficient vectors (in 2D) (1, 0) and (1, 1) could be obtained only from separate runs, now the aim is to include all possible coefficient vectors in one solution space. Instead of repeating sweeps with a different particle number K many times, only one sweep is performed, the solution space of which includes all possible solutions from the Multi-Run version.
What we propose is to introduce an extra site to the potential landscape, corresponding to the zero vector. Label this site N + 1. This new site should act as a 'particle reservoir' and NOT influence the energy of the system directly. For the Euclidean lattice, one appends the zero vector to the basis B, as defined in Eq (17). Denote the particle number for the Single-Run version K S . If the process is run with K S ≥ K max total particles, then the set of configurations where no particles are in site N + 1 correspond to one run of the previous algorithm with K S particles; the set of configurations with one particle in site N + 1 correspond to a run of the previous algorithm but with K S − 1 particles, and so on. It is important to remember that the ground state is no longer the shortest vector, but the zero vector -m particles in the first N sites and all the remaining particles in site N +1 returns 0 which has the lowest energy -and so an adiabatic evolution is no longer desirable. We analyse the implications of this in the following sections.
Accordingly, the Single-Run problem Hamiltonian H P looks as follows: where G ij is defined as B B T , for The problem Hamiltonian in Eq (16) will be the one used for the rest of the paper, unless otherwise stated, including all numerical simulations. The size of the Hilbert space D S for Single-Run Quantum SVP (letting K S = K max to make the two modes of computation directly comparable) is, either by use of the hockey-stick identity or by direct application of Eq (13) Having added an extra 'particle reservoir' site and accordingly appended 0 to the basis, the lowest energy state of the problem Hamiltonian is the unwanted 0 state, but the energy of the first excited state will correspond to λ 1 (L).

IV. RESULTS
Little is known analytically about the time scaling for adiabatic quantum algorithms, beyond a worst case energy gap dependence of 1/∆ 3 [30] whereas with quantum gate algorithms neat closed form scalings are known for a handful of algorithms, for example Shor's exponential speedup for Integer Factorisation and Discrete Logarithm [4] and Grover's quadratic speed up for searching unsorted lists [31]. For adiabatic quantum optimisation, it is not yet even know if these algorithms run faster than classical optimisation [32]. Due to time dependence on the minimum energy gap between E 0 and E 1 it is usually found that though this leaves open the possibility of drastically reducing run time subject to achieving lower values of α, β than their classical analogues. While it is difficult to estimate the time scaling for this algorithm, or even for which parameter regimes this scaling would be optimal (near adiabatic versus much faster sweeps, for example), we can calculate the qubit space requirements (though we do not directly use qubitbased architecture).

A. Qubit Requirements
Let us estimate the required system size. This is a function of number of sites and number of particles K S . The former is predetermined (it is N + 1) but one can choose the latter. The aim is to make the system just large enough (pick K S ) so that x min is one of the possible configurations of particles in N + 1 sites with high probability.
Firstly m, the offset, must be chosen. We derive this by taking an estimate for the infinity norm of x min . This can be seen in Fig 3 for HNF bases (to err of the side of safety, as this will give larger values because HNF bases have long vectors). One can see that the average of the infinity norms grows linearly for HNF bases (see the red best fit line), so we approximate m to be some linear function of N . This means that K S is already up to m(N + 1) particles.
The only other consideration is the sum of the coefficient terms k = N i=1 x i min . Heuristically this grows linearly as shown by the black best fit line in Fig 3, and is less than m so can be ignored from this point on, as in the instance that all m(N + 1) particles reside in the first N lattice sites (and none in the particle reservoir corresponding to the zero vector) the net coefficient sum would be m > k. This is because N m particles are acting as offset particles, leaving the remaining m as the coefficient sum.
By considering the size of the solution space, we have analytically deduced that the qubit requirements scale as O(N log N ) as shown in Appendix A, which space-wise appears acceptable.

B. Empirical Results
The required particle number K is determined by N i=1 x i min which must be estimated. This reflects the fact that on average some coordinates of x will be positive, and some negative, cancelling out, but they will rarely cancel out entirely. The growth in the mean of N i=1 x i min is linear as demonstrated numerically in Fig 3, and grows below the estimated offset number m. The significance of this is that m(N + 1) particles is a generous estimate for K S . This means that taking K S = m(N + 1) gives a good chance of finding x min in the solution set.
To understand this, consider the system with mN particles in the first N sites and m particles in site N +1. The potential solutions are the same as those one would get from performing the Multi-Run version with mN total particles. Now with one more particle in the first N sites and one fewer in site N + 1 the solutions are the same as those from Multi-Run with mN + 1 total particles. To ensure there are enough particles in the system, one must be confident of achieving up to mN + The growth in x min ∞ with respect to Hermite Normal Form bases appears heuristically linear, as can be seen by the red dashed best-fit line in Fig 3. Another group of cryptographically relevant bases are LLL-reduced bases. These are much better than HNF bases and are easy to obtain. They are often used as a first step in classical SVP routines [12,33]. LLL-reduced bases in low dimensions (< 30 or so) were so efficient at finding the shortest vector that there were not enough data points to draw sound conclusions from, as can be seen in the lower blue scatter plot in Fig 3. We can, however, assert that the LLL-reduced case is upper bounded by the Hermite Normal Form case and so can approximate m to be a term linear in N . This is a sound assertion because any lattice basis can be transformed into an HNF basis in polynomial time.

C. Numerical Analysis
Ideally simulating this quantum SVP algorithm on lattices in many dimensions would give an empirical idea of scaling. Regrettably, simulating quantum systems is computationally very intensive due to the factorial growth of the Hilbert space and so these simulations were only possible for low dimensional lattices. Using the QuSpin python library we were able to simulate problems with Hilbert space sizes of up to ten thousand eigenstates (20 particles in 5 sites).
Nevertheless it is insightful to consider the distribution over eigenstates (grouped where degenerate) for runs of different time length. We simulated the quantum SVP algorithm on 200, 150 and 100 lattices in two, three, and four dimensions respectively. Using standard 'bad' bases from literature does not work well for small dimensions -both HNF and LLL reduction tend to return maximally reduced bases -so we generated our own as follows. For each lattice we generated a basis (call this the 'good' basis) and then scrambled it by some randomly generated unimodular matrix to obtain a worse basis. The average increase in basis vector length is a factor of 12.06, 10.08 and and 10.07 in dimensions two, three and four respectively under the unimodular transformations. Basis vectors could not be increased by too much otherwise the problems would have become intractable on our hardware. Note also that after generating the Hamiltonians in the QuSpin package we scaled the Hamiltonians in order that they all occupied roughly the same spectrum of eigenvalues. The reason for this is that expanding the energy spectrum significantly increases success probabilities for quantum adiabatic algorithms due to the dependence on minimum energy gap. Scaling Hamiltonians has a similar effect to altering the sweep times which we want to analyse, and it is reasonable to expect that implementers of this algorithm would have access to the same energy spectrum regardless of the problem size. As such, we in a sense 'fixed' the spectrum and varied the sweep times to isolate the effect of the parameter T .
Mean Distribution over Eigenstates: Fig 4 shows the averaged results for the Single-Run quantum SVP algorithm of Section III. Each subplot represents a different choice of parameters, and shows the mean probability of observing the system in an eigenstate corresponding to the zero vector (index 0), the shortest vector λ 1 (L) (index 1, in red), the second, third etc shortest vectors and so on up to the twentieth shortest vector. What is clear to see is a high likelihood of the system being found in low-energy states. For slower sweeps (higher T values) this distribution becomes more concentrated around the lowest-energy states.
Paying particular attention to the red bars (representing the preferred solutions corresponding to λ 1 (L)) one can see that maximising the height of the red bar requires some nuance: sweep too slow and there is too high a chance of attaining the zero vector at an unacceptable time cost; too fast and the system will become excited to much higher energy levels with unacceptably low probabilities of observing the system in very low energy states.
The top row of Fig 4 displays the final results for parameter choices N = 2, m = 3, T = 1, 10, 100. This maps to a system of nine particles in three sites. Applying Eq (13), the total Hilbert space has 55 eigenstates. The bottom row of Figure 4 shows the results for parameter choices N = 3, m = 4, T = 1, 10, 100. This is for a system of sixteen particles in four sites. The Hilbert space now has 969 eigenstates. In both N = 2, 3 slower sweeps result in higher probabilities of the system terminating in the lowest eigenstates, and for T = 100 there is a very low likelihood of finding the system in anything but the ground state. It should also be observed that as the system size has increased from N = 2 to N = 3, and keeping T constant, the probability of recording the system in any given low-energy state decreases.

Time Sweep Optimisation
While reliable time bounds for finding ground states of quantum adiabatic algorithms with good enough probability are much sought-after, and the general rule of thumb is 'longer is better', thought is shifting. There are instances, for example in the MAX 2-SAT problem, in which slow sweeps perform much worse than fast ones [34]. Here we instead consider faster sweeps and how they relate to algorithms where the exact ground state is not necessarily required.
The problem of observing the ground state of a system after a quantum annealing algorithm has been the subject of much research. In the pursuit of 'somewhat' low energy states much less is known. The algorithm outlined in Section III targets the first excited state, and furthermore, the ground state (corresponding to the zero vector) is of even less use than eigenstates of energy just above λ 1 (L), as at least these return a short non-zero contender. Bearing this in mind along with the observations from Fig 4 we thought to examine how targeting low-but-not-ground states versus ground state might differ.
The solid lines in Fig 5 represent mean probability of returning 0, λ 1 (L), λ 2 (L) in blue, red and green respectively. The dashed lines reflect 90% confidence.
Looking first at the probability curves there are a few interesting observations to be made. In two and three dimensions, exponentially slower sweeps result in higher probabilities of achieving a final ground state, as might be expected. These blue curves will continue to level off past the right of the axes due to maximum probability of any state being one. But remarkably targetting the first excited state appears to experience almost no success penalty for performing faster sweeps. In fact, the nonmonotonicity of the red dashed line indicates that there is some 'Goldilocks' zone where evolutions are slow enough to achieve a good distribution over low energy states, but not slow enough that P (E 0 ) dominates the distribution. In Fig 5 this zone appears around T = 2 for 2D lattices and T = 4 for 3D lattices.
The case for 4D lattices looks quite different. The solid blue line is overtaken by probabilities for λ 1 (L) and even λ 2 (L). To understand better what is happening let us look at the probability distributions at a few different points in the four dimensional graph in Fig 5. To this end, Fig 6 presents the same information as that in Fig  4, but for more samples and should be looked at closely in conjunction with the right-hand plot of Fig 5. Again, probabilities corresponding to λ 1 (L) are highlighted in red. While it is apparent there is some locally different behaviour corresponding to the ground state, Fig 6 shows that as sweeps become slower, probability density continues to accumulate around the lowest energy states, and if slow enough (though beyond our computational capabilities), would concentrate entirely on the lowest eigenstate. This behaviour is particularly promising for the quantum SVP algorithm in higher dimensions as again one can see (the T = 128 subplot provides the best example) a significant concentration of probability around the ten lowest eigenstates (out of > 10, 000) without this distribution necessarily being dominated by the zero vector. Furthermore, the probability of achieving λ 1 (L) is considerably high relative to surrounding eigenstates for slower sweeps, as demonstrated by the series of red bars in Fig 6 In order to explain some of the favourable characteristics it serves to look at a specific instances for the evolution of the system.
energy eigenstate. This does not fit the traditional AQC framework, but is advantageous in that it permits faster sweeps. Scaling to larger systems, this could help to circumvent the prohibitive time cost of AQC algorithms. In sub-adiabatic regimes it is foreseeable that shorter sweep times could be employed at the cost of larger γ approximations for SVP γ and vice versa.

V. DISCUSSION
We have introduced a quantum optimisation framework to the area of computationally hard lattice problems that may underpin tomorrow's cryptosystems. By examining some interesting properties of an AQC-style algorithm when targeting low-but-not-lowest energy states we have identified the existence of a 'Goldilocks' zone for time sweep optimisation. This is particularly exciting for cryptanalysis of lattice-based cryptosystems as the underlying problems often come in approximate -and not exact -form, as with SVP γ analysed in this work. Among cryptographers it is thought is that the approximate nature of lattice problems strengthens their post-quantum credentials, as the lack of determinism means quantum hidden subgroup algorithms cannot be applied. This 'proximity' property, however, may allow sub-adiabatic algorithms for such problems to overcome the costly time requirements of AQC, while still outputting acceptable solutions. Outside of cryptography, it should be observed that for many real-world problems an approximate solution is fine where exact solutions are intractable, and the 'Goldilocks' zone highlighted in this paper indicates that this may be where AQC-style algorithms will most outperform classical alternatives.
The numerical analysis presented in Section IV offers an encouraging insight into how Hamiltonian simulation on higher dimensional instances may perform. The notion of mapping Euclidean distances into Hamiltonian energies is one that has many foreseeable applications in tackling lattice problems: there are similarities, for example, in the formulation of SVP γ and the approximate closest vector problem [10]. Many lattice problems are so closely related that a successful attack on one of them could be fatal for a number of LBC schemes, and so there are several areas one could apply the ideas laid out in this work.
Looking forward there are many interesting challenges to surmount. A major one is the issue of achieving better theoretical bounds on scaling complexity. One advantage of AQC is that time dependence relies on only one factor (minimum energy gap ∆) meaning the source of time cost is easy to understand. In a sub-adiabatic regime, however, modelling eigenstate transitions probabilistically could be a natural progression for theoretical analysis of AQC-style algorithms. The development of quantum hardware that can realise this generalised Bose-Hubbard Hamiltonian and assume particle-particle offsite interactions is a target for experimental physicists, and generalising AQC-style algorithms to run on different hardware -such as coherent Ising machines [35,36] -will become increasingly investigated as progress continues towards a post-quantum world.

ACKNOWLEDGMENTS
The authors would like to thank Adam Callison for helpful discussion. Alexandros Ghionis was supported through a studentship in the Quantum Systems Engineering Skills and Training Hub at Imperial College London funded by EP-SRC(EP/P510257/1).

Appendix A: Qubit scaling
With these heuristic scaling assumptions we can derive the following analysis for the Single-Run algorithm (results for Multi-Run are similar). Using m = cN for linear constant c, there are m(N + 1) particles in the system. Therefore the total particle number for Single-Run (denote K S ) is K S = cN 2 + cN .
The Hilbert space size with P particles distributed among Q sites is The qubit scaling equivalent is obtained by simply taking the base-two logarithm of the above expression, with values for P, Q substituted in: By Stirling's approximation this is very close to which can be written Bounding the product term, this is much less than 2πN (e(cN +(c+1)) N .
(A5) Leaving a system size in qubit terms of log 2 D bounded above by O(N log N ). There are no analytical time bounds; this is an active research area in the community. What we can do is provide some analysis for a Grover search algorithm over the same solution space, giving us some post-quantum context for the complexity to be expected. Given that the solution space scales as N N = 2 N log N , search using Grover's algorithm scales as 2 1 2 N log N .

Appendix B: Basis Band-diagonalisation
In order to guarantee that offsite interaction terms γ ij in the problem Hamiltonian are nonzero only for small |i − j| the basis must be altered to take a banded structure, but using only operations that preserve the basis. To demonstrate, consider the following example: The row span of the matrix and one can see that while there exist nearest-neighbour interaction terms (γ 12 , γ 23 ) there is no γ 13 term and so one can see how the banding structure is necessary to eliminate far away offsite particle-particle interactions.
Our solution is to iteratively eliminate elements far away from the leading diagonal using an argument that relies on taking the greatest common divisor (gcd) of as many elements as is needed to help us eliminate elements using Bezout's lemma.
Take a simple example to give a taste of what this algorithm is tapping into. Consider a prime determinant integer lattice, here taking the determinant to be some large p. Let us pick p so that the lattice is in fact the row span of the following matrix. Every prime determinant integer lattice can be represented by a basis very similar in form to the one shown [37] -the pivot p is not necessarily in the bottom right, but this does not affect the reduction: For this simple case assume that the gcd of x i+1 , x i+2 divides x i . Then by Bezout's lemma there exists some u, v, δ such that Now perform the lattice preserving row operations This should be performed iteratively from i = 1 to N −2.
After the first such iteration the above matrix looks as follows: If x i+1 , x i+2 do not divide x i , then extend consideration to x i+3 , and so on until finding a group of numbers with gcd dividing x i . Each extra number means adding an extra band to the matrix so it is ideal to find a set of coprime (or with gcd dividing x i ) entries x i+1 , ...x i+j for some small j. Fortunately, for k randomly selected numbers the probability of them being coprime (a stronger condition than is needed) is 1/ζ(k) which fast approaches one as k increases. This means that even for high dimensional lattices one can be confident of tight bandings.
There are circumstances where x i is odd, and several of the entries below it are even. These are the only problematic cases where sticking strictly to the algorithm yields poor results. In these cases it is optimal to instead to multiply b i by 2 so that x i can be eliminated efficiently. This is not ideal as it does not preserve the lattice, but instead increases the volume by a factor of 2 (or p if this is extended to some other small primes). What results is a basis for a sublattice. Fortunately these cases are rare enough that the mean volume increase on performing this algorithm over many lattices is very small.
To generalise this to any given HNF basis this procedure simply needs to be repeated for all dense columns, which will appear only above pivots that are not equal to 1. While technically HNF bases can be dense in the upper triangle, this is not typical. Furthermore, HNF bases are particularly relevant cryptographically [38] as they afford a way of representing a bad basis that can be communicated with O(N ) key size (if dense this would be O(N 2 )). Thus the property that makes this basis a good candidate for band-diagonalisation also makes it a good choice in terms of cryptographic efficiency.  The size of these coefficients reduces farther away from the leading diagonal. The dark blue squares represent zeros and so it is clear to see both the upper-triangular form of the row bases and also how the magnitude of the coordinates fades quickly to zeros above the leading diagonal. Moreover, increasing the dimension does not adversely affect the ability of the algorithm to produce a tightly banded lattice basis. The mean volume increase in thirty dimensions was 2.98 and in 60 dimensions was 7.99, meaning that while the algorithm tends not to preserve the lattice exactly, the volume of the basis is increased by a small factor. This is acceptable for solving SVP γ . The effect of this band-diagonalisation algorithm is that in realising the quantum SVP algorithms described in this paper it is not necessary to consider particle-particle interaction terms for particles at sites which are far away from each other.

Appendix C: Example run
Consider a very simple example to aide intuition in following the the algorithm from lattice basis to final result and look at all the steps in between. The system comprises two particles in two lattice sites, with no offset (m = 0). The Hilbert space is three dimensional and the  (7), H 0 from Eq (3) and H P from Eq (12) is (C3) The Hamiltonian ground state for t = 0 is Initialise the system in this state and let it evolve. The probabilities of measuring the system to be in each of the Fock states during the evolution is as follows: The Hamiltonian ground state for t = T = 2 is which is easy to see because and (1, 0) is the shortest vector in the lattice. This can be seen by looking at B G . This example would be one