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
Solovay-Kitaev algorithm
Recursively refine an approximation using group commutators, for any finite inverse-closed set that densely generates the group. It is the general-purpose fallback: it works on gate sets with no exploitable algebraic structure.
Open the full recordFills the slot: Approximate a continuous rotation in a discrete gate set
Requires the generating set to be finite, inverse-closed and dense, and gives no optimality guarantee. Kuperberg's result improves the algorithm for a general finite, inverse-closed generating set acting on a qudit, and holds more generally for any finite set densely generating a connected semisimple real Lie group; in the noncompact case an extra length term is needed to reach group elements far from the identity.
A target unitary or channel; a precision ; a metric (operator norm or diamond norm); the gate set; and whether ancillas, measurement or mixing are permitted.
Abstract circuit → Discrete-gate circuitcompile into gates via group commutators
Given a finite instruction set , the algorithm builds a sequence approximating any by recursion on a depth : from an -approximation to , it forms and decomposes it as a balanced group commutator with , then recursively approximates and at depth and returns . approximation: the recursion bottoms out at a fixed lookup-table approximation of accuracy , valid only once , and this construction is proven to satisfy , so the sequence length needed for accuracy grows only as — a bound the paper extends to general qudits using an approximate, not exact, group commutator decomposition whose constants become dimension-dependent. assumption: must be finite, with every gate in , closed under inverse (), and its generated group dense in .
approximationassumption
A gate word, costed in T-count (or non-Clifford count).
None found yet.
given a target unitary U, a finite inverse-closed generating set that
densely generates the group, and a recursion depth n
function approximate(U, n):
if n == 0:
return the nearest element of the precomputed net over the base set
V = approximate(U, n - 1)
D = U V^-1 # what the previous level left to correct
write D as a group commutator D = A B A^-1 B^-1
A' = approximate(A, n - 1)
B' = approximate(B, n - 1)
return A' B' A'^-1 B'^-1 V
return approximate(U, n)
# the general-purpose fallback: it works on gate sets with no exploitable
# algebraic structure, and it gives no optimality guaranteeDawson and Nielsen: the algorithm runs in classical time and produces a sequence of gates guaranteed to approximate the target to accuracy . Kuperberg: word length to approximate an arbitrary target to bits of precision, improving on the prior .
None found yet.
Superseded for the case that dominates practice. For Clifford+T -rotations, number-theoretic synthesis reaches a -count linear in , where the gate-set-generic Solovay-Kitaev bound carries an exponent near 3.97. Solovay-Kitaev survives only where the gate set has no exploitable algebraic structure — and even there Kuperberg has cut the exponent.
sk, Dawson's C++ Solovay-Kitaev library
- The Solovay-Kitaev algorithm
Christopher M. Dawson, Michael A. Nielsen · 2005
About
The paper this method is recorded from is explicitly a teaching document: Dawson and Nielsen "stress that the paper is a review paper, as all the essential ideas appear in previous work", and close by saying the discussion "has been pedagogical, aimed at a formulation that brings out the key ideas, rather than being optimized for accuracy and efficiency". The paper releases nothing and carries no URL; the link to this artefact runs the other way, from the code to the paper, whose README calls itself "a C++ implementation of the Solovay-Kitaev algorithm, a review of which can be found at [quant-ph/0505030]". The code is of the paper's period rather than demonstrably contemporaneous with it: it targets g++ 3.3.5 and MS Visual C++ 7.1, its documentation points at a University of Queensland download under the first author's own page, and its LICENSE reads "Copyright (c) 2005 Chris Dawson" — but that LICENSE was added to the GitHub copy on 2019-08-14, to a repository created on 2017-09-01. The problem it solves is the one the paper poses: given an instruction set for — a finite, inverse-closed, dense set of single-qubit gates — find a sequence drawn from that approximates an arbitrary to accuracy .
Methods
The library implements the preprocessing stage the paper specifies but does not build, and adds an index to it. The paper states the construction and leaves it there: "we assume that a preprocessing stage has been completed which allows us to find a basic -approximation to arbitrary ", accomplished "by enumerating and storing a large number of instruction sequences from , say up to some sufficiently large (but fixed) length , and then providing a lookup routine which, given , returns the closest sequence". The code's `Net` class does exactly that and adds an index: it divides the parameter space into tiles, associates each enumerated sequence with nearby tiles, and answers a lookup for by searching only the sequences in 's own tile. Nets can be generated once, saved to a file and reloaded. `Net::solovay_kitaev(U, n)` then runs the paper's nine-line recursion to depth , returning a `knot` — the instruction word, its length, and the matrix it evaluates to. The documentation is candid about two weaknesses: is parameterised by a 4D unit vector so the tiles are hypercubes in , which the author calls "stupid because the intersection of the unit sphere with these hypercubes varies enormously", making a good tile width hard to choose; and every net point is stored, with no reduction beyond refusing to follow a gate by its inverse or exceed a gate's order, so "the size of the Net's that are generated is enormous".
Data
There is no benchmark corpus. The inputs are a gate set, supplied by the caller as a label-to-matrix dictionary — "a Python dictionary whose keys are the uppercase characters used to label each gate, and the values being a Scipy matrix for the gate" — and, separately, a single target matrix passed to `solovay_kitaev` as its first argument. Two instruction sets ship in `python/sk/common.py`: `ht_net`, the "Hadamard and PI/8 gate set" the paper works with throughout, and `lps_net`, "The very efficient Lubotsky, Phillips and Sarnak set" — the same LPS construction the paper's Section 6 credits for the non-constructive result of Harrow, Recht and Chuang. Inverses need not be listed: "It's not necessary to explicitly include inverses, they will be added for you if necessary. Inverses are labelled with lower case letters." Targets in the shipped examples are drawn at random from .
Code
`sk`, C++, MIT licence, "Copyright (c) 2005 Chris Dawson", at https://github.com/cmdawson/sk — `src/Net.cpp`, `src/su2.cpp` and headers, with `src/example.cpp` as the worked example. A Boost.Python wrapper (`python/wrapper.cpp`, `python/PyNet.h`) exposes a Python package `sk` with modules `net`, `utils` and `common`, whose "wrapper functions around the C++ library allow you to use the scipy matrix type". One Makefile ships, and it invokes g++; the README still describes the 2005 distribution as carrying "Two Makefiles ... one for Linux/g++ the other for Windows/VC++", which the GitHub tree does not contain. A Doxygen configuration (`sk.dox`) does ship. The original distribution was `sk-0.1.tar.gz` with a `sk-0.1_w32.zip` Win32 binary from the author's University of Queensland page; the GitHub copy was created in 2017 and the README frames it as "for historical and pedagogical purposes", pointing readers at later work.
Results
No quantum hardware is involved; the artefact is a classical compiler, and the platforms named are compilers: "The sources have been successfully compiled with g++ 3.3.5 and with MS Visual C++ 7.1." The paper supplies the number that sizes the preprocessing stage, and states it as a measurement: "Numerically we have found that for the single-qubit instruction set consisting of the Hadamard gate, the gate, and its inverse, and is sufficient for practical purposes" — against the analytic requirement that the proof's forces. The library's own documentation puts the same gate set lower, and the two figures do not agree: "A rough number for the HT set is about 14. For the LPS set is it around 6." The paper's criterion is an ; the library's is "getting a decent covering of ". The shipped examples follow the library's figures rather than the paper's — an H/T net at tile width 0.18 to sequence length 14 (C++) and at tile width 0.15 to length 15 (Python) — then call the recursion at depth 5 and depth 3 respectively on a random target and print the accuracy achieved: the C++ example via `su2::proj_trace_dist`, the Python one via `utils.proj_dist`, both sign-minimised distances computed on the matrix entries rather than the operator norm in which the paper defines its . Neither example's output value is recorded anywhere in the repository. On memory, the author reports the nets are large enough that "on my aged laptop de-allocating the memory actually takes a few seconds".
- The Solovay-Kitaev algorithm
Qiskit's SolovayKitaev transpiler pass
- The Solovay-Kitaev algorithm
Christopher M. Dawson, Michael A. Nielsen · 2005
About
Qiskit needed a way to turn a circuit of continuous single-qubit rotations into one over a discrete, fault-tolerantly implementable gate set. The pass was contributed as Qiskit pull request 5657, "Add the Solovay-Kitaev algorithm to the transpiler passes", whose summary reads "Add the Solovay-Kitaev algorithm from https://arxiv.org/abs/quant-ph/0505030 by C. Dawson and M. Nielsen to the transpiler passes"; it was opened 2021-01-20 by GitHub user LNoorl and merged 2022-12-09, shipping in the 0.23 release. Both layers of the current code name this method's citation as their source: the Python class docstring says "This implementation of the Solovay-Kitaev algorithm is based on [2]", where [2] is Dawson and Nielsen 2005, and the Rust core's doc comment says "The code is based mainly on https://arxiv.org/pdf/quant-ph/0505030".
Methods
`SolovayKitaevDecomposition` builds the basic-approximation net once and reuses it — "This generates the basic approximation set once as R-tree and re-uses it for each queried decomposition" — by enumerating combinations of the supplied discrete standard gates up to `depth` (default 12), storing each as an matrix paired with its gate word. The `SolovayKitaev` transformation pass then walks the DAG and replaces every single-qubit node that is non-parameterised and exposes a `to_matrix`; a node failing any of those three tests passes through untouched, under the loop's own comment "ignore operations on which the algorithm cannot run". Each surviving node is replaced by running the recursion to `recursion_degree`, default 5, documented as "The recursion depth for the Solovay-Kitaev algorithm. A larger recursion depth increases the accuracy and length of the decomposition." The same decomposition is also exposed as a unitary-synthesis plugin, `SolovayKitaevSynthesis`, which "is invoked by transpile() when the `unitary_synthesis_method` parameter is set to `"sk"`". Generated nets can be written out with `save_basic_approximations` and loaded back, so the preprocessing is paid once across sessions.
Data
Inputs are circuits handed to the transpiler, not a fixed benchmark suite. The discrete basis is the parameter that matters: it "Defaults to `["h", "t", "tdg"]`", and the class docstring's second worked basis is `["s", "sdg", "t", "tdg", "z", "h"]`. The release note's plugin example passes `["h", "s"]`, which is a different kind of input: and generate the finite single-qubit Clifford group, so they do not densely generate and no recursion depth makes that example converge — it demonstrates how the plugin is wired rather than a convergent decomposition, and it does not satisfy this method's own stated condition that the generating set be dense. All basis gates must be single-qubit and non-parameterised; a multi-qubit entry now "raises a clear ValueError", where previously "such gates could cause an internal Rust panic during synthesis".
Code
Apache-2.0, in the Qiskit repository at https://github.com/Qiskit/qiskit. The transpiler pass and the synthesis plugin are in `qiskit/transpiler/passes/synthesis/solovay_kitaev_synthesis.py`; the decomposition class is in `qiskit/synthesis/discrete_basis/solovay_kitaev.py`. The numerical core is Rust — `crates/synthesis/src/discrete_basis/solovay_kitaev.rs`, with `basic_approximations.rs` and `math.rs` alongside — built on nalgebra and bound through PyO3, so the Python `SolovayKitaevDecomposition` is a wrapper that delegates to `qiskit._accelerate.synthesis.discrete_basis.SolovayKitaevSynthesis`.
Results
No device run: this is a classical transpiler pass, and the runtime named is Qiskit itself, with the recursion executing in the compiled Rust `qiskit._accelerate` extension rather than in Python. The documented worked example takes `RX(0.8)` at `recursion_degree=2` and returns the three-gate sequence `H T H`. Two error figures for it are in circulation, attached to two different global phases. Pull request 5657 as opened showed the word carrying "global phase: -π/8" and "an L2-error of approximately 0.01". The current docstring shows the same word carrying "global phase: 7π/8" — the two labels differ by , not by a multiple of — and its runnable form prints `Error: 2.828408279166474`, computed by the example itself as `np.linalg.norm(Operator(circuit).data - Operator(discretized).data)`, the Frobenius norm of the raw operator difference with no minimisation over the global phase. The docstring retains the pull request's "approximately 0.01" sentence above that output; the 0.01 figure is the pull request's, and this entry does not attach it to the phase the current docstring prints. The release note's larger example transpiles a 3-qubit QFT to `["u", "cx"]` at optimization level 1 and then discretises it with the default H/T/T-dagger basis, printing the resulting gate counts.
- The Solovay-Kitaev algorithm
None found yet.
References
- The Solovay-Kitaev algorithm
Christopher M. Dawson, Michael A. Nielsen · 2005
- Breaking the cubic barrier in the Solovay-Kitaev algorithm
Greg Kuperberg · 2023
Where the routes meet
Every circle is drawn once. This step has no smaller object recorded inside it, so the strands between its two circles are the recorded ways of taking it — one strand per method.
2 recorded ways of doing Approximate a continuous rotation in a discrete gate set. Nothing smaller is recorded inside it, so there is no object in the middle to draw.
Everything on this figure that opens is open.
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
- Every line on this figure is one a recorded source takes.
Open the cardRead the full write-up
Where you are
Path
- Compile a circuit to a specific device
- Approximate a continuous rotation in a discrete gate set
Ways through: 2
Routes that skip it
Narrower kinds
Nothing recorded is a narrower kind of this.
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