ArticlePDF Available

Solving the Network Shortest Path Problem on a Quantum Annealer

Authors:

Abstract and Figures

This article addresses the formulation for implementing a single source, single-destination shortest path algorithm on a quantum annealing computer. Three distinct approaches are presented. In all the three cases, the shortest path problem is formulated as a quadratic unconstrained binary optimization problem amenable to quantum annealing. The first implementation builds on existing quantum annealing solutions to the traveling salesman problem, and requires the anticipated maximum number of vertices on the solution path |P| to be provided as an input. For a graph with |V| vertices, |E| edges, and no self-loops, it encodes the problem instance using |V||P| qubits. The second implementation adapts the linear programming formulation of the shortest path problem, and encodes the problem instance using |E| qubits for directed graphs or 2|E| qubits for undirected graphs. The third implementation, designed exclusively for undirected graphs, encodes the problem in |E| + |V| qubits. Scaling factors for penalty terms, complexity of coupling matrix construction, and numerical estimates of the annealing time required to find the shortest path are made explicit in the article.
Content may be subject to copyright.
Quantum Computing Engineering
uantum
Transactions on
IEEE
Received July 27, 2020; accepted August 21, 2020; date of publication September 4, 2020;
date of current version October 28, 2020.
Digital Object Identifier 10.1109/TQE.2020.3021921
Solving the Network Shortest Path Problem on
a Quantum Annealer
THOMAS KRAUSS1AND JOEY MCCOLLUM1
Ted and Karyn Hume Center for National Security and Technology, Virginia Polytechnic Institute and State University, Blacksburg,
VA 24060 USA
Corresponding author: Thomas Krauss. (tkrauss@vt.edu)
ABSTRACT This article addresses the formulation for implementing a single source, single-destination
shortest path algorithm on a quantum annealing computer. Three distinct approaches are presented. In all
the three cases, the shortest path problem is formulated as a quadratic unconstrained binary optimization
problem amenable to quantum annealing. The rst implementation builds on existing quantum annealing
solutions to the traveling salesman problem, and requires the anticipated maximum number of vertices on
the solution path |P|to be provided as an input. For a graph with |V|vertices, |E|edges, and no self-loops, it
encodes the problem instance using |V||P|qubits. The second implementation adapts the linear programming
formulation of the shortest path problem, and encodes the problem instance using |E|qubits for directed
graphs or 2|E|qubits for undirected graphs. The third implementation, designed exclusively for undirected
graphs, encodes the problem in |E|+|V|qubits. Scaling factors for penalty terms, complexity of coupling
matrix construction, and numerical estimates of the annealing time required to nd the shortest path are made
explicit in the article.
INDEX TERMS Quantum annealing, quantum computing, shortest path problem, simulated annealing.
I. INTRODUCTION
The shortest path problem is a well-studied primitive in graph
theory. The single source, single-destination variant of the
problem is the simplest to describe: Given a graph with costs
assigned to its edges and given a source and terminal vertex in
the graph, nd a continuous path from the source vertex to the
terminal vertex whose constituent edges have minimum total
cost. The problem is central to a wide variety of real-world
applications ranging from navigation, autonomous vehicle
route planning, optimizing trace layout on printed circuit
boards, and social network analysis.
Quantum annealing is an optimization technique that ex-
ploits a time-dependent Hamiltonian for a set of Nqubits by
gradually decreasing quantum uctuations [1]. The Hamilto-
nian, or energy function, begins in a fully entangled, random
state and is slowly transformed to the Hamiltonian of the
optimization problem. The slow progression of the quan-
tum energy state allows the system of qubits to traverse
energy barriers and nd the global minimum of the high-
dimensional energy function. The annealing process begins
in a state with all qubits in superposition. At the completion
of the annealing, the qubits remain in the ground state of the
desired problem Hamiltonian and, therefore, represent the
global optimum [2]–[4]. The solution vector of qubit values
is then read and returned. The energy function is generally
represented as an Ising model, or a related quadratic uncon-
strained binary optimization (QUBO) formulation.
This article will detail a QUBO formulation of this short-
est path (lowest cost) problem suitable for execution on a
D-Wave quantum annealing machine or via a simulated an-
nealing package. We begin by providing background on the
QUBO formulation and notation in Section II, followed by
the related work in Section III. The following three sections
develop three separate but related approaches to solving the
shortest path problem. Section IV describes a vertex- or hop-
based approach, while Sections V and VI develop edge-based
approaches for directed and undirected graphs. For each al-
gorithm, a brief analysis of complexity and qubit resource
requirements is offered. Section VII discusses the subject of
the annealing time required to nd the minimum-energy so-
lution with high probability. Section VIII presents a concise
comparison of the complexity of various classical and quan-
tum gate algorithms with the proposed approaches. In Sec-
tion IX, all of the proposed formulations are demonstrated
using a toy problem. Finally, we offer some conclusions in
Section X.
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/
VOLUME 1, 2020 3101512
Engineering
uantum
Transactions on
IEEE
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER
FIGURE 1. Example undirected graph with specified edge costs.
II. PRELIMINARIES
Consider the example undirected graph shown in Fig. 1.
Here, the source vertex is identied as vertex sand the
terminal vertex as t. Each edge has a transition cost as marked
in the graphic (e.g., the edge from vertex 2 to vertex 4 has a
cost of 2 units).
Clearly, for the simple graph in Fig. 1 the lowest cost route
is (s,1,3,t) with a total cost of 4. Note that this lowest cost
path is not unique; (s,1,4,t) has the same cost.
Agraph G =(V,E,C) consists of a set of vertices V=
{1,2,...}, a set of edges E={(1,2),(1,3),...}, and a set of
edge costs C={c1,2,c1,3,...}⊂R. Edge costs are assumed
to be real-valued and may be negative, subject to certain
restrictions (see next paragraph). In a directed graph, edges
connecting the same two vertices may have opposite orien-
tations (so (i,j)= (j,i)), while in an undirected graph, all
edges lack orientation (so (i,j)=(j,i)). By convention, the
vertex indices of edges in an undirected graph will be listed
in ascending order. The total number of vertices and edges
in the graph are denoted by |V|and |E|, respectively. The
degree of vertex i, denoted deg(i), is dened as the number
of edges (both incoming and outgoing, in the case of directed
graphs) with one end at i.Theminimum degree and maximum
degree of a graph, denoted by δand , respectively, are the
minimum and maximum degree taken over all of the graph’s
vertices.
Throughout this article, the class of graphs considered to
be “general” for the purpose of the shortest path problem
excludes undirected graphs with negative edge costs and
directed graphs with cycles of negative total cost. This is
because for such graphs, the set of shortest path solutions
is unbounded; one can simply traverse a negative-cost cycle
to make the total cost of the path arbitrarily low. Once these
cases are ruled out, we can guarantee that in any shortest path,
the multiplicity of every edge in the path is at most one.
A QUBO problem in Nvariables is formulated as a com-
putation to nd the solution vector xthat produces the
minimum “energy” where the energy is described as a ho-
mogeneous quadratic polynomial
H=arg min
x{xQx}(1)
where x∈{0,1}Nand QRN×N. The objective function to
be minimized is a homogeneous quadratic polynomial (i.e.,
a degree-2 polynomial with no linear or constant terms) with
real coefcients in Nvariables. Since the products between
variables in the objective function are commutative, the ma-
trix Qcontaining their coefcients must be symmetric; for
succinctness, it is conventionally represented as upper trian-
gular. As its name suggests, the QUBO formulation does not
allow the inclusion of constraints, so to convert a constrained
optimization problem to a QUBO problem, the constraints
must be converted into penalty terms that will prevent invalid
solutions from achieving the minimum value of the objective
function. Problems in the QUBO formulation can be con-
verted to problems in the Ising formulation in a straightfor-
ward way [5].
All approaches to the shortest path problem outlined in this
article will dene the problem using the QUBO formulation.
For the purposes of runtime analysis, it is assumed that the
Qmatrix containing the coefcients of the objective function
is represented in sparse format, so that the time required to
populate it scales with the number of writes to its cells rather
than the N2size of its explicit representation.
III. RELATED WORK
The shortest path algorithm has a rich history of classical
approaches composed of increasingly inventive algorithms
for general graphs and for specic classes of graphs. For the
most general case, where negative-cost edges are permitted
as long as there are no negative-cost cycles, the algorithm
of Bellman and Ford based on dynamic programming can
solve the problem in O(|V||E|) time using O(|V|) space [6],
[7]. Virtually all other general-case algorithms require the
additional restriction that the graph contain no negative edge
costs. All of these algorithms are essentially implementations
of the same algorithm with progressively more efcient data
structures, and they all share a space bound of O(|V|). For
graphs with nonnegative edge costs, the original formula-
tion of Dijkstra’s algorithm using simple arrays can solve
the problem in O(|V|2) steps [8]. For sparse graphs, a min-
priority queue can improve the performance to O((|V|+
|E|)log|V|) [9]. Replacing the queue with a Fibonacci heap
improves this further to O(|E|+|V|log |V|), which is the
current best-known runtime for general graphs [10].
For special classes of graphs, optimal or near-optimal al-
gorithms for nding shortest paths have been developed. For
unweighted graphs, breadth-rst search can trivially solve
the problem in linear time and space relative to the size
of the graph (i.e., O(|V|+|E|). Even for the more gen-
eral class of directed acyclic graphs, a shortest path can
be found within the same time and memory bounds by
topologically sorting the graph [11, pp. 655–657]. For pla-
nar graphs, which satisfy the property |E|≤3|V|−6 (and,
hence, |E|=O(|V|)), the fastest implementation of Dijk-
stra’s algorithm would have a runtime of O(|V|log |V|), but
this has been successively improved to O(|V|log |V|) [12],
then to an optimal O(|V|) [13]; both algorithms assume non-
negative edge costs and have a space requirement linear in
the size of the graph. For general directed graphs whose
3101512 VOLUME 1, 2020
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER Engineering
uantum
Transactions on
IEEE
costs are restricted to integers in {0,1,...,C}, implementing
Dijkstra’s algorithm with a van Emde Boas tree yields an
O(|E|log log C)-time, O(|V|+C)-space algorithm [14]. In
combination with other data structures, this can be improved
to an O(|E|+|V|log C)-time, O(|E|+log2˜C)-space al-
gorithm [15]. Recent advancements in data structure design
have improved the time bound to O(|E|+|V|log log |V|)
or O(|E|+|V|log log C) and the space bound to linear in
the size of the graph [16]. For undirected graphs with the
same restriction on edge costs, a remarkable algorithm that
runs in linear time and space complexity has been demon-
strated [17].
Quantum algorithms for the shortest path problem are
much less abundant. For complete graphs, where |E|=
O(|V|2), a quantum algorithm that leverages Grover search
can solve the shortest path problem in O(|V|7/4) time and
O(|V|) qubits compared to the O(|V|2)-time classical solu-
tion using Dijkstra’s algorithm [18]. More recently, a gate-
based quantum algorithm was developed to solve the single-
source shortest path problem in directed acyclic graphs in
O(|V||E|log |V|) steps using O(|V|) qubits [19]. Notably,
both algorithms limit the quantum advantage to cases where
the input graph is dense, and they both appear to require
the nonnegative edge cost restriction of Dijkstra’s algorithm.
At present, no quantum gate algorithm has been developed
that improves on the classical benchmarks of O(|V||E|)for
general graphs and O(|E|+|V|log |V|) for general nonneg-
atively weighted graphs. And unfortunately, since quantum
gate computers have yet not been developed at a scale large
enough to handle problems of interest, the algorithms devel-
oped for them remain, at least for the time being, a theoretical
novelty.
For adiabatic quantum computing, on the other hand,
progress has been relatively fast. Last year, D-Wave an-
nounced that they will be releasing a 5000-qubit ma-
chine [20], so scalability for quantum annealing is already
being realized. In terms of algorithms, Lucas laid the ground-
work for adiabatic approaches to the shortest path problem by
working out Ising formulations for even more complex prob-
lems on graphs [21]. Bauckhage et al. [22] later incorporated
several elements of Lucas’s Ising formulation of the traveling
salesman problem to sketch an adiabatic approach to the
shortest path problem, but they left further details of their
approach as a subject for future work. As their intent seems
to have been to augment a classical algorithm for nding the
length of a shortest path with an adiabatic procedure to nd a
representation of the path itself, their sketch of the approach
includes some redundant elements. Most signicantly, it pro-
poses the use of Dijkstra’s algorithm as a preprocessing step
to nd the lengths of the shortest path from a given source.
Pakin [23] developed a shortest path algorithm for solving
mazes. His algorithm has both space and time complexity of
O(|V|) for the restricted set of unweighted grid graphs.
The main motivation for our research was to develop adi-
abatic quantum formulations of the shortest path problem
that require a minimal amount of classical preconditioning,
and, if possible, to solve the problem faster than the current
best classical algorithms for the most general classes of input
graphs. The rst two formulations proposed in this article are
robust to directed graphs containing negative edge costs, but
for the reasons stated in Section II, their output is only guar-
anteed to be valid if the input graph is free of cycles with neg-
ative total cost. In terms of their classical construction times,
our last two proposed approaches are asymptotically faster
than the O(|V||E|) Bellman–Ford algorithm in the general
case, and for graphs with nonnegative edge costs and xed
degree, the same two approaches are asymptotically faster
than the O(|E|+|V|log |V|) implementation of Dijkstra’s
algorithm.
IV. HOP-BASED APP ROACH
We will now discuss a detailed implementation of the for-
mulation proposed by Bauckhage et al. To make this imple-
mentation more practical, we have introduced a number of
changes. The most signicant of these is that our implemen-
tation dispenses with the need to invoke Dijkstra’s algorithm
as a classical preprocessing step; i.e., it can nd the shortest
path without knowing the cost of the path beforehand. It
also drops an unnecessary constraint on revisiting vertices
in order to make the approach more robust (for details, see
Section IV-B).
A. FORMULATION
The rst approach begins with the realization that traversing
the graph involves passing through a sequence of vertices
of the graph from source vertex to terminal vertex. Starting
at vertex s, the path proceeds along graph edges, vertex-to-
vertex, until it reaches the vertex t. Implicit in this are restric-
tions and constraints on valid traversals of the graph. Each
of these constraints will be captured in the QUBO energy
equation. Following the Lucas formulation, we will describe
the space of possible solutions as a space of (vertex, position)
pairs. That is, we will dene a solution path as having vertex
iat position pthrough the path, vertex jat position p+1,
and so on. This leads to a few simple constraints. First, we
require that any vertex only appear once in a path. Second,
there must be a vertex in each position. That is, if the path is
three steps long, then positions 1, 2, and 3 must have a vertex
each, with no position being skipped. Third, if vertex iis at
position pand vertex jis at position p+1, then the traversal
incurs a cost equal to the edge cost ci,j. If there is no edge
(i,j), then traversals between iand jshould be penalized.
Let us develop these constraints. First, we will represent a
solution as a set of binary variables, each denoted xi,p, where
the variable xi,pindicates whether vertex iis at position p. Put
another way, these variables represent the sequencing of the
vertices within the path we want to nd. So x1,2=1 means
that vertex 1 occurs at position 2 in the path. Writing these
binary variables as a matrix Xas in (2) enables us to better
VOLUME 1, 2020 3101512
Engineering
uantum
Transactions on
IEEE
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER
understand the constraints
X=
x1,1x1,2··· x1,|P|
x2,1x2,2··· x2,|P|
.
.
..
.
.....
.
.
x|V|,1x|V|,2··· x|V|,|P|
.(2)
Here, we have identied the number of vertices as |V|and
the desired number of hops as |P|. Now, we can enumerate
the constraints dened previously and specify their contribu-
tion to the complete energy equation that will be described
as a weighted sum of individual constraint contributions
(H=kαkHk).
1) Each position must be occupied exactly once in a path.
Assume the path visits |P|≤|V|vertices. Then, we
can reformulate the rst constraint as the following
quadratic penalty function:
HP=|P|
p=1
1|V|
i=1
xi,p
2
.(3)
We can identify the innermost sum |V|
i=1xi,pas the
sum down column pin the matrix Xabove-mentioned.
Any valid solution should have exactly one row in col-
umn pequal to 1, to correspond to one vertex at posi-
tion p. Accordingly, the squared difference of 1 minus
this sum will be minimized at 0 when the constraint is
met at a single vertex position, and the entire penalty
term will be minimized at 0 when the constraint is met
at all positions.
2) Each vertex can appear at most one time in a path.
This constraint is captured by the following quadratic
penalty function:
HV=|V|
i=1
1p<q≤|P|
xi,pxi,q.(4)
This term is minimized at 0 precisely when each row
of Xcontains at most one 1. This term and the previous
one will be minimized together if and only if no 1 in
Xoccurs more than once in the same row or column.
The rows that contain a 1 correspond to the vertices
included at unique positions in the path, and the rows
without a 1 correspond to the vertices excluded from
the path.
3) Traversing an edge (i,j) imposes a cost penalty of ci,j.
This can be easily encoded as the following quadratic
function:
HC=|P|−1
p=1
|V|
i=1
|V|
j=1
ci,jxi,pxj,p+1.(5)
We can forbid transitions between vertices iand jthat
have no connecting edge by setting ci,jto a large
value (the value of which will be made explicit in
Section IV-C).
4) Two additional constraints are implied—that the ow
starts at the source vertex and ends at the terminal
vertex. These constraints are captured in the following
penalty terms:
Hs=(1 xs,1)2(6)
Ht=(1 xt,|P|)2.(7)
Valid solutions will satisfy all constraints; therefore, the
complete, nal energy equation will be a (weighted) sum of
the individual constraints energy contributions
H=αPHP+αVHV+αCHC+αsHs+αtHt.(8)
Here, we have included scaling terms αP
V,... that al-
low us to weigh the relative importance of the constraints.
Optimal values for the scaling terms are likely problem de-
pendent and are a subject of ongoing research, but we can
at least extrapolate explicit choices that are feasible. We
want to ensure that any violated constraint has a higher cost
than the total cost cPof the shortest path. Since we do not
know cPapriori, a reasonable substitute is any value greater
than cE=(i,j)E|ci,j|, the sum of all edge costs (taking
the absolute value in the case of negative edge costs). This
yields the scaling factors αC=1
P=αV=αs=αt>cE.
For succinctness, we will use αto represent the equivalent
scaling factors in the latter group.
We note that this is not a true shortest path algorithm. This
implementation, as will be demonstrated in Section IX, will
produce the lowest-cost path of the specied length. Namely,
a path that visits exactly |P|vertices will be returned, if one
exists, regardless of the existence of lower-cost paths that
visit more or fewer vertices.
B. MAXIMUM HOP EXTENSION
Section IV-A described a formulation to identify a shortest
path that visits a specic number of vertices. While such a
construct may be of interest in some applications, there are
other more common instances in which the true lowest-cost
path is desired, regardless of how many vertices lie along it.
There is a simple extension to the formulation of Section IV-
A that overcomes the deciency of that formulation.
First, recognize that the second constraint captured in (4) is
a carry-over from the formulations for the Hamiltonian path
problem. In that problem, the requirement is to visit every
vertex in the graph once and only once, thus requiring the
constraint. For our problem, no such constraint is strictly nec-
essary; in practice, revisiting the same vertex in a path will in-
duce an unnecessary additional cost in the objective function
and will, therefore, be rejected. But if we augment the graph
with zero-cost “ghost edges” in the form of self-loops (i,i)
with ci,i=0 for each vertex iV, then we can exploit this
relaxation to allow the algorithm to nd the lowest cost path
through the graph that visits at most |P|distinct vertices. The
returned solution will still be exactly |P|“hops,” but multiple
hops to the same vertex can be collapsed in the nal result.
3101512 VOLUME 1, 2020
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER Engineering
uantum
Transactions on
IEEE
For example, one solution found by this relaxed procedure
may be (s,3,3,3,8,t), which, when collapsed to a sequence
of distinct vertices, coincides with the shortest path solu-
tion (s,3,8,t); in this case, the number of hops requested
was |P|=6 but the lowest-cost path found happened to be
one with |P|=4. One consequence of the ghost edges is
that the returned solution space can be greatly increased
since there are now multiple valid solutions. For instance,
(s,3,3,8,8,t) and (s,s,s,3,8,t) represent the same valid
shortest path. Postprocessing of the solutions to collapse the
path is required, but the cost of such postprocessing is linear
in |P|. Since all the “ghost edge” solutions will collapse to
the same true solution, choosing and collapsing the rst is
often sufcient. There may be a signicant penalty to pay,
however, if there is a desire to nd all shortest paths from
sto tin the graph. In that case, all the returned ghost edge
solutions would need to be collapsed in order to identify the
complete set of true shortest paths.
C. EVALUATION
When evaluating the performance of the quantum anneal-
ing algorithms, there are three parameters of interest: the
time needed to populate the matrix Q, the required num-
ber of qubits to represent the problem, and the annealing
time required to solve the problem in (1). The annealing
time required is dependent on the problem specics, the
scaling factors used, and annealing parameters used by the
specic quantum annealing hardware. It is the subject of on-
going research, but we will provide a rudimentary analysis in
Section VII. The qubit requirements and ll time estimates
will be addressed explicitly in the following sections.
For any graph, directed or undirected, this formulation
encodes the shortest path problem using one qubit per ver-
tex per possible position. Since the presumed length of the
shortest path is predetermined to be |P|, we have a required
qubit usage of |P||V|. A shortest path cannot be longer than
the number of vertices, so this is upper bounded by |V|2
qubits. Note that this bound does not account for require-
ments for minor embedding and the inefciencies of specic
qubit hardware connectivity which may impose additional,
not-insignicant qubit overhead.
Fill time for the construction of the Qmatrix includes
penalty term contributions from each constraint. First is the
calculation of the scaling factor for the constraint terms. This
requires one loop through the edges to add up their costs and,
therefore, takes |E|computations.
Each of Hsand Htconsists of just one square term x2
s,1
and x2
t,|P|, respectively, after constant terms have been
dropped and linear terms have been added into the quadratic
terms, so they take one step to write. The quadratic penalty
term for HPconsists of |P||V|(|V|+1)/2 terms, so adding its
terms to the matrix will take O(|P||V|2) steps. The constraint
corresponding to HVhas been dropped in the maximum hop
extension, so we can ignore its contribution. Finally, the ob-
jective function term HCconsists of |P||V|(|V|−1)/2terms,
as all distinct pairs of vertices (whether an edge connects
them or not) induce a traversal cost, so its contribution will be
O(|P||V|2). Combining the constraint contributions yields a
total complexity of O(|E|+|P||V|2). The classical postpro-
cessing required to collapse the ghost edges is O(|P|), so it
does not change the overall complexity.
V. DIRECTED EDGE-BASED APPROACH
A. FORMULATION
An alternative approach would be to adapt the objective
function and constraints of the shortest path problem’s linear
programming formulation for directed graphs
minimize
(i,j)E
ci,jxi,j
subject to 0 xi,j1,(i,j)E
and
j
xi,j
k
xk,i=
1,if i=s
1,if i=t
0,otherwise
iV.(9)
Here, xi,jindicates whether the edge (i,j) is included in
the path. The rst constraint technically allows these vari-
ables to take fractional values between 0 and 1, but because
the shortest path linear program happens to be integral, any
optimal solution will have all xi,j∈{0,1}. The second con-
straint ensures three things that: 1) the source vertex shas one
more edge leaving it than entering it; 2) the terminal vertex t
has one more edge entering it than leaving it; 3) every other
vertex has as many edges entering it as it has leaving it.
In fact, these constraints dene a shortest trail problem
rather than a strict shortest path problem, because they admit
solutions that visit vertices more than once, but the assump-
tion that the graph contains no negative-cost cycles implies
that any shortest trail will in fact be a shortest path. For the
same reason, while the above-mentioned constraints on their
own do not rule out solutions that consist of a proper path and
any number of disjoint cycles, the assertion that no cycles
will improve the objective function value should prevent the
inclusion of disjoint cycles in solutions. (Of course, zero-
cost cycles may occur in otherwise valid solutions, but these
can be removed efciently in classical postprocessing via a
depth-rst search on the edges in the solution starting at sand
ending at t.)
In an undirected graph, where no distinction is made be-
tween a given vertex’s incoming edges and outgoing edges,
enforcing the second constraint is impossible. A trivial solu-
tion is to transform the undirected graph into a directed one
by turning each of its edges into two directed edges with op-
posite orientations. The above-mentioned formulation will,
then, be applicable to the directed version of the graph, but
the directed version of the graph will have twice as many
edges as the undirected version, and the summations in the
VOLUME 1, 2020 3101512
Engineering
uantum
Transactions on
IEEE
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER
second constraint will have twice as many terms. A nontrivial
approach for undirected graphs is discussed in Section VI.
The objective function and constraints in (9) lend them-
selves easily to reformulation as a QUBO objective function.
The rst constraint can be dropped entirely, as the variables
of a QUBO function are already restricted to be binary. The
separate versions of the second constraint can be rewritten as
the following quadratic penalty functions:
Hs=
j
xs,j
k
xk,s1
2
(10)
Ht=
j
xt,j
k
xk,t+1
2
(11)
Hi=
j
xi,j
k
xk,i
2
.(12)
In total, there will be |V|such penalty functions, |V|−2
of which will take the third form. Both Hsand Ht, when
expanded, will include a constant coefcient of 1 and linear
coefcients of 2 and 2. Because all xi,j∈{0,1},itfollows
that x2
i,j=xi,j, and thus, all linear terms can be converted to
square terms without changing the objective function’s val-
ues. After the constant coefcients are dropped, both Hsand
Hthave minimum values of 1. The remaining penalty func-
tions for all other vertices will consist entirely of quadratic
terms and will have minimum values of 0. Finally, using the
same linear-to-quadratic conversion mentioned previously,
the original objective function can be rewritten quadratically
as
HC=
(i,j)E
ci,jx2
i,j.(13)
The objective function is 0 when all xi,j=0 (i.e., when all
edges are excluded), and this should only be the minimum
value when no path from sto texists. We, therefore, want to
scale the terms in the total energy function
H=αsHs+αtHt+
i/∈{s,t}
αiHi+αCHC(14)
so that any valid assignment of the variables achieves a value
less than 0 and any invalid assignment achieves a value
greater than 0. If we knew the cost cPof the shortest path
up front, then we could scale HCby αC=1 and all of the
penalty terms by any α>cP. This would ensure that the
energy corresponding to the shortest path would be cP<0,
while any infeasible solution would have a higher energy
regardless of its total edge cost. Of course, since we do not
know the shortest path length ahead of time, we will need to
use an appropriate surrogate. The simplest choice is α>cE
as dened in the previous section, since cEcP, with
equality holding when the graph is itself a path.
B. EVALUATION
For sparse graphs, this formulation is considerably more eco-
nomical with respect to qubit usage, as it encodes the shortest
path problem in |E|qubits. If, however, the input graph is
undirected, then the encoded problem will need 2|E|qubits
to represent a directed version of the graph.
The rst step in the construction of the Qmatrix is the
calculation of the scaling factor for the constraint terms. This
requires one loop through the edges to add up their costs and,
therefore, takes |E|steps. The constraint term associated with
vertex iis a quadratic function of deg(i) variables, so adding
its terms to the matrix takes deg(i)(deg(i)+1)/2 steps. Fi-
nally, updating the matrix with the coefcients of the HCterm
takes |E|steps. The total number of steps needed to construct
the Qmatrix is, therefore
2|E|+ |V|
i=1
deg(i)(deg(i)+1)
2
=2|E|+1
2
|V|
i=1
deg(i)2+|V|
i=1
deg(i)
=3|E|+1
2
|V|
i=1
deg(i)2
(15)
where the last line follows from the degree sum formula.
This quantity is lower and upper bounded by (3 +δ)|E|and
(3 +)|E|, respectively. When the original graph is undi-
rected and has |E|edges, minimum degree δ, and maxi-
mum degree , then the upper and lower bounds become
(6 +2δ)|E|and (6 +2)|E|, respectively.
VI. U NDIRECTED EDGE-BASE D APPROACH
A. FORMULATION
One way to avoid doubling the number of qubits required
when the previous approach is applied to an undirected graph
is to modify the constraints in a way that is agnostic to edge
orientation. Consider the following constraint satisfaction
problem:
minimize
(i,j)E
ci,jxi,j
subject to xi,j∈{0,1},(i,j)E
and
j
xi,j=
1,if i∈{s,t}
2,if i/∈{s,t}and iP
0,if i/∈{s,t}and i/P
iV.(16)
This formulation replaces ow-based constraints with
cardinality-based constraints. In a valid path, each of vertices
sand twill be incident to one edge in the path, every other
vertex on the path will be incident to two edges in the path,
3101512 VOLUME 1, 2020
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER Engineering
uantum
Transactions on
IEEE
and every vertex not on the path will be incident to zero edges
in the path.
These constraints can be rewritten as quadratic penalty
terms even simpler than their counterparts in the directed
formulation. All we have to do is include |V|additional vari-
ables x1,x2,..., where xiindicates whether or not vertex iis
included in the path. So to start with sand t,wehave
Hs=−x2
s+
xs
j
xs,j
2
(17)
Ht=−x2
t+xt
i
xi,t2
.(18)
The square term at the beginning of each function enforces
the constraint that vertices sand tmust be included in the
solution. The sum on the right-hand side ensures that when
the vertex in question is included in the solution, it is incident
to exactly one edge. Each function is minimized at 1 when
both constraints are met.
The penalty functions for the remaining vertices are even
simpler
Hi=
2xi
j
xi,j
2
.(19)
If iis not in the path, then xi=0, and this function is min-
imized at 0 when no edges incident to iare included in the
path. If iis in the path, then the function is minimized at 0
when exactly two edges incident to iare included.
The objective function can be written as (13). Since all
of the penalty functions have the same minimum values as
they do in the directed formulation, the same scaling factors
for the penalty terms and the objective function term can be
used in this formulation.
B. EVALUATION
For an undirected graph, this formulation encodes the short-
est path problem using one qubit for each edge and one
qubit for each vertex, for a total of |V|+|E|qubits. For any
undirected graph with |E|>|V|(a class encompassing most
graphs of interest), this is a more economical use of qubits
than the approach of converting the undirected graph to a
directed one and using the previous approach.
As in the directed formulation, the rst step in constructing
the Qmatrix is to calculate the scaling factor for the con-
straint penalty terms, which is a sum involving |E|terms.
The constraint penalty term for each iis a quadratic function
in deg(i)+1 variables, so it will have (deg(i)+1)(deg(i)+
2)/2 terms to add to the matrix. As before, updating the
matrix with the coefcients of the HCterm takes |E|steps.
The total number of steps needed to construct the Qmatrix
is, therefore, bounded above by
2|E|+ |V|
i=1
(deg(i)+1)(deg(i)+2)
2
=2|E|+ |V|
i=1
deg(i)2+3deg(i)+2
2
=5|E|+|V|+1
2
|V|
i=1
deg(i)2(20)
which, in turn, is upper bounded by
(5 +)|E|+|V|.(21)
If |E|>|V|, then this is slightly faster than the construction
of the Qmatrix for the directed formulation using the directed
version of the graph.
VII. ANNEALING TIME
Now that we have established bounds on the time required to
prepare a QUBO formulation of the shortest path problem,
we will turn to the question of the complexity of the quantum
annealing process. According to the adiabatic theorem [24],
by slowly evolving a system from an initial state to a nal
state corresponding to the problem we want to solve, we
can track the ground state of the system, even as it changes
to the minimum-energy eigenstate of the Hamiltonian de-
scribing our problem. For the purpose of this analysis, we
will assume that for an n-qubit system, the initial Hamil-
tonian H0describing the energy at the start of the evolu-
tion is the Hamiltonian whose minimum-energy eigenstate
is |+n. The nal Hamiltonian H1consists of the one- and
two-qubit interactions encoded in our QUBO matrix Q, and
its ground state corresponds to the solution we want to nd.
Starting at time s=0 and proceeding to s=1, the energy of
the evolving system will be described by a time-dependent
Hamiltonian H(s) that interpolates between the initial and
nal Hamiltonians
H(s)=(1 s)H0+sH1.(22)
A generally accepted rule of thumb estimates the mini-
mum time τrequired to track the ground state as
τ1
0
|| d
dsH(s)||
γ(s)2ds (23)
where γ=mins[0,1] E1E0describes the minimum spec-
tral gap (i.e., the difference between the eigenvalues or ener-
gies of the ground state and rst excited state) of H(s) over
the course of the evolution [25], [26]. The latter parameter
γis a major problem-dependent factor in the runtime of
quantum annealing. If both || d
dsH(s)|| and γare measured in
Joules, then τwill be have units in inverse Joules; this can be
converted to seconds by multiplying it by the reduced Planck
constant 1.054571817x1034Js (which is commonly di-
vided out from the derivation of τfor simplicity).
VOLUME 1, 2020 3101512
Engineering
uantum
Transactions on
IEEE
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER
FIGURE 2. Example undirected graph with specified edge costs for
numerical example.
FIGURE 3. Plot of the two smallest eigenvalues of H(s) for the
hop-based formulation of the graph in Fig. 2.
We can estimate the value of γfor each of the formulations
previously detailed by calculating the eigenvalues of the cor-
responding time-dependent Hamiltonian H(s) over a discrete
set of values for s. Using the trapezoid rule to approximate the
integral in (23), we can estimate reasonable lower bounds for
τ. Because H(s) is a linear interpolation between H0and H1,
we have || d
dsH(s)|| = ||H1H0||, and since this is a constant
term, it can be factored out of the integral to simplify things
even further.
Because a 2n×2nmatrix is needed to represent an n-qubit
Hamiltonian explicitly, it is computationally infeasible to ap-
proximate these values for problems even of moderate size.
Thus, for our purposes, a small example problem will have to
sufce. We have chosen the four-vertex, ve-edge undirected
graph in Fig. 2, as it is amenable to all three quantum anneal-
ing formulations we have described and does not require too
many qubits to be represented in any of them.
For the hop-based formulation, we have |P|=3 and a total
number of required qubits |P||V|=12. Calculating and sort-
ing the 212 =4096 eigenvalues of H(s) at 21 discrete points
in time gives us the plot of eigenvalues shown in Fig. 3. The
minimum spectral gap observed among these eigenvalues
is γ=1.225 J, and the corresponding lower bound for the
annealing time is τ=1229.694 J1.
For the directed edge-based formulation, the total number
of qubits is |E|=10 (after transforming each undirected
edge into two directed edges). This savings in qubit usage
seems to incur a cost in performance: the eigenvalues be-
come signicantly closer, as shown in Fig. 4. We observe
a much smaller minimum spectral gap γ=0.283 J, and
FIGURE 4. Plot of the two smallest eigenvalues of H(s) for the directed
edge-based formulation of the graph in Fig. 2.
FIGURE 5. Plot of the two smallest eigenvalues of H(s) for the
undirected edge-based formulation of the graph in Fig. 2.
a much larger lower bound for the annealing time at τ=
25810.324 J1.
Finally, for the undirected edge-based formulation, the
total number of qubits is reduced to |V|+|E|=9, but the
spectral gap appears to shrink further, as shown in Fig. 5.
The minimum spectral gap in this case is γ=0.243 J; how-
ever, the lower bound for the annealing decreases to τ=
9904.343 J1.
The increase in the expected annealing time of the edge-
based formulations relative to the hop-based formulation
seems to be due in part to the size of the penalty term scaling
factor α. For the hop-based formulation, if the anticipated
number of vertices visited (and, therefore, the number of
edges in the path) is small, then the penalty scaling factor
will likely be signicantly less than the sum of all edge
costs. If we use the scaling factor for the hop-based formu-
lation in the edge-based formulations, the values of γand
τparameters for these formulations do improve, but they
still remain signicantly worse than the parameters for the
hop-based formulation. For this reason, we suspect that some
factor inherent to the structure of a QUBO formulation gives
rise to a tradeoff between qubit complexity and annealing
complexity.
Unfortunately, because it takes exponential space to con-
struct a Hamiltonian matrix corresponding to a shortest path
formulation, we cannot provide the estimates of γand τfor
larger problem instances needed to extrapolate how these pa-
rameters change with increasing problem size. Theoretically,
applying the annealing process on a D-Wave machine for
3101512 VOLUME 1, 2020
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER Engineering
uantum
Transactions on
IEEE
FIGURE 6. Histograms of measured energies (rescaled to match the
corresponding eigenvalues of the unnormalized Qmatrix) sampled over
2000 reads for annealing durations between 1 µs and 2000 µs. D-Wave
postprocessing (which, by default, involves a classical search for local
improvements to the best-found solutions) was disabled. The tail of the
histogram has been cut off at 45 for the sake of space. Peaks at
suboptimal energy levels are the result of a multiplicity of eigenstates
corresponding to those eigenvalues.
increasing durations and then sampling solutions repeatedly
over many reads (i.e., trials) should produce different his-
tograms of measured energies, with longer annealing times
yielding distributions that favor the ground-state energy. We
ran this test on the hop-based formulation (which has the
shortest annealing time requirement of all three formula-
tions) of the problem in Fig. 2 on a D-Wave 2000Q. We
generated the Qmatrix for this formulation, normalized it
so that its maximum entry had an absolute value of 1 (as
required by the D-Wave), and produced histograms of the
energies of sampled solutions from 2000 reads for annealing
durations ranging from 1 μs to 2000 μs. The results are
displayed in Fig. 6. The more uniform distribution of ener-
gies among sampled solutions for the 1 μs anneal time is
to be expected, but it is surprising that the distribution does
not consistently improve as the anneal time increases. For
instance, the distribution after 500 μs of annealing favors
the minimum-energy solution more than the corresponding
distributions associated with 1000 μs and 2000 μs of anneal-
ing. The success of the annealing process even with relatively
short anneal times is likely due to the D-Wave’s strategy of
starting in a random state rather than in the same |+nstate
for each read. An additional possibility is that the distribution
of states improves more as a step function of the anneal
time, with the distribution improving dramatically only after
a certain threshold; however, because the D-Wave 2000Q
caps annealing time at 2000 μs, we were unable to evaluate
this hypothesis.
VIII. COMPARISON
At this point, let us turn to a comparison of the algorithms. As
we have discussed in Section III, the best classical algorithm
exhibits a worst-case complexity of O(|E|+|V|log |V|)on
general directed or undirected graphs. At present, known
quantum universal gate algorithms only offer an improve-
ment for specic classes of graphs. For the adiabatic
algorithms described herein, the number of classical steps
required to prepare the Qmatrix is O(|E|) on general, di-
rected graphs. For the purposes of this comparison, we have
assumed the annealing time is constant or O(1). For simplic-
ity in representation, Table 1 replaces the size syntax |V|,|E|,
and |P|(the vertex count, edge count, and maximum number
of vertices in the desired path, respectively) with V,E, and P
to reduce the noise in the table.
Beyond the computational complexity, the dening limita-
tion of the usefulness of the quantum algorithms is the num-
ber of qubits required. Given that the quantum computers of
today are limited to very low qubit counts, it is illustrative to
quantify the requirements. The three algorithms described in
this article have minimum qubit requirements, as shown in
Table 2. Note that, this is a direct evaluation of the minimum
number of logical qubits required to represent the problem.
Depending on the specics of the quantum annealing com-
puter used, the “embedding” of the logical qubits (i.e., the
mapping of logical qubits to physical qubits) may result in
dramatically more required qubits. This is especially preva-
lent for dense, highly-coupled problems wherein the entan-
glement between physical qubits requires chaining multiple
qubits in order to entangle two logical qubits.
Based on Table 2, we can get a rough approximation of the
problem size solvable on today’s quantum annealing com-
puter hardware. At present the largest machine available has
2000 qubits with 5000 qubits soon to be available [20]. As-
suming no embedding overhead, that would mean the edge-
based, directed graph algorithm could support nding the
shortest path through a graph with hundreds or even thou-
sands of edges, depending on the average degree of the ver-
tices. As an example of real-world sizing, if we assume each
vertex is an intersection and each edge is a road segment, then
we could compute the shortest path route through a small
city. By way of example, the town of Blacksburg, Virginia,
has roughly 2000 road segments.
IX. EXAMPLES
In order to simplify the verication and implementation of
the formulations presented in this article, examples of the Q
matrices for these formulations will be instructive. We will
use the simple “toy” problem instance presented in the graph
of Fig. 2. Here, we have four vertices with a desired path
from sto t. This example is small enough that it is trivial to
identify the solution (s,1,t) with a cost of 7).
Each of the algorithms will be demonstrated in the follow-
ing sections.
A. HOP-BASED EXAMPLE
To demonstrate the algorithm as described in Section IV, we
will compute the QUBO formulation for the graph of Fig. 2.
If we assume or know that the path is |P|=3 hops long, then
we can generate a 12 ×12 matrix whose rows and columns
correspond to each vertex at each possible position.
While not strictly necessary, setting the scaling factors
for the penalty terms added into the Qmatrix relies on the
VOLUME 1, 2020 3101512
Engineering
uantum
Transactions on
IEEE
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER
TAB L E 1. Comparison of Algorithm Complexities. for the Annealing Approaches, the (Classical) Time and Space Complexities are for the Construction of
the QMatrix
TAB L E 2. Comparison of Qubit Requirements and Estimated Performance Parameters for Quantum Annealing Formulations in This Article
TAB L E 3. QMatrix for the Hop-Based Shortest Path Formulation of the Graph in Fig. 2
TAB L E 4. QMatrix for the Directed Edge-Based Shortest Path Formulation of the Graph in Fig. 2
cumulative sum of the edge costs. For this problem, cE=
(i,j)E|ci,j|=24. Furthermore, the penalty for no con-
nections between vertices needs to be “large.” We will use
the same value cEfor this numerical example. Using the
quadratic coefcients from (8), we get the Qmatrix shown
in Table 3.
B. DIRECTED EDGE-BASED EXAMPLE
For the directed edge-based formulation described in
Section V, we must convert the undirected graph in Fig. 2
to a directed graph with |E|=10 edges. The Qmatrix for
this formulation will, therefore, be a 10 ×10 matrix where
each row and column corresponds to a directed edge. Using
a scaling factor of 1 for the objective function term HCand
a scaling factor of cE=(i,j)E|ci,j|=48 for the |V|=4
penalty terms corresponding to ow constraints, we can pop-
ulate the Qmatrix so that it represents the example graph.
The resulting matrix is shown in Table 4.
C. UNDIRECTED EDGE-BASED EXAMPLE
For the undirected edge-based formulation described in
Section VI, the Qmatrix is a 7 ×7matrixwitharowand
3101512 VOLUME 1, 2020
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER Engineering
uantum
Transactions on
IEEE
TAB L E 5. QMatrix for the Undirected Edge-Based Shortest Path Formulation of the Graph in Fig. 2
column for each of the |E|=5 undirected edges and an
auxiliary row and column for each vertex i/∈{s,t}.Using
a scaling factor of 1 for the objective function term HCand
a scaling factor of cE=(i,j)E|ci,j|=24 for the penalty
terms corresponding to the |V|=4 cardinality constraints,
we can populate the Qmatrix so that it represents the example
graph. The resulting matrix is shown in Table 5.
X. CONCLUSION
We presented three different approaches for solving the
shortest path problem on general directed and undirected
graphs using a QUBO formulation suitable to exploitation on
a quantum annealing machine. This formulation lets the al-
gorithm run on currently available quantum annealing hard-
ware, including that of D-Wave systems. Notional resource
requirements and complexity orders were developed for each
algorithm, allowing for direct comparison with existing clas-
sical algorithms. We also provided estimates for the minimal
spectral gap and annealing time required to track the ground
state of the problem Hamiltonian with high probability.
All three of the approaches outlined in this article accept
as input any simple graph (i.e., one that does not contain self-
loops or multiple edges between the same source and destina-
tion vertices). The two edge-based approaches could easily
be adapted to work with multigraphs, but for the purposes
of nding a shortest path, it is more efcient to remove self-
loops and long redundant edges in preprocessing, since such
edges will never appear in the shortest path. The only other
restrictions are on the orientation of the graph: the hop-based
formulation works with both directed and undirected graphs;
the directed edge-based formulation is designed for directed
graphs, but can work with undirected graphs, as long as they
are rst converted to directed ones; and the undirected edge-
based formulation works exclusively for undirected graphs.
The rst two approaches will work with directed graphs that
contain negative edge costs, but the results will only be valid
if the input graph contains no negative-cost cycles.
After lling in the gaps left in the proposal of Bauckhage
et al. [22], we have shown that a practical adiabatic imple-
mentation of their hop-based formulation offers little im-
provement over the classical approach. The time required
to construct the Qmatrix for the problem, which also
serves as an upper bound for the size of Qin terms of its
nonzero entries, scales as O(|E|+|P||V|2), which is po-
tentially competitive with the Bellman–Ford algorithm, but
asymptotically worse than the slowest implementation of Di-
jkstra’s algorithm.
To remedy this deciency, we have proposed two other
QUBO formulations of the shortest path problem that adapt
ow and cardinality constraints from linear programming
and constraint satisfaction formulations of the shortest path
problem in a straightforward manner. Both formulations use
qubits to represent vertices and edges rather than (vertex,
position) pairs and are, therefore, more efcient than the
hop-based formulation for sparse graphs. For the ow-based
formulation for directed graphs, the construction time for the
Qmatrix scales as O(|E|), and for the cardinality-based
formulation for undirected graphs, it scales as O(|E|+
|V|). Notably, if the graph degree remains xed, then both of
these approaches are asymptotically faster than the fastest-
known implementation of Dijkstra’s algorithm. We expect
the proposed approaches to demonstrate the greatest advan-
tage overknown classical algorithms in directed graphs with
negative edge costs and nonplanar graphs of low degree.
Real-world inputs like road intersection networks with over-
passes and tunnels t nicely into the latter paradigm.
There are a number of directions for future work. The main
bottleneck in the matrix construction for all of the proposed
algorithms is the step of adding the quadratically many terms
of the constraint penalty functions to the Qmatrix. It is not
clear to us how the number of terms that need to be writ-
ten might be intelligently reduced, but we cannot rule out
the possibility, either. On the same note, we welcome any
improvements to the scaling factors used for the constraint
penalty terms in our formulations, as cE=(i,j)E|ci,j|
seems unnecessarily large, and better scaling factors might
yield a larger minimum spectral gap and an improved an-
nealing time.
REFERENCES
[1] T. Kadowaki and H. Nishimori, “Quantum annealing in the transverse
Ising model,” Phys. Rev. E, vol. 58, no. 5, 1998, Art. no. 5355, doi:
10.1103/PhysRevE.58.5355.
[2] J. Brooke, D. Bitko, T. F. Rosenbaum, and G. Aeppli, “Quantum annealing
of a disordered magnet,” Sci., vol. 284, no. 5415, pp. 779–781, 1999, doi:
10.1126/science.284.5415.779.
[3] A. B. Finnila, M. Gomez, C. Sebenik, C. Stenson, and J. D. Doll, “Quan-
tum annealing: A new method for minimizing multidimensional func-
tions,” Chem. Phys. Lett., vol. 219, no. 5–6, pp. 343–348, 1994, doi:
10.1016/0009-2614(94)00117-0.
[4] Z. Bian, F. Chudak, W. G. Macready, and G. Rose, “The Ising
model: Teaching an old problem new tricks,” 2010. [Online]. Avail-
able: https://www.dwavesys.com/sites/default/les/weightedmaxsat_v2.
pdf, Accessed: Apr. 14, 2020.
VOLUME 1, 2020 3101512
Engineering
uantum
Transactions on
IEEE
Krauss and McCollum: SOLVING THE NETWORK SHORTEST PATH PROBLEM ON A QUANTUM ANNEALER
[5] “Reformulating a problem.” [Online]. Available: https://docs.dwavesys.
com/docs/latest/c_handbook_3.html, Accessed: Apr. 6, 2020.
[6] L. R. Ford, “Network ow theory,” RAND Corp., Santa Monica, CA,
USA, Tech. Rep. P-923, 1956.
[7] R. Bellman, “On a routing problem,” Quart. Appl. Math., vol. 16, no. 1,
pp. 87–90, 1958, doi: 10.1090/qam/102435.
[8] E. W. Dijkstra, “A note on two problems in connexion with graphs,Nu-
mer. Math., vol. 1, no. 1, pp. 269–271, 1959, doi: 10.1007/BF01386390.
[9] D. B. Johnson, “Efcient algorithms for shortest paths in sparse networks,”
J. ACM, vol. 24, no. 1, pp. 1–13, 1977, doi: 10.1145/321992.321993.
[10] M. L. Fredman and R. E. Tarjan, “Fibonacci heaps and their uses in
improved network optimization algorithms,J. ACM, vol. 34, no. 3,
pp. 596–615, 1987, doi: 10.1145/28869.28874.
[11] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to
Algorithms. Cambridge, MA, USA: MIT Press, 2009.
[12] G. N. Federickson, “Fast algorithms for shortest paths in planar graphs,
with applications,” SIAM J. Comput., vol. 16, no. 6, pp. 1004–1022, 1987,
doi: 10.1137/0216064.
[13] M. R. Henzinger, P. Klein, S. Rao, and S. Subramanian, “Faster shortest-
path algorithms for planar graphs,” J. Comput. Syst. Sci., vol. 55, no. 1,
pp. 3–23, 1997, doi: 10.1006/jcss.1997.1493.
[14] P.van Emde Boas, R. Kaas, and E. Zijlstra, “Design and implementation of
an efcient priority queue,” Math. Syst. Theory, vol. 10, no. 1, pp. 99–127,
1976, doi: 10.1007/BF01683268.
[15] R. K. Ahuja, K. Mehlhorn, J. Orlin, and R. E. Tarjan, “Faster algorithms
for the shortest path problem,” J. ACM, vol. 37, no. 2, pp. 213–223, 1990,
doi: 10.1145/77600.77615.
[16] M. Thorup, “Integer priority queues with decrease key in constant time and
the single source shortest paths problem,” J. Comput. Syst. Sci., vol. 69,
no. 3, pp. 330–353, 2004, doi: 10.1016/j.jcss.2004.04.003.
[17] M. Thorup, “Undirected single-source shortest paths with positive integer
weights in linear time,” J. ACM, vol. 46, no. 3, pp. 362–394, 1999, doi:
10.1145/316542.316548.
[18] M. Heiligman, “Quantum algorithms for lowest weight paths and spanning
trees in complete graphs,” 2003, arXiv:quant-ph/0303131.
[19] K. Khadiev and L. Sana, “Quantum algorithm for shortest path search in
directed acyclic graph,” Moscow Univ. Comput. Math. Cybern., vol. 43,
no. 1, pp. 47–51, 2019, doi: 10.3103/S0278641919010023.
[20] “D-Wave previews next-generation quantum computing platform,
[Online]. Available: https://www.dwavesys.com/press-releases/d-wave-
previews-next-generation%- quantum-computing- platform, Accessed:
Apr. 6, 2020.
[21] A. Lucas, “Ising formulations of many NP problems,” Front. Phys.,
vol. 2, 2014, doi: 10.3389/fphy.2014.00005.
[22] C. Bauckhage, E. Brito, K. Cvejoski, and C. Ojeda, “Towards shortest
paths via adiabatic quantum computing,” in Proc. Mining Learn. Graphs,
London, U.K., 2018.
[23] S. Pakin, “Navigating a maze using a quantum annealer,” in Proc. 2nd
Int. Workshop Post Moores Era Supercomput., 2017, pp. 30–36, doi:
10.1145/3149526.3149532.
[24] M. Born and V. Fock, “Beweis des adiabatensatzes,” Zeitschrift Physik,
vol. 51, pp. 165–180, 1928, doi: 10.1007/BF01343193.
[25] A. M. Childs, E. Farhi, and J. Preskill, “Robustness of adiabatic quantum
computation,” Phys. Rev. A, vol. 65, doi: 10.1103/PhysRevA.65.012322.
[26] B. W. Reichardt, “The quantum adiabatic optimization algorithm and
local minima,” in Proc. 36th Annu. ACM Symp. Theory Comput., 2004,
pp. 502–510, doi: 10.1145/1007352.1007428.
Thomas Krauss received the B.S. and M.S. de-
grees from Michigan State University, East Lans-
ing, MI, USA, in 1987 and 1989, respectively,
bothinphysics.
He is currently a Senior Research Associate
with the Ted and Karyn Hume Center for National
Security and Technology, Virginia Polytechnic
Institute and State University, Blacksburg, VA,
USA. He joined the Hume Center in August
2015, bringing a wealth of experience with elec-
tromagnetic modeling, signal propagation, wave-
form analysis, software development, and high-performance computing.
He has extensive experience with high-reliability, high-performance, and
quantum computing, as well as machine learning and network modeling and
simulation.
Joey McCollum received the bachelor’s degree
in mathematics and creative writing (double ma-
jor) from the University of Maine at Farming-
ton, Farmington, ME, USA, in 2011.
He is currently a Research Associate with the
Electronic Systems Lab (ESL), Ted and Karyn
Hume Center for National Security and Technol-
ogy, Virginia Polytechnic Institute and State Uni-
versity, Blacksburg, VA, USA. He joined ESL in
2018, and since then, he has worked primarily on
projects related to signals analysis and wireless
networks. Prior to his employment at the Hume Center, he worked for seven
years in industry and government settings.
3101512 VOLUME 1, 2020
... We consider a wireless multi-hop network modeled as a directed graph G = (V, E, W ) [13], which comprises a set of nodes V , directed edges E, and edge weights w i,j representing the cost of transmitting data across the edge from node i to node j. The source node is denoted by S, while the destination node is denoted by D. Fig. 1 illustrates an example of such a weighted directed graph. ...
... We perform a complexity analysis and comparison of several classical and quantum routing algorithms with CIM, as presented in Table III. The analysis scenario is set as a weighted positive edge-directed graph [13]. ...
Preprint
Full-text available
Multi-objective combinatorial optimization in wireless communication networks is a challenging task, particularly for large-scale and diverse topologies. Recent advances in quantum computing offer promising solutions for such problems. Coherent Ising Machines (CIM), a quantum-inspired algorithm, leverages the quantum properties of coherent light, enabling faster convergence to the ground state. This paper applies CIM to multi-objective routing optimization in wireless multi-hop networks. We formulate the routing problem as a Quadratic Unconstrained Binary Optimization (QUBO) problem and map it onto an Ising model, allowing CIM to solve it. CIM demonstrates strong scalability across diverse network topologies without requiring topology-specific adjustments, overcoming the limitations of traditional quantum algorithms like Quantum Approximate Optimization Algorithm (QAOA) and Variational Quantum Eigensolver (VQE). Our results show that CIM provides feasible and near-optimal solutions for networks containing hundreds of nodes and thousands of edges. Additionally, a complexity analysis highlights CIM's increasing efficiency as network size grows
... QA allows quantum systems to identify the best storyline paths among numerous possibilities by utilizing principles of superposition and quantum tunneling. This algorithm can adiabatically navigate vast solution spaces to identify the optimal ground state based on user actions and preferences [19]. In the context of language learning games, QA can adjust the difficulty level of the storyline in real time, fostering adaptive and dynamic learning experiences. ...
Article
Full-text available
The advanced Quantum Information Technologies subject for Ph.D. students in Electronics Engineering and ICT consists of three parts. A few review lectures concentrate on topics which may be of interest for the students due to their fields of research done individually in their theses. The lectures indicate the diversity of the QIT field, resting on physics and applied mathematics, but possessing wide application range in quantum computing, communications and metrology. The individual IQT seminars prepared by Ph.D. students are as closely related to their real theses as possible. Important part of the seminar is a discussion among the students. The task was to enrich, possibly with a quantum layer, the current research efforts in ICT. And to imagine, what value such a quantum enrichment adds to the research. The result is sometimes astonishing, especially in such cases when quantum layer may be functionally deeply embedded. The final part was to write a short paragraph to a common paper related to individual quantum layer addition to the own research. The paper presents some results of such experiment and is a continuation of previous papers of the same style.
... Similarly, quantum computers shown promise in topological data analysis (TDA) [29][30][31][32][33], where quantum algorithms can provide insights that are difficult to achieve with classical methods [34][35][36][37][38][39]. In the domain of graph and network theory, there are examples of quantum algorithms for finding shortest paths [40,41] and detecting cliques [42]. Photonic samplers were successfully applied to study maximal clique finding for molecular docking [43][44][45]. ...
Preprint
Full-text available
We propose a quantum algorithm for calculating the structural properties of complex networks and graphs. The corresponding protocol -- deteQt -- is designed to perform large-scale community and botnet detection, where a specific subgraph of a larger graph is identified based on its properties. We construct a workflow relying on ground state preparation of the network modularity matrix or graph Laplacian. The corresponding maximum modularity vector is encoded into a log(N)\log(N)-qubit register that contains community information. We develop a strategy for ``signing'' this vector via quantum signal processing, such that it closely resembles a hypergraph state, and project it onto a suitable linear combination of such states to detect botnets. As part of the workflow, and of potential independent interest, we present a readout technique that allows filtering out the incorrect solutions deterministically. This can reduce the scaling for the number of samples from exponential to polynomial. The approach serves as a building block for graph analysis with quantum speed up and enables the cybersecurity of large-scale networks.
... As a result, this hybrid approach significantly scales down the overall computation time when compared to the traditional methods, specifically excelling in dense graphs where the number of potential paths and nodes is substantial. The hybrid quantum-classical algorithm markedly outperforms classical algorithms alone, most so within the boundaries of large and complex networks (14). Again, the reduction in terms of computation time is mainly attributed to Grover's algorithm's ability to search through quite a number of possible paths in a simultaneous manner, a feat that is unattainable through classical means. ...
Article
Full-text available
Quantum technologies have emerged as a transformative force, poised to revolutionize industries beyond the constraints of conventional technologies. The 2023 Quantum Technology Monitor forecasts substantial economic benefits of up to $1.3 trillion by 2035 across sectors like automotive, chemicals, finance, and life sciences through quantum computing applications. Quantum mechanics, once confined to theoretical realms, now garners widespread attention for its practical implications. Quantum physics delves into the fundamental nature of matter, showcasing phenomena that defy classical intuition, with applications ranging from MRI scanners to cutting edge technologies like solar cells. The evolution of quantum mechanics has birthed quantum computing, a multidisciplinary field merging computer science, physics, and mathematics to tackle complex computational challenges at unparalleled speeds. Industries such as Healthcare, Drug Development, Financial Services, Data Security, and Logistics are poised to reap significant rewards from quantum computing advancements. In the transportation sector, quantum computing offers transformative potential, particularly in traffic engineering, where it can optimize route planning and resource allocation. The exploration of quantum-inspired algorithms for solving fundamental challenges like the shortest path problem further underscores the promise of quantum computing in transportation optimization. Companies like D-Wave lead the charge in quantum computing development, showcasing real-world applications such as optimizing bus routes dynamically. This paper encapsulates the burgeoning landscape of quantum technology, its applications in transportation, and the potential for reshaping industries through quantum computing advancements.
... The solution to the ODIMCF problem using the D-Wave quantum annealer is an advancement and generalization to the linear programming formulation of the single source, single-destination shortest problem on quantum annealing [27]. ...
Article
Full-text available
Quantum computing offers a novel perspective for solving classically intractable problems. The computational heuristic non-binary nature of quantum computers, based on quantum mechanical properties, associates several advantages and disadvantages. We explore quantum annealing (QA), a metaheuristic algorithm with the primary objective of solving NP-hard optimization problems intractable to classical algorithms. Here we solve a particular family of NP problems, called origin–destination integer multi-commodity flow problem (ODIMCF), using QA. This includes the quadratic unconstrained binary optimization (QUBO) formulation and the practical implementation of this problem on the D-Wave QA. Additionally, quantum annealers are benchmarked against other classical solvers to assess the ODIMCF problem’s solution quality and runtime performance.
... Quantum connectivity algorithms, such as quantum Breadth First Search (BFS), offer more efficient ways of maintaining connectivity information like connected components in graph streams [168]. Quantum shortest path algorithms, based on techniques like quantum walk, can help monitor shortest paths and distances in dynamically changing graphs [169]. Quantum centrality algorithms provide a means to quantify the importance of nodes using measures like betweenness centrality and eigenvector centrality, enabling the analysis of evolving node influence and roles [170]. ...
Preprint
Full-text available
Datastreams serve as the fundamental conduits of information in contemporary society, playing a pivotal role in various aspects of our daily lives. This paper delves into the utilization of datastreams, elucidates the challenges encountered during their application, and presents potential solutions to overcome these challenges. Different approaches to handle datastreams are discussed, encompassing diverse methodologies. Some methods emphasize the employment of mathematical and statistical techniques for comprehending and analyzing data, while others capitalize on Machine, Deep, and Continual Learning to extract meaningful patterns. Furthermore, the paper explores the emergence of quantum machines that leverage the principles of quantum physics to tackle datastream related tasks. The advent of quantum machines holds promising prospects for revolutionizing data handling mechanisms in the future. In addition to data analysis, the paper delves into the platforms and systems employed to effectively process and organize datastreams. These platforms act as indispensable tools, facilitating efficient management and manipulation of the copious volumes of data within datastreams. Measurement of datastream performance is another key aspect addressed in the paper, wherein several metrics are examined. These metrics provide valuable insights into the efficacy of datastream methodologies. An intriguing subject discussed is eXplainable AI (XAI) datastreams, which offers a means to comprehend the decision-making processes of complex algorithms, such as neural networks. Lastly, the paper highlights the persisting challenges encountered in working with datastreams and outlines potential future directions in the field. These insights shed light on the evolving landscape of datastream utilization and anticipate the exciting possibilities that lie ahead.
Preprint
Full-text available
In silico de novo design can drastically cut the costs and time of drug development. In particular, a key advantage of bottom-up physics-based approaches is their independence from training datasets, unlike generative models. However, they require the simultaneous exploration of chemical and conformational space. In this study, we address this formidable challenge leveraging quantum annealers. Focusing on peptide de novo design, we introduce a multi-scale framework that integrates classical and quantum computing for atomically resolved predictions. We assess this scheme by designing binders for several protein targets. The D-Wave quantum annealer rapidly generates a chemically diverse set of binders with primary structures and binding poses that correlate well with experiments. These results demonstrate that, even in their current early stages, quantum technologies can already empower physics-based drug design.
Conference Paper
Full-text available
Since first working quantum computers are now available, accelerated developments of this technology may be expected. This will likely impact graph- or network analysis because quantum computers promise fast solutions for many problems in these areas. In this paper, we explore the use of adiabatic quantum computing in finding shortest paths. We devise an Ising energy minimization formulation for this task and discuss how to set up a system of quantum bits to find minimum energy states of the model. In simulation experiments, we numerically solve the corresponding Schrödinger equations and observe our approach to work well. This evidences that shortest path computation can at least be assisted by quantum computers.
Conference Paper
Full-text available
Quantum annealers exploit quantum effects in an attempt to minimize a classical Hamiltonian function with a higher likelihood of reaching optimality than can be expected from simulated annealing. The key programming challenge is how to express algorithms in terms of the specific Hamiltonian supported by the quantum-annealing hardware. In this paper, we present an algorithm for finding the shortest path through a maze not via a traditional backtracking mechanism but rather by expressing the shortest path as the globally optimal value of a Hamiltonian.
Article
Full-text available
We provide Ising formulations for many NP-complete and NP-hard problems, including all of Karp's 21 NP-complete problems. This collects and extends classic results relating partitioning problems to Ising spin glasses, as well as work describing exact covering algorithms and satisfiability. In each case, the state space is at most polynomial in the size of the problem, as is the number of terms in the Hamiltonian. This work may be useful in designing adiabatic quantum optimization algorithms.
Article
In this work, we consider a well-known “Single Source Shortest Path Search” problems for weighted directed acyclic graphs (DAGs). We suggest a quantum algorithm with time complexity O(nmlog  n)O(\sqrt {nm} \,\log \;n) and O(1/n) error probability, where n is a number of Vertexes, m is the number of edges. We use quantum dynamic programming approach (Khadiev, 2018) and Dürr and Høyer minimum search algorithm to speed up our search. Our algorithm is better than C. Dürr and coauthors’ quantum algorithm for an undirected graph. The time complexity of C. Dürr’s algorithm is O(nm(log  n)2)O(\sqrt {nm} \,{(\log \;n)^2}). The best known deterministic algorithm for the problem is based on a dynamic programming approach and its time complexity is O (n + m). At the same time, if we use algorithms for general graphs, then we do not get better results. The time complexity of best implementations of Dijkstra’s algorithm with Fibonacci heap is O (m + n log n).
Article
: Given a set of N cities, with every two linked by a road, and the times required to traverse these roads, we wish to determine the path from one given city to another given city which minimizes the travel time. The times are not directly proportional to the distances due to varying quality of roads, and v varying quantities of traffic. The functional equation technique of dynamic programming, combined with approximation in policy space, yield an iterative algorithm which converges after at most (N-1) iterations.
Article
Der Adiabatensatz in der neuen Quantenmechanik wird fr den Fall des Punktspektrums in mathematisch strenger Weise bewiesen, wobei er sich auch bei einer vorbergehenden Entartung des mechanischen Systems als gltig erweist.
Article
We consider a graph with n vertices, all pairs of which are connected by an edge; each edge is of given positive length. The following two basic problems are solved. Problem 1: construct the tree of minimal total length between the n vertices. (A tree is a graph with one and only one path between any two vertices.) Problem 2: find the path of minimal total length between two given vertices.
Article
We consider Fibonacci heap style integer priority queues supporting find-min, insert, and decrease key operations in constant time. We present a deterministic linear space solution that with n integer keys supports delete in time. If the integers are in the range [0,N), we can also support delete in time.Even for the special case of monotone priority queues, where the minimum has to be non-decreasing, the best previous bounds on delete were and . These previous bounds used both randomization and amortization. Our new bounds are deterministic, worst-case, with no restriction to monotonicity, and exponentially faster.As a classical application, for a directed graph with n nodes and m edges with non-negative integer weights, we get single source shortest paths in time, or if C is the maximal edge weight. The latter solves an open problem of Ahuja, Mehlhorn, Orlin, and Tarjan from 1990.
Conference Paper
The quantum adiabatic optimization algorithm uses the adiabatic theorem from quantum physics to minimize a function by interpolation between two Hamiltonians. The quantum wave function can sometimes tunnel through significant obstacles. However it can also sometimes get stuck in local minima, even for fairly simple problems. An initial Hamiltonian which insufficiently mixes computational basis states is analogous to a poorly mixing Markov transition rule. We study a physical system -- the Ising quantum chain with alternating sector interaction defects, but constant transverse field -- which is equivalent to applying the quantum adiabatic algorithm to a particular SAT problem. We prove that for a constant range of values for the transverse field, the spectral gap is exponentially small in the sector length. Indeed, we prove that there are exponentially many eigenvalues all exponentially close to the ground state energy. Applying the adiabatic theorem therefore takes exponential time, even for this simple problem.