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
HHL: eigenvalue inversion by phase estimation
Prepare , run phase estimation against to write eigenvalue estimates into an ancilla register, apply a controlled rotation with amplitude proportional to , uncompute the estimation and post-select on the rotation ancilla. The success amplitude is about , so the procedure is amplified times.
Open the full recordFills the slot: Quantum linear solve
Hermitian (the general case is reduced by dilation), -sparse with efficient entry oracles, with the relevant spectrum in , known or upper-bounded, and preparable in time. Only the well-conditioned part of is inverted; the ill-conditioned part is flagged and discarded. The eigenvalue reciprocal is realised by phase estimation plus a conditional rotation, so no polynomial approximation and no phase sequence are ever computed. The paper's own headline comparison is for the case where a summary statistic is wanted, not itself.
An access model for — sparse row/column entry oracles, or a block-encoding; a unitary preparing ; a known upper bound on the condition number; the normalisation ; and a target state error .
Linear system Ax = b → Solution as a staterotate by the inverse eigenvalue, post-select
The map wanted is the one taking to for a normalising constant ; it is not unitary, so it has some probability of failing. It is realised by adjoining an ancilla qubit and rotating conditioned on , which yields the branch with ; the phase estimation is then undone to uncompute the and the last qubit is measured, and conditioned on seeing the state is proportional to , which is up to normalisation — the normalisation factor being determined from the probability of obtaining . approximation: what is produced is not but a state close to ; only the well-conditioned part is inverted, eigenvectors with eigenvalue are flagged as ill-conditioned without being inverted, and the two behaviours are interpolated for , because no eigenvalue can be resolved exactly. assumption: together with is what leaves the post-selection a success probability of at least ; correctness is guaranteed under and , with supplied as a chosen cutoff.
approximationassumption
A flagged state -close in to . It does not return , any entry of , or any classical functional of — those cost extra and are decided a layer above.
- Prepare an input state runs O(κ) times — once per amplification round
Map to a state whose amplitudes are proportional to a specified vector , to within . The cost is set by which description of you hold, not by the algorithm that consumes it.
The loop stays coherent: nothing is measured between turns. The preparation may still be reapplied every turn — what the loop never pays is a readout and a restart from classical data. The price is depth, and a success probability that multiplies down the chain. The rotation ancilla carries a success amplitude of about 1/κ, so the whole prepare-estimate-rotate-uncompute block is amplified O(κ) times and |b⟩ is prepared afresh inside every one of them. This is where one of the two κ factors in Õ(log(N) s² κ²/ε) comes from, and it is the reason the state-preparation query count is a headline number for this family rather than a footnote: a route whose |b⟩ is expensive pays for it κ times here and once in the all-at-once encodings.
is produced by an efficiently implementable unitary applied to , whose gate count is . and sit inside the amplification iterate , so is prepared afresh in each of the rounds and appears in the run-time as the term . assumption: nothing beyond efficient implementability is assumed of — it may produce "possibly along with garbage in an ancilla register" — and the possibility that errs in producing is neglected, since without another way of producing or verifying there is no way to mitigate those errors, so any error there translates directly into error in the final .
assumption
- Simulate Hamiltonian evolution runs O(κ) times — once per amplification round
Implement to error given some access model for . It is an application in its own right and also the engine inside phase estimation and several linear-system solvers.
The loop stays coherent: nothing is measured between turns. The preparation may still be reapplied every turn — what the loop never pays is a readout and a restart from classical data. The price is depth, and a success probability that multiplies down the chain. Inside the same amplified block as the preparation above: phase estimation runs against e^{-iAt} with t_0 = O(κ/ε), and that whole estimation is repeated by the amplification. The two κ's compose, which is the second factor in Õ(log(N) s² κ²/ε).
The conditional Hamiltonian evolution is applied to and the first register is Fourier transformed, giving , in which is large if and only if . For -sparse and this costs to error , and with the amplification repeats the whole estimation times. approximation: the eigenvalues are replaced by the phase estimates ; phase estimation is "the dominant source of error", erring by in estimating , which translates into a relative error of in , so for taking induces a final error of . assumption: is -sparse and efficiently row computable — at most nonzero entries per row, computable in time given a row index — and this is the only step of the algorithm where sparsity of is required.
approximationassumption
- Amplify a success branch
Take a routine whose output lands in the wanted subspace only with probability , and raise that probability to near 1 using quadratically fewer repetitions than restarting the routine would need.
Measuring the flag register after and obtaining the outcome 'well' has approximately applied an operator proportional to , with success probability ; rather than repeating times, amplitude amplification obtains the same result in repetitions of applied to , where and . Since and the post-selection succeeds with probability at least , so the ideal repetition count is . assumption: is initially unknown, so the entire procedure is repeated with a geometrically increasing number of repetitions — — until a power of two is reached, which yields a constant probability of success using repetitions and therefore needs the cutoff , which is an input to the algorithm.
assumption
Harrow, Hassidim and Lloyd (arXiv:0811.3171) carry no numerical work: no figure, no table, no simulated instance, no simulator and no hardware. The only concrete matrix written down anywhere is assembled in Appendix A 5 out of a quantum circuit to prove matrix inversion BQP-complete — an argument about an instance rather than an instance that was solved. The numerics the register finds belong to Costa et al. and measure the discrete adiabatic walk, which has its own record.
given A Hermitian (the general case reduced by dilation), s-sparse with
efficient entry oracles, ||A|| ~ 1 with the relevant spectrum in
[1/k, 1], k known or upper-bounded, and |b> preparable in poly(log N)
repeat O(k) times, coherently -- the amplification rounds:
prepare |b> # afresh inside every round
run phase estimation against exp(-iAt), writing eigenvalue estimates
into an ancilla register
apply a controlled rotation with amplitude proportional to 1/lambda~
uncompute the phase estimation
post-select on the rotation ancilla
# the success amplitude is about 1/k, which is why there are O(k) rounds --
# and preparing |b> inside each of them is one of the two k factors
# only the well-conditioned part of |b> is inverted; the ill-conditioned
# part is flagged and discarded
# no polynomial approximation and no phase sequence is ever computed: the
# eigenvalue reciprocal is phase estimation plus a conditional rotationHarrow, Hassidim and Lloyd state the runtime as , with the dimension, the sparsity, the condition number and the additive error; the phase-estimation time is set to .
None found yet.
The headline exponential speedup is over a different deliverable. Learning the full solution vector rather than a functional of it takes applications of the preparation unitary and its inverse to obtain an -l2 approximation of a -dimensional pure state (here is the dimension, written above; elsewhere in this group denotes the sparsity) — a characterised complexity, not a loose upper bound — and that linear-in-dimension factor cancels the log-dimension advantage. The is also superseded: later solvers reach .
U_invert with filter functions, inside the amplitude-amplification loop (Appendix A 1)
- Quantum algorithm for solving linear systems of equations
Aram W. Harrow, Avinatan Hassidim, Seth Lloyd · 2008
About
The paper's own full-detail construction, and it says so against the Letter body: "While the body of the paper attempted to convey the spirit of the procedure and left out various improvements, here we take the opposite approach and describe everything, albeit possibly in a less intuitive way." The problem it is built for is stated with its inputs rather than as a theorem: given a procedure producing , a method of producing the at most non-zero elements of any row of , and a choice of cutoff , produce proportional to up to an error that is also part of the input, with correctness guaranteed when and . Error is measured as distance between vectors, , and since ancillas are imperfectly uncomputed the output is compared against with the ancillas suppressed in the notation.
Methods
The subroutine is five steps. Prepare from up to error , in time ; the coefficients are the ones that minimise a quadratic loss appearing in the error analysis, not a uniform superposition. Apply up to error , at cost , which scales better than any power of and is the only step requiring sparsity. Fourier transform the register , writing . Adjoin a three-dimensional register in . Reverse steps 1 to 3, uncomputing any garbage. The filter functions are required only to satisfy for , for , and a continuity property, with ; otherwise they are arbitrary, and Eq. (A3) gives one choice that interpolates by and of the same argument on . The outer loop is amplitude amplification: start from and repeatedly apply with and , measuring and stopping on 'well'. The ideal count is ; because is unknown the whole procedure is rerun with repetitions until a power of two at least is reached, giving constant success probability in at most repetitions.
Data
No dataset, and no instance. The inputs are three objects and two numbers: an efficiently implementable unitary taking to , possibly along with garbage in an ancilla register, costing gates, about which nothing further is assumed — it may be another part of a larger algorithm, or a standard state-preparation procedure — and whose own possible failure is explicitly not modelled, so any error there translates directly into error in ; a row procedure returning the at most non-zero entries of a given row of in time ; the cutoff , which is chosen and need not be the true condition number; the target error ; and the phase-estimation time . The Letter notes that can be prepared by the procedure of Ref. [14] when and are efficiently computable.
Code
None found yet.
Results
Counted, never executed. Theorem 1 bounds the error three ways, all : without post-selection ; post-selecting on the flag register lying in the span of , ; and, when lies entirely in the well-conditioned subspace and the post-selection is on , the same bound, which the paper calls the case of most practical interest. Taking therefore costs of error, and the assembled run-time is , the suppressing , and . No instance is inverted, no simulator or hardware is named anywhere in the paper, and no figure or table appears in it, so this exists as a specified algorithm with proved bounds and not as an executed one.
- Quantum algorithm for solving linear systems of equations
Hermitian dilation for non-Hermitian and non-square A (Appendix A 4)
- Quantum algorithm for solving linear systems of equations
Aram W. Harrow, Avinatan Hassidim, Seth Lloyd · 2008
About
The reduction the rest of the paper assumes has already been applied, and the reason this record's conditions can say "the general case is reduced by dilation". The body states it in one line — if is not Hermitian, define , solve and read — and Appendix A 4 works out what the dilation does to rectangular and rank-deficient problems, which is where it stops being a formality. The Discussion adds that it is what makes non-square matrices invertible by the algorithm at all.
Methods
For with , take the singular value decomposition with , and , and set . Then is Hermitian with eigenvalues on the eigenvectors , together with zero eigenvalues on the orthogonal complement of . The algorithm is run on the input ; writing gives and , and dropping the leading defines the solution.
Data
None. The construction acts on the matrix and the right-hand side as objects, not on any instance of them, and the paper states no dimensions.
Code
None found yet.
Results
Structural rather than numerical, and stated as two cases. Under-constrained, : the algorithm produces no component in , although such components would also have given valid solutions, so "in this sense, it could be said to be finding the that minimizes while solving ". Over-constrained, : with , the equation is satisfiable only if , and any weight of in lands in the zero eigenspace of , where the filter functions flag it as ill-conditioned; choosing to ignore that part returns an satisfying . No cost is quoted separately for the dilation itself.
- Quantum algorithm for solving linear systems of equations
Matrix inversion instances built from a quantum circuit (Appendix A 5)
- Quantum algorithm for solving linear systems of equations
Aram W. Harrow, Avinatan Hassidim, Seth Lloyd · 2008
About
The one place in the paper where a concrete matrix is written down rather than assumed behind an oracle, and it is written down to prove hardness rather than to be solved. The claim it serves is that a quantum circuit on qubits with gates can be simulated by inverting an -sparse of dimension , with if must be positive definite and if not. It is worth having on this card precisely because it is easy to mistake for an instance: it fixes a matrix, a right-hand side, a condition number and a dimension, and it never computes a number.
Methods
Let be a circuit on qubits applying two-qubit gates to , with the answer read from the first qubit. Adjoin an ancilla register of dimension and define , chosen so that for applying to yields . Setting gives and , which is read as applying for a geometrically distributed ; since one may assume , and measuring the first register into the window , which happens with probability , leaves the second register holding . The Hermitian form of Eq. (A34) is , with and dimension . To measure only the first qubit, Eq. (A36) defines , and permuting its rows and columns into gives with the same condition number and .
Data
No dataset and no measured input. The instance is generated from a circuit, so its parameters are functions of that circuit's gate count and qubit count , and they stay symbolic. The single place the paper substitutes anything is in the proof of Theorem 5, where converting Simon's algorithm — a -qubit, -gate computation run times with a classical post-processing — yields and ; these too are formulas in , and no value of is ever fixed.
Code
None found yet.
Results
Nothing was computed; what the instance yields is a set of conditional statements. Theorem 4: a quantum algorithm for matrix inversion running in time for some would give ; no relativizing quantum algorithm can run in that time; and a classical algorithm running in would give . Theorem 5: no relativizing classical matrix inversion algorithm can run in time unless , the bound becoming on positive-definite matrices. Theorem 6, on the matrix inversion estimation problem of outputting a number within of with probability at least : a quantum algorithm in would give , and no relativizing quantum algorithm can run in unless . The paper's own summary is that matrix inversion is BQP-complete, and that even improving the -dependence to would let any time- quantum algorithm be simulated in time . Along the way it records that its own algorithm solves the estimation problem in , by producing to trace distance and taking samples of a bit whose variance is at most .
- Quantum algorithm for solving linear systems of equations
HHL linear-systems reference · Qiskit
From the repository — run, not written up from a paper · native
About
A linear-algebra reference that forces the catalog to show input loading, conditioning, and output observability.
Methods
None found yet.
Data
None found yet.
Code
Qiskit
Results
Algorithm boundary documented · end-to-end application benchmark pending
Hybrid HHL++ for portfolio optimization · Qiskit
From the repository — run, not written up from a paper · unsupported
About
Adapt the Harrow-Hassidim-Lloyd (HHL) quantum linear-systems algorithm, most of whose components current noisy quantum hardware cannot reach, into a form that near-term devices can actually execute, and demonstrate it on an application.
Methods
None found yet.
Data
None found yet.
Code
Qiskit
Results
Literature record · the algorithm a Classiq library entry demonstrates, checked against that algorithm's primary reference on its arXiv abs page
- HHL linear-systems reference
A linear-algebra reference that forces the catalog to show input loading, conditioning, and output observability.
- Hybrid HHL++ for portfolio optimization
Adapt the Harrow-Hassidim-Lloyd (HHL) quantum linear-systems algorithm, most of whose components current noisy quantum hardware cannot reach, into a form that near-term devices can actually execute, and demonstrate it on an application.
References
- Quantum algorithm for solving linear systems of equations
Aram W. Harrow, Avinatan Hassidim, Seth Lloyd · 2008
- Quantum tomography using state-preparation unitaries
Joran van Apeldoorn, Arjan Cornelissen, András Gilyén, Giacomo Nannicini · 2022
- Optimal scaling quantum linear systems solver via discrete adiabatic theorem
Pedro C. S. Costa, Dong An, Yuval R. Sanders, Yuan Su, Ryan Babbush, Dominic W. Berry · 2021
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
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