← Atlas

Algorithms · Quantum walk

Quantum walk speedup of backtracking

Backtracking is the general classical technique for exploiting problem structure in constraint satisfaction: explore a tree of partial assignments and prune the branches a predicate rules out. The question is whether an arbitrary backtracking algorithm — any predicate and any branching heuristic — can be sped up quantumly, rather than replaced by brute-force search over the whole assignment space.

Attested & literatureUpdated

Open on the mapView frozen graph

A small worked example, computed in your browser. It is not a result from this record's papers.

A discrete-time quantum walk on a 4-cycle

One coin qubit, two position qubits (4 positions on a cycle), 3 steps starting at position 0.

q0q1q2Step 1 of 3 · Quantum walk step (4-cycle)Quantum walk step (4-cycle)Step 2 of 3 · Quantum walk step (4-cycle)Quantum walk step (4-cycle)Step 3 of 3 · Quantum walk step (4-cycle)Quantum walk step (4-cycle)

Step 1 of 3 · Quantum walk step (4-cycle)

Probability of each outcome after this step

  • 01150%
  • 11050%
  1. Flips the coin with a Hadamard, then shifts the position by +1 if the coin is |1⟩ or -1 mod 4 if the coin is |0⟩; with the coin in superposition, both shifts happen at once, entangling coin and position.

    Probability leaves the outcome it was on and appears on 2 entirely different ones — not one outcome is populated both before and after. This is the step that entangles the qubits: from here on no single qubit has a state of its own, only the register as a whole does.

  2. The same coin flip and shift, applied again.

    Probability leaves all 2 outcomes it was on and appears on 4 entirely different ones — not one outcome is populated both before and after.

  3. The same coin flip and shift, a third time.

    Probability leaves all 4 outcomes it was on and appears on 2 entirely different ones — not one outcome is populated both before and after. The entanglement comes apart here: each qubit has a state of its own again.

Readout The position always reads 3, for either value of the coin: constructive interference on this small cycle concentrates the walk onto a single position after exactly 3 steps.

Open in Studio
  • Record typeLiterature reference
  • Speedup class (secondary source)Polynomial
  • Primary source on the speedupStated by the primary source: "We usually think of T as being exponential in n; in this regime this complexity is a near-quadratic speedup over the classical algorithm."
  • Reported costO(√T · n^(3/2) · log n) evaluations of the predicate and the heuristic to find a solution or report none, where T is the number of vertices in the classical backtracking algorithm's tree and n the number of variables. Detecting whether a solution exists is cheaper, at O(√T · n) evaluations, and the promised-unique case costs O(√T · n · log³ n).
  • Papers1
TakesNothingWhat joins here

No input port at this edge: the record publishes no gate sequence and no register, so there is nothing here to read one off — and unlike a declared hole, nothing has been recorded about what belongs here.

Nothing in the Atlas meets this end.

ReturnsNothingWhat joins here

No output port at this edge: the record publishes no gate sequence and no register, so there is nothing here to read one off — and unlike a declared hole, nothing has been recorded about what belongs here.

Nothing in the Atlas meets this end.

This record publishes no gate sequence and no register, so there is nothing here to read an interface off. Absent rather than empty. See all 152 →

References

  • Quantum walk speedup of backtracking algorithms

    Ashley Montanaro · 2015

    Primary source, and the source of this record's cost claim. Theorem 1 in section 1.1 is detection and Theorem 2 is finding — different costs, and worth reading as two results rather than one. Section 2.1 carries the bounded-degree assumption and the doubling trick that removes the need to know the tree size in advance. Section 5 is where the author states the limit that matters most in practice: where classical backtracking finds a solution early without exploring the whole tree, this algorithm may not outperform it.

Attested & literature
  • Peer-reviewed paper
Method
Curation only. The problem statement was recorded from the literature; the speedup class is checked against the record's own primary paper, which states it; the primary reference's title, authors and submission year were read from its arXiv abs page; the complexity claim was taken from a clause of that paper's abstract (abstract of arXiv:1509.02374: "Assume there is a classical backtracking algorithm which finds a solution to a CSP on n variables, or outputs that none exists, and whose corresponding tree contains T vertices, each vertex corresponding to a test of a partial solution. Then we show that there is a bounded-error quantum algorithm which completes the same task using O(√T n^{3/2} log n) tests."; section 1.1, Theorem 1, for detection: "there is a quantum algorithm which, given T, evaluates P and h O(√T n log(1/δ)) times each, outputs true if there exists x such that P(x) is true, and outputs false otherwise"; section 1.1, Theorem 2, for the unique case: "there is a quantum algorithm which outputs x₀ using P and h O(√T n log³ n log(1/δ)) times each."). No circuit was constructed, simulated or run.
Result
Pass · the record's problem, speedup class and primary reference agree with the two sources named above.
Caveat
This is a literature record: nothing was constructed, compiled, simulated or run, and no constraint satisfaction problem was solved here. **The square root is taken of the tree size T, not of the problem size**, and n enters only as a polynomial overhead — so this is a near-quadratic speedup over the classical backtracking algorithm's own running time, not a quadratic speedup in the number of variables, and it says nothing about problems where backtracking explores few nodes. Detecting whether a solution exists and finding one are separate theorems with different costs, and the finding algorithm is the more expensive by a factor of √n; the finding extension also assumes every vertex has bounded degree. The bound is stated with T given as input, though the paper notes that doubling a guess costs only a logarithmic factor. The paper is explicit that its algorithm may not beat the classical one on every instance: where classical backtracking is lucky and finds a solution without exploring the whole tree, the quantum algorithm, which is forced to explore it, may not outperform it. The dramatic exponential separation the paper also derives holds in a non-standard average-case setting under particular input distributions, not in the worst case. Finally, this record covers one strand of the Zoo's heading, which cites eight papers and cross-references the Zoo's own Adiabatic Algorithms entry. Seven of those eight papers are covered by no record here: Ambainis's survey; Cerf, Grover and Williams on nested quantum search; Mandra, Guerreschi and Aspuru-Guzik; Hastings's short-path algorithm; Dalzell, Pancotti, Campbell and Brandão; Brandão, Kueng and Stilck França on semidefinite approximations; and Ambainis and Kokainis on tree size estimation — which an earlier reading of this heading omitted, while counting the cross-reference as if it were a paper.
Quantum walk speedup of backtracking algorithms ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
Citation metadata only; source publication terms apply
backtrackingconstraint satisfactionquantum walkeffective resistancetree search

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.