About this map
Sections
What this is
Quantum algorithms are not written from scratch. They are assembled from a small number of reusable steps, and almost every published method is a different route through the same handful of them.
This is a map of those routes. Circles are the things an algorithm can be holding. Lines are the steps that carry you from one to the next. A method is a path across.
Nothing here is generated. Every line was read out of a paper and checked against it.
How to read it
- Something you can hold — a state, a matrix, a circuit, an answer.
- The same, in the middle of a step you have opened.
- A step. Someone has published a way through it.
- A step whose way through has not been pinned to one method.
- A step nothing published fills yet.
- A step you have opened. What is drawn inside it is how it was done.
- There is a record in the repository for this one.
How to move around
- Two fingers move the map. Pinch to zoom, or hold ctrl and scroll.
- Click a step to open it in place — everything else stays where it is.
- Click a name to read the full record without leaving the map.
- Arrow keys move, plus and minus zoom, zero puts it back.
What a line is claiming
A solid line means a paper puts those two steps together and we have the citation. A long-dashed line means the route is recorded but no single method has been named for that step. A short-dashed line means nothing published fills it — the step is real, the way through is not written yet.
A count after a step's name — ×T/h, ×O(κ) — means the route walks that step that many times rather than once. It is the source's own symbol, and the card says what it stands for and what one turn costs. A step with no count is a step no source we read said is repeated, which is not the same as one taken once.
A line drawn nested under another, on the soft shaded band behind it, is a narrower version of the line above it: the same construction, re-analysed or re-tuned, filling the same step. It is why two lines can draw the identical interior and still be two entries. Lines outside the band are alternatives to their neighbours, not versions of them.
The map does not hide the gaps. An empty step is drawn as an empty step.
What is not here yet
The map covers the algorithm literature. The repository covers circuits and primitives. They overlap less than you would expect, and where a method has no record we say so on its page rather than leaving the space blank.
Where something named here does have a record, its name links straight to it.
Method
Period finding over the reals
When the period is irrational there is no exact answer to land on, so the function is evaluated on a discretisation of the reals and the period is approximated instead. Two samples are taken rather than one, and the continued-fraction step runs on their ratio — the same idea as the integer route, doing a job the integer route cannot do at all.
Open the full recordFills the slot: Recover the period of a periodic function
Hallgren is explicit that this is a different method and not a re-run of Shor's: the principal ideal problem "reduces to a discrete log type problem, but there is no longer an underlying group. Instead, a group-like subset of the reals modulo an irrational number is used. This prevents direct application of Shor's algorithms." He names the technique and its limit in the same breath — "Fourier sampling can only be performed over finite groups... In this work we extend Fourier sampling to non-finitely generated groups, as there will be an underlying periodic function over the reals whose period we wish to approximate" — and states where the new difficulty sits: "The general idea for the algorithm is the same as in Shor's discrete log algorithm, but we have new technical difficulties because we are computing modulo an irrational number."
A circuit evaluating f on a superposition of inputs, the promise that f is periodic, the kind of object its period is (an integer in a finite cyclic group, an irrational real, a lattice of rank r), and — where the period is not an integer — the precision wanted.
Function promised to be periodic → The period, recoveredsample twice, test convergents of the ratio
Algorithm 3.1 treats the period as an irrational quantity that cannot be landed on exactly: approximation: the periodic function is replaced by an -pseudo-periodic one, , where denotes rounded down or up. Given an upper bound on , it fixes , Fourier samples over twice to get integers and , and takes the continued-fraction expansion of ; each convergent approximates the ratio of two integer multiples of , so rounding each to the nearest integer, testing it against the verification procedure — which also accepts integer multiples of — and keeping the smallest candidate that passes recovers a value within 1 of . assumption: this needs an efficient procedure that verifies whether a candidate is a multiple of , and injective on the -fraction of offsets where it is pseudo-periodic, succeeding, for any period above an absolute constant, with probability .
approximationassumption
The period: an exact integer where the group is finite, or an approximation to the requested precision together with the classical post-processing that turned the measured samples into it.
None found yet.
given f : Z -> X, epsilon-pseudo-periodic with real period S (Def. 3.1)
# f(k) = f(k + [iS]) for at least an epsilon-fraction of offsets
# k in {0, ..., floor(S)}, where [iS] means iS rounded down OR up --
# the discretisation this method needs because S is irrational and
# no q makes f exactly periodic on any finite grid
f injective across that epsilon-fraction of pseudo-periodic offsets (Alg. 3.1, Input)
verify(T), an efficient procedure that accepts when T is within 1
of S, or within 1 of an integer multiple of S (Def. 3.2)
an upper bound M on S (Alg. 3.1, Input)
# verify() is ASSUMED, not built: the paper takes it "for the sake of
# simplicity", noting one exists in the Section 3.2 application (Sec. 3.1)
requires S greater than some absolute constant -- below it the success
probability this method relies on is not claimed to hold. The lemma
states no numeric value for that constant; the log M >= 262 that
appears in Claim 3.1 is an interior step of the proof, not a stated
precondition of the method (Lemma 3.1)
# --- fix a modulus large enough to resolve S from the samples --------------
choose an integer q >= 3*M^2 (Alg. 3.1, step 1)
# the proof needs q >= 3*S^2 for the continued-fraction bound and
# q >= S^2 for the final rounding bound; M >= S makes step 1 cover
# both, which is the only reason the bound M is required at all (Lemma 3.1, proof)
# --- Fourier sample f twice over Z_q ---------------------------------------
c = Fourier-sample f over Z_q
d = Fourier-sample f over Z_q (Alg. 3.1, step 2)
# each sample lands within 1/2 of an unknown integer multiple of the
# irrational q/S: c = round(k*q/S), d = round(l*q/S), for unknown
# integers k <= l <= S
# one sample alone is useless: the multiple is unknown. Dividing the two
# cancels q/S and leaves k/l; dividing c back by k then returns q/S
# itself, and S with it (Sec. 3.1)
# --- recover k from the continued fraction of the ratio --------------------
expand c/d as a continued fraction, with convergents k_i/l_i (Alg. 3.1, step 3)
# written k_i/l_i here rather than the paper's own c_i/d_i, so the names
# do not collide with the samples c and d -- one of which the next
# line needs by name
# k/l is a convergent of c/d whenever |c/d - k/l| <= 1/(2*l^2), which
# q >= 3*S^2 secures (Lemma 3.1, proof)
for each convergent k_i/l_i:
candidate = round(k_i * q / c) (Alg. 3.1, step 4)
# nearest integer. The denominator is the FIRST Fourier sample c --
# one fixed integer, the same for every convergent -- not the
# convergent's own denominator l_i. Only the numerator k_i is
# taken from the convergent; l_i serves only to pick it out
# this is the quantity the correctness bound is proved for:
# if c = round(k*q/S) and q >= S^2 then |S - round(k*q/c)| <= 1 (Lemma 3.1, proof)
if verify(candidate):
keep candidate
return the smallest kept candidate (Alg. 3.1, step 5)
# an integer within 1 of S, in time polynomial in log S -- an
# approximation, not S exactly, since S is irrational and there is no
# integer to land on (Lemma 3.1)
# succeeds with probability Omega(epsilon^2 / (log M)^4) per attempt.
# The three events priced there: f is pseudo-periodic at the measured
# offset (probability epsilon, twice over), both samples fall below
# q/log M, and k, l are relatively prime (Lemma 3.1, proof)
# that per-attempt figure is far below 1. Repetition is what boosts it,
# but Lemma 3.1 itself does not say so -- the boosting statement is
# made for the regulator application, where polynomially many
# repetitions in log Delta push correctness exponentially close to 1 (Sec. 3.2, Thm. 2 proof)
# if M is not known in advance: start at M = 2, and each time the answer is
# wrong, double the bound and rerun -- a correct bound is reached, and
# this method then returns correctly, within a number of doublings
# polynomial in log S (Sec. 3.1)
# turning the returned period into a regulator or an ideal's distance is a
# separate construction, not part of this primitive: the application
# builds its own pseudo-periodic f_N on the reals and takes N >= 2*sqrt(Delta)
# to make f_N 1/2-pseudo-periodic with period N*R (Lemma 3.2)
# note that q is NOT re-derived against the discriminant there. Its only
# stated constraint anywhere is step 1's q >= 3*M^2, tied to Delta only
# indirectly, through M as a bound on the period N*R (Sec. 3.1)Lemma 3.1 prices Algorithm 3.1 itself: given an upper bound on the period, it returns an integer within 1 of the period in time polynomial in . That is a per-attempt figure — the success probability recorded above, with the fraction of offsets on which the function is pseudo-periodic, is far below one, so the run has to be repeated. Section 3.2 says what is for Pell's equation: approximating the regulator of the order of discriminant becomes approximating the period of a function , for an integer taken large enough relative to , and polynomially many repetitions in push the probability of correctness exponentially close to 1. Theorem 2 is the proved end-to-end statement: the regulator to within , in time polynomial in and .
None found yet.
Hallgren's later paper calls this a special case of the next method rather than a parallel one: "Solving Pell's equation is a special case of the more general problem of finding the unit group of a number field." The two are kept as separate nodes because the techniques are separably hard rather than nested — the rank-1 construction here does not generalise on its own, and the lattice route needed new machinery for the rounding noise that appears only in higher rank. A reader should hold both facts: mathematically one contains the other, and as algorithms they were solved apart.
Pell's equation by computing the regulator · Qiskit
From the repository — run, not written up from a paper · unsupported
About
Given a positive non-square integer d, Pell's equation is x² − dy² = 1 and the goal is to find all integer solutions. The least solution can have exponentially many bits, so it cannot be written down; the computational problem is instead to compute the integer part of the regulator R = ln(x₁ + y₁√d), from which the solution can be recovered.
Methods
None found yet.
Data
None found yet.
Code
Qiskit
Results
Literature record · problem statement and speedup class checked against the Quantum Algorithm Zoo entry · primary reference checked against its arXiv abs page
The principal ideal problem in a real quadratic field · Qiskit
From the repository — run, not written up from a paper · unsupported
About
Given an invertible ideal I in a real quadratic field, determine whether there exists an α with I = αZ[√d] — that is, whether the ideal is principal — and if there is, find α.
Methods
None found yet.
Data
None found yet.
Code
Qiskit
Results
Literature record · problem statement and speedup class checked against the Quantum Algorithm Zoo entry · primary reference checked against its arXiv abs page
- Pell's equation by computing the regulator
Given a positive non-square integer d, Pell's equation is x² − dy² = 1 and the goal is to find all integer solutions. The least solution can have exponentially many bits, so it cannot be written down; the computational problem is instead to compute the integer part of the regulator R = ln(x₁ + y₁√d), from which the solution can be recovered.
- The principal ideal problem in a real quadratic field
Given an invertible ideal I in a real quadratic field, determine whether there exists an α with I = αZ[√d] — that is, whether the ideal is principal — and if there is, find α.
References
Where the routes meet
11 problems nothing else needs — the places a reader arrives. Open a line to see what is recorded inside it, or click its name to go there.
13 lines have something recorded inside that you have not opened.
Of the routes that have been taken apart, 15 are built entirely from named slots, 15 hand off part of the work and finish the rest themselves, and 20 are one undivided act. None of the three is a defect; they are different things to reuse.
Every line on this figure, in words
The lines on this figure
Solve a nonlinear ODE dy/dt = F(y)
- Embed a nonlinear system into a linear one — opens into 6 · a way across — click it to open it here
- Solve a linear ODE du/dt = A(t)u + b(t) — opens into 9 · a way across — click it to open it here
- Choose a time discretization or propagator approximation → Quantum linear solve — open
- Choose a time discretization or propagator approximation — opens into 6 · a way across — click it to open it here
- Quantum linear solve — opens into 5 · a way across — click it to open it here
- Simulate Hamiltonian evolution → Estimate an observable — open
- Simulate Hamiltonian evolution — opens into 3 · a way across — click it to open it here
- Estimate an observable — opens into 4 · a way across — click it to open it here
Compile a circuit to a specific device
- NISQ transpilation (retargetable pass pipeline) — open · opened: what was inside is drawn in its place
- Satisfy the hardware connectivity constraint — opens into 3 · a way across — click it to open it here
- Fault-tolerant compilation (Clifford+T pipeline) — opens into 2 · a way across — click it to open it here
Estimate an excited-state energy
- Variational quantum deflation — opens into 3 · a way across — click it to open it here
- Subspace-search variational eigensolver — opens into 3 · a way across — click it to open it here
- Quantum subspace expansion
- Quantum equation of motion
- Folded-spectrum variational eigensolver — opens into 3 · a way across — click it to open it here
- Penalty-constrained variational eigensolver — opens into 3 · a way across — click it to open it here
- Multistate contracted variational eigensolver — opens into 3 · a way across — click it to open it here
Every step you can open
1 of these have an object recorded in the middle; the rest open into the methods that fill them.
- Solve a nonlinear ODE dy/dt = F(y)
- Replace a spatial domain with a finite grid
- Discretize a PDE into one linear system
- Embed a nonlinear system into a linear one
- Solve a linear ODE du/dt = A(t)u + b(t)
- Recast a non-Hermitian generator as Hamiltonian evolution
- Choose a time discretization or propagator approximation
- Quantum linear solve
- Matrix function
- QSP phase factors
- Polynomial approximation
- Block-encode a matrix
- Prepare an input state
- Amplify a success branch
- Simulate Hamiltonian evolution
- Estimate an observable
- Compile a circuit to a specific device
- Satisfy the hardware connectivity constraint
- Approximate a continuous rotation in a discrete gate set
- Recover a noiseless expectation value by post-processing
- Build logical qubits at a target logical error rate
- Estimate a Hamiltonian's ground-state energy
- Choose a parameterised trial state
- Minimise the objective over the parameters
- Estimate an excited-state energy
- Measure what the machine can actually do
- Recover the period of a periodic function
- Estimate the eigenphase of a unitary
- Find the item a check accepts
- Walk a graph to the vertex you want
- Search a cost Hamiltonian for the assignment it minimises
What is on this map, counted
What is here, counted
147 nodes — 31 slots and 116 methods.
76 of the 147 link to a record in the Atlas, between them naming 89 records. The rest name papers and nothing else: this graph describes work the catalogue has not got yet, and the nodes with no record are the list of what a corpus pass has to go and read.
0 slots have no method recorded, and 32 methods have not been taken apart. Both are shown as what they are rather than left blank.
Every claim here rests on a source. This graph cites 140 papers; they and the 172 the Atlas cites alone are registered in one place, with what each reports and everywhere it is cited from. Papers