Module 6: Process Tomography, Randomized Benchmarking, and Gate Set Tomography
Goal
After this module you can reconstruct a qubit channel from tomographic data and make the estimate physical, convert between process fidelity, average gate fidelity and the diamond distance and know when they disagree, derive the randomized-benchmarking decay and read the error rate off it, and explain why gate set tomography can only ever report a gate set up to a gauge transformation.
Module 2 and Module 3 gave us several ways to write down a channel: Kraus operators, the Choi matrix, the Pauli transfer matrix (PTM) and the chi-matrix. This module asks the experimental question. A device implements some gate, and we want to know which channel it really applies. We can prepare states, apply the gate, and measure. How do we turn those counts into a channel, and how do we summarize the answer in one number?
The direct answer is quantum process tomography (QPT): prepare enough input states, do state tomography (Module 4) on each output, and invert a linear map. It works, but it has two weaknesses. Its cost grows like , the number of parameters of a channel. And it trusts the state preparations and measurements it uses as references; if they are faulty, their errors are silently written into the reconstructed gate. These SPAM errors (state preparation and measurement) are often as large as the gate errors we want to measure.
Two protocols answer the second problem in different ways. Randomized benchmarking (RB) gives up on the full channel and estimates a single number, the average error rate, from the decay of a survival probability. Its derivation is the Clifford twirl of Proposition 3.12, as promised in Module 3, and SPAM errors only change the prefactors of the decay, never its rate. Gate set tomography (GST) keeps the full description but treats the preparations, measurements and gates as unknowns on the same footing. The price is a symmetry: a whole family of gate sets, related by a similarity transformation called a gauge, predicts exactly the same data, and only gauge-invariant quantities are physical.
Standard process tomography
How many numbers must we learn? A channel on is fixed by its Choi matrix , a Hermitian matrix (Definition 2.8).
Proposition 6.1 (Parameter count of a channel).
The completely positive trace-preserving (CPTP) maps on form a convex set of real dimension . For one qubit this is ; for two qubits, .
Proof
By Theorem 2.9 and Proposition 2.10, identifies the channels with the matrices satisfying and . Hermitian matrices form a real vector space of dimension . The condition is a set of independent real linear equations (one for each real coordinate of the Hermitian matrix ), so it cuts out an affine subspace of dimension . The positivity constraint is an inequality: it does not lower the dimension, because (the completely depolarizing channel) satisfies it strictly and so has a full-dimensional neighbourhood of channels.
The protocol. Choose input states whose Pauli vectors span , so ; collect them as the columns of a matrix . For each input, apply the channel and estimate the Pauli vector of the output by state tomography. By Definition 3.1 and the Pauli expansion of , , so with the outputs as columns of ,
Since has rank , this linear system determines . The pattern is the one of state tomography in Module 1 (Definition 1.4): informational completeness means the probes span the space, and reconstruction means inverting a known linear map.
Proposition 6.2 (Linear-inversion process tomography).
Let be estimates of the output Pauli vectors. The least-squares estimate is with , and when . If is unbiased, so is , and has first row whenever for every input. For one qubit with inputs , whose Pauli vectors are , and , the columns of are
Proof
The objective splits into independent ordinary least-squares problems for the rows of (with the -th row of ). Since is invertible, each has the unique solution , which is , and for square . Unbiasedness follows from linearity: . If every column of has first entry , the first row of is the first row of (all ones), so the first row of is . For the qubit formulas, and have Pauli vectors , so adding and subtracting their outputs gives and ; and , have Pauli vectors and .
For one qubit the standard experiment uses these four inputs and measures each output in the , and bases, settings. Each setting estimates one output expectation value as , where counts the outcomes in shots, and turns the twelve estimates into . On qubits the product version uses product inputs and product bases, settings in total. This is the scheme of Chuang and Nielsen (1) and of Poyatos, Cirac and Zoller (2), who phrased the output as the chi-matrix; by Proposition 3.7 the chi-matrix, the Choi matrix and the PTM are fixed linear transforms of each other, so the estimator is the same.
The snippet runs this experiment for the gate we use throughout the module: a rotation about , over-rotated by and followed by amplitude damping with .
import numpy as npI2, X = np.eye(2, dtype=complex), np.array([[0, 1], [1, 0]], dtype=complex)Y, Z = np.array([[0, -1j], [1j, 0]]), np.diag([1.0, -1.0]).astype(complex)P = [I2, X, Y, Z]def ptm(kraus): # R_ab = tr[P_a E(P_b)] / 2 E = lambda A: sum(K @ A @ K.conj().T for K in kraus) return np.array([[np.trace(Pa @ E(Pb)).real / 2 for Pb in P] for Pa in P])rx = lambda t: np.cos(t / 2) * I2 - 1j * np.sin(t / 2) * Xgam, dl = 0.05, 0.05 # damping probability, over-rotationamp = [np.diag([1, np.sqrt(1 - gam)]), np.sqrt(gam) * np.array([[0, 1], [0, 0]])]noise = [A @ rx(dl) for A in amp] # Kraus operators of the noiseR = ptm([K @ rx(np.pi / 2) for K in noise]) # noisy pi/2 X-rotationRU = ptm([rx(np.pi / 2)]) # its targetS = np.array([[1, 1, 1, 1], [0, 0, 1, 0], [0, 0, 0, 1], [1, -1, 0, 0]])pplus = (1 + (R @ S)[1:].T) / 2 # P(+1): rows |0>,|1>,|+>,|+i>; cols X,Y,ZN, rng = 2000, np.random.default_rng(7)counts = rng.binomial(N, pplus) # 12 settings, N shots eachX_hat = np.vstack([np.ones(4), (2 * counts / N - 1).T])R_hat = X_hat @ np.linalg.inv(S) # linear inversionprint(round(np.abs(R_hat - R).max(), 4)) # 0.0178print(round(np.trace(RU.T @ R) / 4, 4), round(np.trace(RU.T @ R_hat) / 4, 4)) # 0.9742 0.9694
The last line prints the process fidelity with the target, defined below, for the true and for the estimated channel.
Ancilla-assisted process tomography. The Choi matrix suggests a second scheme that needs a single input. Prepare the maximally entangled state on a reference system and the system, send only the system through , and do state tomography of the joint output. By Definition 2.8 that output is the Choi state, a density operator on (Proposition 2.10). One state tomography in dimension replaces tomographies in dimension . The scheme was proposed by D’Ariano and Lo Presti (3) and by Leung (4), and demonstrated with photons by Altepeter et al. (5). The Pauli expectation values of the Choi state are the PTM entries, up to a sign from the transpose.
Proposition 6.3 (The Choi state's Pauli expectations are the PTM).
For any linear map on qubits and Pauli strings ,
Since (a minus sign for each factor), measuring all Pauli strings on the Choi state is the same as measuring all PTM entries.
Proof
For any , using ,
With and this is by Definition 3.1. Each single-qubit Pauli is real symmetric except , which is imaginary antisymmetric, so .
vec = lambda A: A.reshape(-1, order="F") # column stackinggate = [K @ rx(np.pi / 2) for K in noise]J = sum(np.outer(vec(K), vec(K).conj()) for K in gate) # Choi matrix, trace 2def ptm_of_choi(J): # R_ba = tr[(P_a^T x P_b) J] / 2 return np.array([[np.trace(np.kron(Pa.T, Pb) @ J).real / 2 for Pa in P] for Pb in P])v = vec(rx(np.pi / 2))print(np.allclose(ptm_of_choi(J), R), round(np.trace(J).real, 6)) # True 2.0print(round((v.conj() @ J @ v).real / 4, 4)) # process fidelity 0.9742
Figure 6.1 compares the two schemes. Ancilla-assisted QPT needs a clean ancilla and a good entangling preparation; in exchange the input side is a single fixed state. Mohseni, Rezakhani and Lidar (6) compare these and other strategies by the number of experimental settings and the resources they need.
standard QPT: d^2 inputs, one tomography per inputinput statesrho_1 .. rho_KchannelEoutput tomographyY = R Slinear inversionR = Y S^-1ancilla-assisted QPT: one entangled input, one tomographyentangled pairOmega / sqrt(d)reference (idle)Ejoint tomographyChoi state J/dPauli expectationsR_hat from J_hatFigure 6.1. Standard and ancilla-assisted process tomography. Both end in the same object, an estimate of the PTM (equivalently of the Choi matrix), and both trust their reference states and measurements.
Making the estimate physical, and what it costs
Is the linear-inversion estimate a channel? Not in general. Finite statistics add a noise matrix to that knows nothing about complete positivity, and the gates we care about are close to unitary, whose Choi matrices have rank one and sit on the boundary of the positive cone. A small perturbation then pushes eigenvalues of below zero. In the snippet above, the estimate has a negative eigenvalue.
The fix is the one used for states in Module 4: replace by the nearest physical object. We project in Frobenius norm onto the CPTP set , which is the intersection of two convex sets with easy projections:
CP: the nearest positive semidefinite matrix to a Hermitian is .
TP: the nearest matrix with is . The correction is orthogonal to every with , because .
Alternating the two projections finds a point in the intersection, but not necessarily the nearest one. Dykstra’s algorithm adds a correction term per set and converges to the Frobenius-nearest point of the intersection; Knee et al. (7) use it for exactly this purpose. Our snippet runs 500 Dykstra rounds, takes the PSD projection of the result, and then removes the tiny remaining violation of trace preservation by the congruence with . Congruence keeps and gives exactly, so the output is exactly CPTP and, up to the last tiny step, the Frobenius projection.
J_hat = sum(R_hat[a, b] * np.kron(P[b].T, P[a]) for a in range(4) for b in range(4)) / 2 # Choi of R_hatdef psd(A): # nearest PSD matrix (Frobenius) w, V = np.linalg.eigh((A + A.conj().T) / 2) return (V * np.clip(w, 0, None)) @ V.conj().Ttr_out = lambda A: np.trace(A.reshape(2, 2, 2, 2), axis1=1, axis2=3)tp = lambda A: A - np.kron(tr_out(A) - I2, I2 / 2) # projection onto TP setx, p, q = J_hat, 0 * J_hat, 0 * J_hatfor _ in range(500): # Dykstra: alternate PSD and TP y = psd(x + p) p = x + p - y x_new = tp(y + q) q, x = y + q - x_new, x_neww, V = np.linalg.eigh(tr_out(psd(x))) # exact TP fix: T^(-1/2) congruenceA = np.kron(V @ np.diag(w ** -0.5) @ V.conj().T, I2)J_cp = A @ psd(x) @ A.conj().Tprint(np.round(np.linalg.eigvalsh(J_hat), 4)) # [-0.0109 0.006 0.0638 1.9411]print(np.linalg.eigvalsh(J_cp).min() > -1e-12, np.allclose(tr_out(J_cp), I2))print(round(np.trace(RU.T @ ptm_of_choi(J_cp)) / 4, 4)) # 0.9672
The first line uses the inverse of , , and the middle line prints True True. A statistically more principled alternative is maximum likelihood: maximize the likelihood of the observed counts over CPTP maps, as for states (8); Ježek, Fiurášek and Hradil (9) give an iterative algorithm for processes. Surawy-Stepney et al. (10) analyse the projected least-squares estimator for processes and give explicit error bounds.
How many channel uses? Each of the parameters is an expectation value that costs about shots to learn to (Theorem 1.14), so even entry by entry the budget grows like . The natural accuracy measure for a channel, the diamond distance defined below, costs more, and the conversion goes through the Choi matrix.
Lemma 6.4 (Diamond norm and Choi matrix).
For a Hermiticity-preserving linear map on , with over density operators on ,
Proof
The lower bound is the input , whose output is . For the upper bound, the trace norm is convex, so the maximum is attained on a pure input . Let be the matrix with entries ; then and . Since acts on the reference factor, it commutes with , and . Hence its trace norm is at most . That pure inputs on suffice for the diamond norm of a Hermiticity-preserving map is shown in Chapter 3 of Watrous (11).
Applied to , the lemma says that an estimate of the Choi state to trace distance gives the channel to diamond distance . With entangled measurements on many copies of the Choi state, which is a state of dimension , that takes of order copies by the state-tomography bounds of O’Donnell and Wright (12) and Haah et al. (13). Read this as a heuristic upper bound, not as the optimal rate: conversions through the Choi matrix lose factors of , and the true sample complexity depends on the access model (Module 1, Definition 1.17). For unitary channels the optimal number of uses scales as (14). Either way the cost grows like a high power of , so full QPT is limited to two or three qubits, and larger systems need structure, as in Module 12, or property prediction instead of reconstruction (15).
How good is a gate? Fidelities and the diamond norm
Given a noisy gate and its target unitary , which single number should we quote? Three are in common use. Write and .
Definition 6.5 (Process fidelity, average gate fidelity, diamond distance).
Let be a channel on and a unitary.
The process fidelity (entanglement fidelity) is , the fidelity between the Choi states of and .
The average gate fidelity is , the average over Haar-random pure inputs of the output fidelity with the ideal output.
The diamond distance has an operational meaning: is the best probability of telling from in one use, with an entangled probe allowed (Chapter 3 of Watrous (11)). Diamond distances also add up along a circuit, which is why fault-tolerance thresholds are stated in it (16). The fidelities are easier to compute and to measure. Gilchrist, Langford and Nielsen (17) compare these and other measures.
Proposition 6.6 (Formulas for the process fidelity).
For a channel with Kraus operators , Choi matrix and PTM , and a unitary ,
For this is , the no-error probability of the Pauli twirl of (Theorem 3.11).
Proof
The map has Kraus operators and Choi matrix . Using and ,
and . For the PTM form, first take . The identity holds for because (Lemma 3.8), hence for all by linearity. Then
The average gate fidelity looks harder, an integral over all pure states, but it is a function of the process fidelity alone. The result goes back to Horodecki, Horodecki and Horodecki (18) and Nielsen (19).
Theorem 6.7 (Average gate fidelity from process fidelity).
For every channel on and unitary ,
The Haar average may be replaced by the average over any state 2-design, for example the six Pauli eigenstates of a qubit.
Proof
Replace by , which leaves both sides unchanged, so that . With Kraus operators ,
The Haar second moment is : the integral commutes with every and is supported on the symmetric subspace, so by Schur’s lemma it is the normalized projector onto that subspace (Chapter 7 of Watrous (11)). Since ,
using Proposition 6.6 and . Only the second moment of the input distribution entered, which is the definition of a state 2-design. The six Pauli eigenstates are the orbit of under the single-qubit Clifford group, a unitary 2-design (20), so they form a state 2-design.
Intuition: an average over inputs is an entanglement fidelity in disguise
The maximally entangled input feeds the channel “all inputs at once”: its reduced state is , the average of over any state 1-design (in particular any 2-design). The process fidelity is the overlap with the ideal output for that single input. The average gate fidelity is larger, because even an error with process fidelity zero leaves some pure inputs untouched: a Pauli error on a qubit flips but fixes , and its output fidelity averages to , the constant term in . The two infidelities differ only by the factor , which is for a qubit.
s = 1 / np.sqrt(2) # the six Pauli eigenstates: a 2-designkets = [np.array(k) for k in ([1, 0], [0, 1], [s, s], [s, -s], [s, 1j * s], [s, -1j * s])]def out_fid(psi): # <psi| U^dag E(psi) U |psi> out = sum(K @ np.outer(psi, psi.conj()) @ K.conj().T for K in gate) phi = rx(np.pi / 2) @ psi return (phi.conj() @ out @ phi).realrng = np.random.default_rng(1) # Haar-random kets: normalized Gaussianshaar = rng.normal(size=(20000, 2)) + 1j * rng.normal(size=(20000, 2))haar /= np.linalg.norm(haar, axis=1, keepdims=True)F_pro = np.trace(RU.T @ R) / 4print(round((2 * F_pro + 1) / 3, 4)) # formula 0.9828print(round(np.mean([out_fid(k) for k in kets]), 4)) # 2-design 0.9828print(round(np.mean([out_fid(k) for k in haar]), 4)) # Haar sample 0.9828
How do these fidelities relate to the diamond distance? The answer depends on the kind of error.
Proposition 6.8 (Infidelity versus diamond distance).
Let be a channel on and a unitary.
.
If with a Pauli channel, then , the total error probability.
.
The upper bound follows from Lemma 6.4; see also Wallman and Flammia (21). For the coherent error with and target , while , so the diamond distance is the square root of the infidelity.
Proof
(1) Feed in . The outputs are the Choi states and with , and the second is pure. For any state and pure , the trace distance is at least , since for traceless Hermitian . With this is , and the diamond distance is a maximum over inputs.
(2) Composing with a unitary channel does not change the diamond distance, so take . Then with , and each is a difference of two channels, so . The triangle inequality gives , and by Theorem 3.9 and Proposition 6.6. Part 1 gives the reverse inequality.
(3) Apply Lemma 6.4 to the Hermiticity-preserving map , whose Choi matrix is :
The last step is the Fuchs–van de Graaf inequality (Proposition 1.11, squared fidelity). It applies with because is pure, so the fidelity of the two Choi states is as in part 1. The equality is . For the rotation example, by . The diamond distance between two unitary channels is , where is the distance from to the convex hull of the eigenvalues of (Chapter 3 of Watrous (11)); here the eigenvalues are , the hull is a chord at distance from , and .
A small infidelity can hide a large worst-case error
Stochastic (Pauli) errors sit on the lower bound: their diamond distance equals their infidelity. Coherent errors follow the square-root scaling of the upper bound (a factor below it for a qubit rotation): an infidelity of from a small rotation means a diamond distance of . Because coherent errors add in amplitude over a circuit (Module 3, Theorem 3.11 and its intuition box), the diamond distance is the honest measure for them. Randomized compiling (22) turns them into Pauli errors and so moves a gate onto the lower bound.
Figure 6.2. Diamond distance against process infidelity for one qubit. Pauli noise lies on the lower bound (blue), a coherent Z-rotation follows the square root of the infidelity, a factor d = 2 below the upper bound (red line; circles are exact diamond distances of rotations), and every channel lies in the shaded band below the upper bound of Wallman and Flammia. At an infidelity of 0.0001 the two kinds of error differ by a factor of 100 in diamond distance.
SPAM errors and the identification problem
What happens to QPT if the reference states and measurements are themselves faulty? Suppose the device prepares instead of , with Pauli vectors collected in , and suppose its measurement of is the ideal one preceded by an unknown channel (any readout error that does not depend on the input can be written this way to first approximation). The data then estimate
Linear inversion still uses the ideal , so the reconstruction is not but a product of three factors. Even a perfect gate, , is reported as , an imperfect channel. A typical calibration error of in state preparation therefore puts an error floor of order on QPT, far above the gate errors of that good hardware has.
Can a cleverer analysis separate the three factors? Not from these data. Equation depends on only through the product, and many triples give the same product. This is the identification problem: from the probabilities of “prepare, apply gate, measure” alone, gate errors and SPAM errors cannot be told apart. Two ways out are taken below. RB designs an experiment in which SPAM only affects nuisance parameters. GST adds circuits with many gates, so that the same unknown gate appears several times in one circuit; this removes most of the ambiguity, but a residual symmetry, the gauge, always remains.
Randomized benchmarking
Can we estimate gate quality in a way that is insensitive to SPAM, and cheap? Randomized benchmarking applies long random sequences of Clifford gates that multiply to the identity, and records how the probability of returning to the initial state decays with the sequence length. It was proposed with random unitaries (23), made practical with Pauli-randomized Clifford gates (24), and given its standard Clifford-group form and analysis by Magesan et al. (25).
Fix a sequence length . Draw Cliffords independently and uniformly from , and let be the inverting Clifford. Prepare (ideally ), apply , and measure the two-outcome POVM (ideally ). The survival probability is the probability of outcome , averaged over the random sequence. Repeat for several lengths and fit .
We analyse the protocol under the simplest noise model: gate-independent Markovian noise. Each Clifford is implemented as with and the same channel for every and every time step. The preparation and the effect may be arbitrary and unknown.
Theorem 6.10 (The randomized-benchmarking decay).
Under gate-independent noise , the survival probability is
The decay parameter is the mean of the non-identity Pauli fidelities and does not depend on or . (RB papers usually call it ; we keep for probabilities.)
Proof
Let for , with channels , and . Then and , so the noisy sequence regroups as
The map is a bijection of , so the are again independent and uniform. The expectation of a composition of independent random channels is the composition of their expectations (expand in a basis; each matrix entry of the product is multilinear in the factors). The expectation of each bracket is the Clifford twirl of , which by Proposition 3.12 is the depolarizing channel with PTM and as in . Its -th power fixes and multiplies every traceless operator by . Writing with the second term traceless, the averaged final state is , and taking gives . Finally, because for a TP map.
Corollary 6.11 (RB measures the average gate infidelity).
Under gate-independent noise, every Clifford has the same average gate infidelity with its target,
The random Cliffords scramble the noise in every direction of operator space except the identity. After the twirl, all that is left of the noise is one shrinking factor per gate, applied to the traceless part of the state. Preparation errors change how much traceless part there is at the start, readout errors change how well we see it at the end, and the last noise channel is absorbed into the readout. All three only rescale the curve () and shift its floor (). The rate at which the curve decays counts gates, and gates are what we want to measure. Long sequences also amplify small per-gate errors into large, easily measured changes in survival probability.
For a qubit the single-qubit Clifford group has elements modulo phases. The snippet generates it from and by breadth-first search, twirls the noise of our running example, and checks : all three non-identity diagonal entries become the mean Pauli fidelity .
H = np.array([[1, 1], [1, -1]]) / np.sqrt(2)Sg = np.diag([1, 1j])def canon(U): # remove the global phase k = np.argmax(np.abs(U.reshape(-1)) > 1e-9) return U * np.exp(-1j * np.angle(U.reshape(-1)[k]))cliff, front = [I2], [I2]while front: # breadth-first search over H, S words new = [] for U in front: for G in (H, Sg): V = canon(G @ U) if not any(np.allclose(V, W) for W in cliff): cliff.append(V) new.append(V) front = newRC = [ptm([C]) for C in cliff]RL = ptm(noise) # PTM of the noise after every gatetwirl = sum(Rc.T @ RL @ Rc for Rc in RC) / len(RC)f = (np.trace(RL) - 1) / 3 # mean non-identity Pauli fidelityprint(len(cliff), np.round(np.diag(twirl), 4), round(f, 4))# 24 [1. 0.9657 0.9657 0.9657] 0.9657
Now the experiment itself, with SPAM errors: the preparation of is flipped with probability and the readout with probability . For each of eight lengths we draw random sequences, simulate shots of each, and fit by least squares (a grid over , with and by linear regression for each ).
rho = np.array([1, 0, 0, 0.96]) # Pauli vector of a 2%-flipped |0>e = np.array([1, 0, 0, 0.94]) # effect "0" with a 3% readout fliplengths, K, shots = [1, 10, 25, 50, 75, 100, 150, 200], 50, 500rng = np.random.default_rng(0)surv = []for m in lengths: freq = [] for _ in range(K): # K random sequences of length m x, ideal = rho.copy(), np.eye(4) for i in rng.integers(24, size=m): x, ideal = RL @ RC[i] @ x, RC[i] @ ideal x = RL @ ideal.T @ x # noisy inverse Clifford freq.append(rng.binomial(shots, np.clip(e @ x / 2, 0, 1)) / shots) surv.append(np.mean(freq))m, y = np.array(lengths), np.array(surv)fs = np.linspace(0.9, 1, 100001)[:-1] # grid over f; (A, B) by least squaresV = fs[:, None] ** mVc, yc = V - V.mean(1, keepdims=True), y - y.mean()A = Vc @ yc / (Vc ** 2).sum(1)B = y.mean() - A * V.mean(1)k = np.argmin(((A[:, None] * V + B[:, None] - y) ** 2).sum(1))print(round(fs[k], 4), round(A[k], 3), round(B[k], 3)) # 0.9666 0.421 0.523print(round((1 - fs[k]) / 2, 4), round((1 - f) / 2, 4)) # 0.0167 0.0172
The inverse Clifford is applied through its PTM, the transpose of the PTM of the product (Proposition 3.5). The fitted rate is within of the true , despite SPAM errors larger than the gate error; the remaining discrepancy is sampling error from the finite number of sequences and shots, whose size Wallman and Flammia (21) bound. Figure 6.3 shows the data, the fit, and the link to the Pauli fidelities of the noise.
Figure 6.3. Randomized benchmarking of the running example. Left: mean survival probability over 50 random Clifford sequences per length (dots), the fitted decay, and the exact sequence average from the theorem (dotted); the curve decays to B = 0.5235, not to 1/2. The offset from 1/2 comes from the non-unital amplitude damping (with perfect readout B would be 0.525); the symmetric readout flip only scales the offset by 0.94. Right: the three Pauli fidelities of the noise are different, but RB only sees their mean f (solid line); the RB estimate (dashed) is close to it.
Interleaved RB. To benchmark one specific Clifford rather than the average, Magesan et al. (26) interleave after every random Clifford and compare the decay of the interleaved sequence with the reference decay . If the noise of is , the interleaved decay is that of the twirl of , and the ratio estimates the decay parameter of alone, giving in analogy with . The estimate is exact only when the noise is depolarizing; in general it comes with systematic error bounds.
What RB does not tell us. The derivation assumed the same noise on every Clifford. Real noise depends on the gate. Proctor et al. (27) showed that with gate-dependent noise the RB rate need not equal the average gate infidelity of the gates as defined above, which is itself not a gauge-invariant quantity (see the next section). Wallman (28) proved that the decay is still exponential to good approximation and identified the rate with the infidelity of the gates in a suitably chosen gauge. Helsen et al. (29) give a general framework that covers many RB variants. RB also says nothing about the structure of the error, coherent or stochastic, so by Proposition 6.8 it does not bound the diamond distance well.
Gate set tomography
Can we recover full channels without trusting any reference? Gate set tomography (30–33) treats the preparation, the measurement and all gates as unknowns, and fits them jointly to the outcomes of many circuits. It is convenient to work entirely with Pauli vectors and PTMs. For a state and an effect write and for their Pauli vectors, and ; then the Pauli expansion gives .
Definition 6.12 (Gate set).
A gate set is a triple consisting of the Pauli vector of the prepared state, the Pauli vector of the measured effect, and the PTMs of gates. The probability of the circuit that prepares, applies in this order, and measures, is
All data of GST are probabilities of this form, which brings a symmetry with it.
Theorem 6.13 (Gauge freedom).
For every invertible real matrix , the gate set
predicts the same probability as for every circuit: . If the first row of is , then again has a normalized state () and trace-preserving gates.
Proof
In every inner factor cancels:
If , then . Trace preservation means (Proposition 3.2); implies , so .
Intuition: a change of reference frame nobody can detect
Think of as an invisible change of coordinates applied right after preparation and undone right before measurement. Every gate is re-expressed in the new coordinates. Since experiments only ever compare a preparation with a measurement through a string of gates, the coordinates never show. A special case is a unitary change of frame: rotating the whole lab about the axis changes what we call "" and "", which no experiment that only uses the gate set can detect. In general need not even map CPTP gate sets to CPTP gate sets, which is why GST software fixes the gauge by an optimization that keeps the estimate physical and close to the target.
Proposition 6.14 (What is gauge invariant).
Under :
all circuit probabilities are invariant;
the characteristic polynomial, hence the eigenvalues, of every gate and of every product of gates is invariant;
the process fidelity with a target, the average gate fidelity and the diamond distance are not invariant in general.
Proof
(1) is Theorem 6.13. (2) , and a product of transformed gates is the transformed product. (3) A counterexample suffices; the snippet below gives one, and Problem 6.3 gives an exact one in which a perfect gate set is gauge-equivalent to one with infidelity .
So the familiar fidelity numbers are only defined after a gauge has been chosen, and the choice is a convention. Reported GST error rates are computed after “gauge optimization”: among all gate sets equivalent to the estimate, choose the one closest to the target. The eigenvalues of the gates, by contrast, are physical: for example, the decay rates and rotation angles of a gate repeated many times are fixed by its spectrum.
ry = lambda t: np.cos(t / 2) * I2 - 1j * np.sin(t / 2) * Ygates = [R, ptm([K @ ry(np.pi / 2) for K in noise])] # G_x, G_ydef run(G, word, x): # apply G_k for k in word, left to right for k in word: x = G[k] @ x return xprob = lambda x, e, G, word: e @ run(G, word, x) / 2 # (1/d) e^T ... xrng = np.random.default_rng(5)Q = np.eye(4)Q[1:] += 0.1 * rng.normal(size=(3, 4)) # random gauge; keeps the first rowQi = np.linalg.inv(Q)rho2, e2, gates2 = Q @ rho, e @ Qi, [Q @ G @ Qi for G in gates]word = list(rng.integers(2, size=12))print(round(prob(rho, e, gates, word), 6), round(prob(rho2, e2, gates2, word), 6)) # 0.508751 0.508751print(np.allclose(np.poly(gates[0]), np.poly(gates2[0]))) # True: same spectrumfpro_x = lambda G: round(np.trace(RU.T @ G) / 4, 4) # F_pro with R_x(pi/2)print(fpro_x(gates[0]), fpro_x(gates2[0])) # 0.9742 0.9809
In the new gauge the noisy gate reports process fidelity instead of the of the simulated gauge, while no experiment could tell the two gate sets apart.
Linear GST. How can we estimate a gate set at all, if no reference is trusted? Choose a few short gate sequences called fiducials, for preparation and for measurement, such that the vectors and each span (here and also denote the PTM products of the sequences). For a qubit, the sequences turn into states close to , which span.
Proposition 6.15 (Linear gate set tomography).
Let and be the probabilities of the circuits “fiducial , (gate ), fiducial ”, and let be the matrix with columns . Then is invertible and
So the measured matrices determine every gate up to one common, unknown gauge transformation with . With and , the vectors and complete the gate set in the same gauge.
Proof
Let be the matrix with rows . By , and . Both and are invertible by the spanning assumption, so . Similarly gives , and gives . These three are of with .
No reference state or measurement was assumed known; only that the fiducials are informationally complete. This is the self-consistency that QPT lacks, and it is why the outcome of GST is a gauge equivalence class. The idea goes back to Merkel et al. (30) and Blume-Kohout et al. (31). In the snippet we use exact probabilities, and pick a gauge by mapping the estimated fiducial states back to their ideal versions, a crude form of gauge optimization.
fid = [[], [0], [1], [0, 0]] # fiducials: none, G_x, G_y, G_x G_xg = np.array([[prob(rho, e, gates, a + b) for a in fid] for b in fid])Gt = np.array([[prob(rho, e, gates, a + [0] + b) for a in fid] for b in fid])Gx_lin = np.linalg.solve(g, Gt) # = F^{-1} G_x F, F unknownprint(np.allclose(np.poly(Gx_lin), np.poly(gates[0]))) # Trueideal = [RU, ptm([ry(np.pi / 2)])]F0 = np.column_stack([run(ideal, a, np.array([1, 0, 0, 1.0])) for a in fid])Gx_fix = F0 @ Gx_lin @ np.linalg.inv(F0) # gauge chosen by ideal fiducialsprint(fpro_x(Gx_lin), fpro_x(Gx_fix), fpro_x(gates[0])) # -0.0033 0.9752 0.9742
In the raw gauge of the estimated gate has a meaningless “process fidelity” of ; after mapping the fiducials back it is , close to but not equal to the value in the gauge we happened to simulate in.
Counting parameters. A qubit gate set with one state, one two-outcome measurement and two TP gates has parameters. The trace-preserving gauge transformations (first row of fixed) have , so for a generic gate set only combinations are identifiable.
Long-sequence GST. Linear GST inherits the shot-noise precision of each probability. The full protocol, described by Nielsen et al. (33), adds germs: short sequences that are repeated times, for , between fiducials. A small coherent error in a germ is amplified to about in the repeated sequence, so with sequence lengths up to and shots per circuit the uncertainty on such parameters falls like instead of , a Heisenberg-like scaling in . The germs are chosen so that every gauge-invariant parameter is amplified by some germ. The estimate is then fitted by maximum likelihood over gate sets, which is a non-convex problem solved by starting from the linear-GST estimate. The price is many circuits and a heavy fit, which is why GST is used on one or two qubits.
Worked example: tomography and benchmarking of a noisy rotation
Every number below is checked in code/tests/test_06_qpt.py, which uses code/qlt/process_tomography.py.
Example 6.16 (Process tomography of a damped, over-rotated gate).
The gate. The target is . The device applies with noise : an over-rotation by followed by amplitude damping with . Multiplying the PTMs of Example 3.4 and Proposition 3.5,
Tomography. With shots per setting (seed in the first snippet), linear inversion gives
Its largest entry error is . The standard deviation of one estimated expectation value is at most , and the entries of are combinations of two or three of them (by ), so errors of this size are expected. Its Choi matrix has eigenvalues : one negative, so is not a channel, while the true Choi matrix has rank (two Kraus operators). The process fidelity of is .
CPTP projection. After the projection the eigenvalues are and the process fidelity is . The projection made the estimate physical and reduced its Frobenius error from to (Figure 6.4), but it did not remove the statistical error, which is of the order of the infidelity itself. Measuring a process infidelity () to a few tenths of a percent needs many more shots.
Example 6.17 (Randomized benchmarking of the same noise).
Suppose every single-qubit Clifford is followed by the same noise . Its Pauli fidelities are the diagonal of : , , . By Theorem 6.10 the decay parameter is their mean, , and by Corollary 6.11, , equal to the average gate infidelity of the previous example, as it must be.
With preparation and readout flip probabilities and , the Pauli vectors are and , and gives and . The simulated experiment (50 sequences of each length, 500 shots each) fits , , , hence . SPAM errors of – moved and but not the rate.
The worked examples show the complementary strengths of the two methods. QPT returned a full matrix, including the non-unital entry and the coherent entries near , but with errors of order per entry and an implicit trust in SPAM. RB returned one number, insensitive to SPAM, and nothing about where the error comes from.
Figure 6.4. Qubit process tomography of the worked example with 2000 shots per setting. Left: the true PTM. Middle: entrywise error of the linear-inversion estimate. Right: error after the CPTP projection. The first row is exact by construction (trace preservation); the remaining errors are about 0.01 and are not removed by the projection, which only enforces physicality.
What breaks
SPAM in QPT. Standard and ancilla-assisted QPT reconstruct , not (). They cannot certify errors smaller than the SPAM errors.
Exponential cost. QPT needs settings and a number of shots growing like a high power of ; beyond two or three qubits one must assume structure (Pauli noise, locality) or predict properties instead.
Gate-dependent and non-Markovian noise. The RB theorem assumes one fixed noise channel for every Clifford. With gate-dependent noise the decay is still nearly exponential, but its rate is tied to a gauge-dependent notion of infidelity (27,28). Drift, leakage out of the qubit subspace and correlated noise in time can make the decay non-exponential, and then a fit of is meaningless. GST makes the same Markovian assumption: every gate is one fixed CPTP map.
Fidelity is not worst-case error. RB and fidelity estimates bound the diamond distance only up to a square root (Proposition 6.8); coherent errors can hide behind a small .
Gauge. Individual GST gate matrices and their fidelities depend on an arbitrary gauge choice. Only gauge-invariant quantities, such as circuit probabilities and gate spectra, are physical.
Finite sampling. RB uses finitely many random sequences; with strongly coherent or non-unital noise their spread can be large, and the fitted rate scatters by several percent, as in the worked example.
Why it matters
Process tomography is where the representations of Modules 2 and 3 meet data: every estimate in this module is a Choi matrix or a PTM with a physicality constraint, and the CPTP projection is the process version of the physical estimators of Module 4. The SPAM problem and the gauge freedom explain why modern noise characterization learns only gauge-invariant quantities that SPAM errors cannot fake, such as decay rates of random sequences. Module 12 extends the RB idea from one decay to all Pauli fidelities of a twirled noise channel, and fits sparse Pauli–Lindblad models to them. Probabilistic error cancellation (Module 13) and tensor-network error mitigation (Module 14) invert such learned noise models, so their accuracy is bounded by what the learning protocols of this module and of Module 12 can certify.
Further reading
Mohseni, Rezakhani and Lidar (6): standard, ancilla-assisted and direct process tomography compared by resources.
Greenbaum (32): an introduction to gate set tomography in the PTM conventions used here, including linear GST and the gauge.
Nielsen et al. (33): the full theory and practice of long-sequence GST, germs, gauge optimization and model violation.
Magesan, Gambetta and Emerson (25) and Helsen et al. (29): randomized benchmarking from the original Clifford analysis to a general framework.
Wallman and Flammia (21): confidence intervals for RB and the relation between average infidelity and diamond distance.
Huang, Chen and Preskill (15): learning to predict properties of arbitrary processes without full tomography.
Chuang IL, Nielsen MA. Prescription for experimental determination of the dynamics of a quantum black box. J Mod Opt 44, 2455-2467 (1997). 1997;
2.
Poyatos JF, Cirac JI, Zoller P. Complete Characterization of a Quantum Process: the Two-Bit Quantum Gate. arXiv preprint arXiv:quant-ph/9611013. 1996;
3.
D’Ariano GM, Presti PL. Tomography of Quantum Operations. Phys Rev Lett vol 86, pag 4195 (2001). 2001;
4.
Leung DW. Choi’s Proof and Quantum Process Tomography. J Math Phys, Vol 44, No 2 (2003) p 528-33. 2003;
5.
Altepeter JB, Branning D, Jeffrey E, Wei TC, Kwiat PG, Thew RT, et al. Ancilla-assisted quantum process tomography. Physical Review Letters 90, 193601 (2003). 2003;
6.
Mohseni M, Rezakhani AT, Lidar DA. Quantum Process Tomography: Resource Analysis of Different Strategies. Phys Rev A 77, 032322 (2008). 2008;
7.
Knee GC, Bolduc E, Leach J, Gauger EM. Quantum process tomography via completely positive and trace-preserving projection. Phys Rev A 98, 062336 (2018). 2018;
8.
Hradil Z. Quantum state estimation. arXiv preprint arXiv:quant-ph/9609012. 1996;
9.
Jezek M, Fiurasek J, Hradil Z. Quantum inference of states and processes. Phys Rev A 68, 012305 (2003). 2003;
10.
Surawy-Stepney T, Kahn J, Kueng R, Guta M. Projected Least-Squares Quantum Process Tomography. Quantum 6, 844 (2022). 2022;
11.
Watrous J. The Theory of Quantum Information. Cambridge University Press; 2018.
12.
O’Donnell R, Wright J. Efficient quantum tomography. Proc 48th ACM Symposium on Theory of Computing, STOC (2016). 2016;
13.
Haah J, Harrow AW, Ji Z, Wu X, Yu N. Sample-optimal tomography of quantum states. IEEE Transactions on Information Theory 63(9), 5628-5641 (2017). 2017;
14.
Haah J, Kothari R, O’Donnell R, Tang E. Query-optimal estimation of unitary channels in diamond distance. 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), Santa Cruz, CA, USA, 2023, pp 363-390. 2023;
15.
Huang H-Y, Chen S, Preskill J. Learning to predict arbitrary quantum processes. arXiv preprint arXiv:221014894. 2022;
16.
Kueng R, Long DM, Doherty AC, Flammia ST. Comparing Experiments to the Fault-Tolerance Threshold. Phys Rev Lett 117, 170502 (2016). 2016;
17.
Gilchrist A, Langford NK, Nielsen MA. Distance measures to compare real and ideal quantum processes. Physical Review A 71, 062310 (2005). 2005;
18.
Horodecki P, Horodecki M, Horodecki R. General teleportation channel, singlet fraction and quasi-distillation. Phys Rev A 60, 1888-1898 (1999). 1999;
19.
Nielsen MA. A simple formula for the average gate fidelity of a quantum dynamical operation. Phys Lett A 303 (4): 249-252 (2002). 2002;
20.
Dankert C, Cleve R, Emerson J, Livine E. Exact and Approximate Unitary 2-Designs: Constructions and Applications. Physical Review A 80, 012304 (2009). 2009;
21.
Wallman JJ, Flammia ST. Randomized Benchmarking with Confidence. New J Phys 16 (2014) 103032. 2014;
22.
Wallman JJ, Emerson J. Noise tailoring for scalable quantum computation via randomized compiling. Phys Rev A 94, 052325 (2016). 2016;
23.
Emerson J, Alicki R, Zyczkowski K. Scalable Noise Estimation with Random Unitary Operators. J Opt B: Quantum Semiclass Opt 7 (2005) S347-S352. 2005;
24.
Knill E, Leibfried D, Reichle R, Britton J, Blakestad RB, Jost JD, et al. Randomized Benchmarking of Quantum Gates. Phys Rev A 77, 012307 (2008). 2008;
25.
Magesan E, Gambetta JM, Emerson J. Robust randomized benchmarking of quantum processes. Phys Rev Lett 106, 180504 (2011). 2011;
26.
Magesan E, Gambetta JM, Johnson BR, Ryan CA, Chow JM, Merkel ST, et al. Efficient measurement of quantum gate error by interleaved randomized benchmarking. Phys Rev Lett 109, 080505 (2012). 2012;
27.
Proctor T, Rudinger K, Young K, Sarovar M, Blume-Kohout R. What randomized benchmarking actually measures. Phys Rev Lett 119, 130502 (2017). 2017;
Helsen J, Roth I, Onorati E, Werner AH, Eisert J. A general framework for randomized benchmarking. PRX Quantum 3, 020357 (2022). 2022;
30.
Merkel ST, Gambetta JM, Smolin JA, Poletto S, Córcoles AD, Johnson BR, et al. Self-Consistent Quantum Process Tomography. Phys Rev A 87, 062119 (2013). 2013;
31.
Blume-Kohout R, Gamble JK, Nielsen E, Mizrahi J, Sterk JD, Maunz P. Robust, self-consistent, closed-form tomography of quantum logic gates on a trapped ion qubit. arXiv preprint arXiv:13104492. 2013;
32.
Greenbaum D. Introduction to Quantum Gate Set Tomography. arXiv preprint arXiv:150902921. 2015;
33.
Nielsen E, Gamble JK, Rudinger K, Scholten T, Young K, Blume-Kohout R. Gate Set Tomography. Quantum 5, 557 (2021). 2021;