Self-Consistent Gauges for Cycle Benchmarking under Gate-Dependent Noise

1. Introduction

Cycle benchmarking (CB) estimates the process fidelity of a cycle of gates, and multiplying such estimates gives a quick estimate of the fidelity of a whole circuit. CB randomizes each cycle with random gates that twirl its noise into a Pauli channel, and its guarantees assume that the errors on these randomizing gates do not depend on which gate is applied. Real errors often do. In my simulations, over-rotation errors on the randomizing gates pushed the fidelities that CB reports far below the fidelities they are meant to estimate.

This post looks at that gap through gauge freedom. Noisy gates are only defined up to a gauge transformation, and the fidelity to a fixed ideal gate is not gauge invariant. This suggests comparing the noisy gates to a gauge-rotated target, computed from the leading Kraus operator of an averaged channel. Section 2 sets up the notation of the cycle error reconstruction (CER) paper and recalls cycle benchmarking and randomized compiling (RC). Section 3 describes the problem and how to compute this self-consistent gauge. Section 4 turns to the analytical side: it shows why RC still tailors gate-dependent noise on the easy gates into Pauli channels, and rewrites the corresponding bound of the RC paper in the language of the CER paper.

2. Setup

2.1 Circuits of Easy and Hard Cycles

Following the CER paper, we write a circuit as alternating easy and hard cycles,

\begin{equation} \C = E_m H_{m-1} E_{m-1} \cdots H_1 E_1 H_0 E_0, \label{eq:circuit} \end{equation}

composed from right to left, so $E_0$ is applied first. Each easy cycle $E_i$ is a tensor product of single-qubit gates from the group $\bE = \langle \cP, S \rangle$ generated by the Pauli gates and the phase gate $S = \sqrt{Z}$, which acts on the Bloch sphere as the dihedral group of order 8. Each hard cycle $H_i$ is a tensor product of gates from $\bH = \{\mathrm{CNOT}, H, T\}$. Because the easy gates form a group, random easy gates can be merged into neighbouring easy cycles without making the circuit longer.

Definition 1 (dressed cycle). A dressed cycle $D_l = H_l E_l$ is an easy cycle followed by a hard cycle. Setting $H_m = \mathds{1}$, the circuit is a product of dressed cycles,

\begin{equation} \C = D_m D_{m-1} \cdots D_1 D_0, \label{eq:dressed} \end{equation}

where the last one, $D_m = E_m$, is an easy cycle dressed with an identity cycle.

2.2 Noise and Fidelities

For a gate or cycle $G$, write $\phi(G)$ for its ideal unitary channel and $\nu(G)$ for its noisy implementation. In Sections 2 and 3 we abbreviate $\tilde G = \nu(G)$ and write $G$ for $\phi(G)$. If $\tilde G$ has Kraus operators $\{A_k\}$ and acts on $d$ dimensions, its process fidelity to the ideal gate is

\begin{equation} F(\tilde G, G) = \frac{1}{d^2}\sum_k \left|\Tr\left(G^\dagger A_k\right)\right|^2. \label{eq:fidelity} \end{equation}

(Kraus operators, Choi matrices and vectorization are reviewed in my post on superoperator representations.) Process fidelity is multiplicative under tensor products. So if a cycle $G = \bigotimes_j G_j$ is implemented without crosstalk, $\tilde G = \bigotimes_j \tilde G_j$, its fidelity is the product of the fidelities of its gates:

\begin{equation} F(\tilde G, G) = \prod_j F(\tilde G_j, G_j). \label{eq:product} \end{equation}

2.3 Cycle Benchmarking

For a gate of interest $G$, CB estimates

\begin{equation} F_{\text{CB}}(G) = \frac{1}{|\bR|}\sum_{R \in \bR} F\big(\tilde G \tilde R, GR\big), \label{eq:fcb} \end{equation}

the process fidelity of $G$ dressed with a randomizing gate $R$, averaged over a set $\bR$ of randomizing gates that twirls the noise into a stochastic Pauli channel. (My introduction to cycle benchmarking covers the protocol in more detail.) The set depends on the gate:

\begin{equation} G = H \Rightarrow \bR = \cP, \qquad G = T \Rightarrow \bR = \bE, \qquad G = \mathrm{CNOT} \Rightarrow \bR = \cP^{\otimes 2}. \label{eq:randomizing-sets} \end{equation}

The Hadamard and CNOT gates are Clifford gates, so Pauli gates suffice for them, while the $T$ gate is randomized with the dihedral easy group instead. Let $\hat F_{\text{CB}}(G)$ be the estimate that CB returns. If the randomizing gates have gate-independent noise, $\tilde R = \Lambda \circ R$ for all $R \in \bR$, then Theorem 3 of guarantees that

\begin{equation} \hat F_{\text{CB}}(G) \leq F_{\text{CB}}(G), \qquad F_{\text{CB}} - \hat F_{\text{CB}} = \mathcal{O}\big((1 - F_{\text{CB}})^2\big): \label{eq:cb-theorem} \end{equation}

CB slightly underestimates its target, by an amount of second order in the infidelity.

2.4 From Cycles to Circuits

If there is no crosstalk, $\eqref{eq:product}$ suggests estimating the fidelity of a whole circuit by multiplying CB estimates of its dressed gates; running CB on single dressed gates rather than on whole cycles also saves time. Write $(D_i)_j$ for the $j$-th dressed gate of the dressed cycle $D_i$, that is, the $j$-th gate of $H_i$ together with the easy gates on the same qubits just before it. We compare

\begin{equation} \hat F_{\C} = \prod_{i=0}^{m}\prod_j \hat F_{\text{CB}}\big((D_i)_j\big) \qquad\text{and}\qquad F_{\text{naive}}(\tilde\C, \C) = \prod_{i=0}^{m}\prod_j F_{\text{CB}}\big((D_i)_j\big). \label{eq:composed} \end{equation}

The first multiplies the CB estimates, and the second, which we call the naive circuit fidelity, multiplies their targets. Written out with $\eqref{eq:fcb}$,

$$ F_{\text{naive}}(\tilde\C, \C) = \prod_{i=0}^{m}\prod_j \frac{1}{|\bR|}\sum_{R \in \bR} F\big((\tilde H_i)_j \tilde R,\ (H_i)_j R\big). $$

Under gate-independent noise on the randomizing gates, applying $\eqref{eq:cb-theorem}$ to each factor gives

\begin{equation} \hat F_{\C} \leq F_{\text{naive}}(\tilde\C, \C). \label{eq:composed-inequality} \end{equation}

In my simulations, gate-dependent noise strains this picture. With an over-rotation error model on the easy gates, which are also the randomizing gates, inequality $\eqref{eq:composed-inequality}$ still held, but the CB estimates were far below their targets, $\hat F_{\text{CB}} \ll F_{\text{CB}}$, and therefore $\hat F_{\C} \ll F_{\text{naive}}$. Whether some other error model violates the inequality outright, rather than just loosening it, is still open.

2.5 Randomized Compiling

Randomized compiling is the other ingredient. Suppose first that the easy gates have gate-independent noise, $\tilde E = \Lambda\circ E$ for all $E \in \bE$, and write each noisy hard cycle as $\tilde H = H \circ \Lambda_H$. A noisy dressed cycle is then

\begin{equation} \tilde H \circ \tilde E = H \circ (\Lambda_H \circ \Lambda) \circ E = H \circ \bL_H \circ E, \qquad \bL_H = \Lambda_H \circ \Lambda, \end{equation}

so the noisy circuit is

\begin{equation} \tilde\C = \Lambda E_m H_{m-1} \bL_{H_{m-1}} E_{m-1} \cdots H_1 \bL_{H_1} E_1 H_0 \bL_{H_0} E_0. \end{equation}

RC replaces each easy cycle by a random, ideally equivalent one and averages over many such compilations. In the limit of infinitely many randomizations, each composite error $\bL_{H_i}$ between an easy and a hard cycle is tailored into a Pauli channel $\bL^{P}_{H_i}$:

\begin{equation} \tilde\C_{\text{RC}} = \Lambda E_m H_{m-1} \bL^{P}_{H_{m-1}} E_{m-1} \cdots H_1 \bL^{P}_{H_1} E_1 H_0 \bL^{P}_{H_0} E_0. \label{eq:rc} \end{equation}

Section 4 revisits this when the noise on the easy gates is gate-dependent.

3. Gauge Freedom and Self-Consistent Gauges

3.1 The Problem

CB targets the average fidelity $\eqref{eq:fcb}$ of the noisy dressed gate $\tilde G\tilde R$ to the ideal $GR$. When the randomizing gates have gate-dependent errors, the gap between this target and the CB estimate becomes large, $\hat F_{\text{CB}} \ll F_{\text{CB}}$, and so does the gap between $\hat F_{\C}$ and $F_{\text{naive}}$.

Part of the reason is gauge freedom. Experiments see noisy gates only through circuits that start with a state preparation and end with a measurement. Those outcomes do not change if every noisy operation is conjugated by the same invertible map, $\tilde G \mapsto \mathcal{U}\tilde G\,\mathcal{U}^{-1}$, with the preparation and measurement transformed to match. The fidelity to a fixed target gate, however, does change. Carignan-Dugas et al. used this freedom to interpret randomized benchmarking decay rates under gate-dependent noise, relating them to fidelities with respect to a target gate set rotated by a suitable unitary. Following that idea, we compare the noisy dressed gates to the rotated targets $U(GR)U^\dagger$ for a well-chosen unitary $U$.

3.2 Computing the Gauge

For a gate of interest $G$ with randomizing set $\bR$, the self-consistent gauge (SCG) $U$ is constructed as follows.

  1. Average the error of random sequences of four dressed gates. With $(GR)_{4:1} = (GR_4)(GR_3)(GR_2)(GR_1)$ for independent random $R_1, \dots, R_4 \in \bR$, let \begin{equation} \Phi = \mathbb{E}\left[\phi\big((GR)_{4:1}\big)^\dagger \circ \nu\big((GR)_{4:1}\big)\right]. \label{eq:average-channel} \end{equation} This channel is the identity when the gates are noiseless.
  2. Compute its Choi matrix $J(\Phi)$.
  3. Find the eigenvector $\ket{a_1}$ of $J(\Phi)$ with the largest eigenvalue. Since $\Phi$ is close to the identity, this eigenvalue dominates: it is close to $1$ once $J(\Phi)$ is normalized to unit trace.
  4. Un-vectorize it, $\vect{A_1} = \ket{a_1}$, to obtain the leading Kraus operator $A_1$ of $\Phi$.
  5. Take the polar decomposition $A_1 = UP$, with $U$ unitary and $P \geq 0$. The unitary $U$ is the gauge.
  6. Compute the fidelity to the rotated targets, \begin{equation} F^{U}_{\text{CB}}(G) = \frac{1}{|\bR|}\sum_{R \in \bR} F\big(\tilde G\tilde R,\ U(GR)U^\dagger\big). \label{eq:fcb-gauge} \end{equation}

4. Randomized Compiling with Gate-Dependent Easy Gates

This section looks at gate-dependent noise on the easy gates analytically, by translating the bound of the RC paper into the effective dressed cycles of the CER paper. Here the hard cycles are Clifford, so that every twirling and correction cycle is a Pauli cycle. The argument should extend to circuits with $T$ gates, but we do not pursue that here.

4.1 Notation

We write $H_i$, $E_i$ and $R_i$ for hard, easy and twirling cycles, with ideal and noisy channels $\phi(\cdot)$ and $\nu(\cdot)$ as before. The noise of a cycle is defined by

\begin{equation} \nu(H_i) = \phi(H_i)\,\Lambda(H_i), \qquad \nu(E) = \Lambda(E)\,\phi(E), \end{equation}

so the noise of a hard cycle acts just before it and the noise of an easy cycle just after it, as in Section 2.5. We measure errors with the diamond distance from the identity channel $\cI$,

\begin{equation} \epsilon(\cE) = \frac{1}{2}\left\|\cE - \cI\right\|_\diamond = \frac{1}{2}\sup_\rho \left\|\left[(\cE - \cI) \otimes \cI_d\right](\rho)\right\|_1, \end{equation}

where the supremum is over density matrices on the system and a $d$-dimensional copy of it. The diamond distance is related to the process infidelity $r(\cE) = 1 - F(\cE, \cI)$, not the average gate infidelity, by

\begin{equation} r(\cE) \leq \epsilon(\cE) \leq d\sqrt{r(\cE)}. \end{equation}

For Pauli channels the lower bound is attained, $\epsilon = r$, while for coherent errors $\epsilon$ grows like $\sqrt{r}$. This is why tailoring noise into Pauli channels matters.

4.2 Compiled Easy Cycles

RC replaces each easy cycle $E_i$ by

\begin{equation} E_i' = R_i^{c} E_i R_{i-1}, \qquad R_i^{c} = H_i^\dagger R_i^\dagger H_i, \label{eq:compiled} \end{equation}

where $R_0, \dots, R_{m-1}$ are independent, uniformly random Pauli cycles and $R_{-1} = R_m = \mathds{1}$. Since $H_i R_i^{c} = R_i^\dagger H_i$, each dressed cycle becomes $H_i E_i' = R_i^\dagger (H_i E_i) R_{i-1}$; the random cycles cancel between neighbours, so the compiled circuit is ideally equal to $\C$. (The RC paper writes circuits in time order, from left to right, which is why its correction cycles appear as $H_i R_i^\dagger H_i^\dagger$.)

With gate-dependent noise, the error $\Lambda(E_i')$ of a compiled easy cycle depends on the twirls that were drawn. The correction $R_i^{c}$ is a Pauli cycle, because $H_i$ is Clifford, and so is $E_i^\dagger R_i^{c} E_i$, because easy gates are Clifford too. As $R_{i-1}$ runs over all Pauli cycles, $E_i'$ therefore runs over the same set of compiled versions of $E_i$ (up to phases) for every $R_i$, and their average error

\begin{equation} \bar\Lambda_i = \left\langle \Lambda(E_i') \right\rangle_{R_{i-1}} \label{eq:average-noise} \end{equation}

does not depend on $R_i$. It defines the gate-independent noise model that we compare against.

4.3 Effective Dressed Cycles

Undoing the random cycles of a noisy dressed cycle with their ideal versions defines the adjusted dressed cycle

\begin{equation} \nu^{\adj}_i = \phi(R_i)\,\nu(H_i)\,\nu(E_i')\,\phi(R_{i-1})^\dagger, \end{equation}

and its average over the twirls is the effective dressed cycle

\begin{equation} \nu^{\eff}_i = \left\langle \nu^{\adj}_i \right\rangle_{R_i, R_{i-1}}. \label{eq:effective} \end{equation}

Even when the easy-gate noise is gate-dependent, the effective dressed cycle is an ideal dressed cycle with a Pauli channel in the middle. Using $\phi(R_i)\phi(H_i) = \phi(H_i)\phi(R_i^{c})^\dagger$ and $\phi(E_i')\phi(R_{i-1})^\dagger = \phi(R_i^{c})\phi(E_i)$,

\begin{align} \nu^{\adj}_i &= \phi(R_i)\,\phi(H_i)\,\Lambda(H_i)\,\Lambda(E_i')\,\phi(E_i')\,\phi(R_{i-1})^\dagger \nonumber \\ &= \phi(H_i)\,\phi(R_i^{c})^\dagger\,\Lambda(H_i)\,\Lambda(E_i')\,\phi(R_i^{c})\,\phi(E_i). \label{eq:adjusted} \end{align}

Only $\Lambda(E_i')$ depends on $R_{i-1}$, so averaging over $R_{i-1}$ replaces it by $\bar\Lambda_i$, and averaging over $R_i$ then twirls the rest:

\begin{equation} \nu^{\eff}_i = \phi(H_i)\,S_i\,\phi(E_i), \qquad S_i = \left\langle \phi(R_i^{c})^\dagger\,\Lambda(H_i)\,\bar\Lambda_i\,\phi(R_i^{c}) \right\rangle_{R_i}. \label{eq:effective-pauli} \end{equation}

As $R_i$ runs over all Pauli cycles, so does $R_i^{c}$, so $S_i$ is the Pauli twirl of $\Lambda(H_i)\bar\Lambda_i$: a stochastic Pauli channel. On average, each dressed cycle behaves as if the easy gates had the gate-independent noise $\bar\Lambda_i$.

4.4 Gate-Dependent versus Gate-Independent Noise

Let $\C_{\text{GD}} = \langle \C_{\text{RC}}(\Vec{R}) \rangle_{\Vec{R}}$ be the average over compilations of the circuit with the actual, gate-dependent easy-gate noise, and let $\C_{\text{GI}}$ be the same average when every $\Lambda(E_i')$ is replaced by $\bar\Lambda_i$. These are the gate-dependent and gate-independent circuits of the RC paper; in the CER paper, $\C_{\text{GD}}$ is the averaged randomized circuit. The random cycles telescope, so a single randomized circuit is a product of adjusted dressed cycles,

\begin{equation} \C_{\text{RC}}(\Vec{R}) = \nu^{\adj}_{m:0} = \nu^{\adj}_m \cdots \nu^{\adj}_1 \nu^{\adj}_0, \end{equation}

and we use the same $a\!:\!b$ notation for other products of cycles, with an empty product equal to the identity. With gate-independent noise, $\nu^{\adj}_i$ in $\eqref{eq:adjusted}$ depends only on $R_i$, so the adjusted cycles are independent and the average factorizes exactly, as in the proof of Lemma 1 of the CER paper:

\begin{equation} \C_{\text{GI}} = \nu^{\eff}_{m:0} = \nu^{\eff}_m \cdots \nu^{\eff}_1 \nu^{\eff}_0. \end{equation}

By $\eqref{eq:effective-pauli}$, both models have the same effective dressed cycles. With gate-dependent noise, however, neighbouring adjusted cycles share the twirl $R_{i-1}$ and are correlated. Write $\delta_i = \nu^{\adj}_i - \nu^{\eff}_i$ for the fluctuation of the $i$-th cycle. The telescoping identity

$$ \nu^{\adj}_{m:0} - \nu^{\eff}_{m:0} = \sum_{i=0}^{m} \nu^{\eff}_{m:i+1}\,\delta_i\,\nu^{\adj}_{i-1:0}, $$

together with the substitution $\nu^{\adj}_{i-1} = \nu^{\eff}_{i-1} + \delta_{i-1}$, gives

\begin{equation} \C_{\text{GD}} - \C_{\text{GI}} = \left\langle \nu^{\adj}_{m:0} \right\rangle - \nu^{\eff}_{m:0} = \sum_{i=1}^{m} \nu^{\eff}_{m:i+1} \left\langle \delta_i\,\delta_{i-1}\,\nu^{\adj}_{i-2:0} \right\rangle. \label{eq:gd-gi} \end{equation}

The terms containing $\nu^{\eff}_{i-1}$ vanish on average, because $\delta_i$ has zero mean and shares no twirl with $\nu^{\adj}_{i-2:0}$, and the $i = 0$ term vanishes for the same reason. What remains are correlations between neighbouring dressed cycles, and these vanish when the easy-gate noise is gate-independent, since $\delta_i$ then depends only on $R_i$.

Theorem 2 of the RC paper bounds this difference by how far the easy-gate noise strays from its average:

\begin{equation} \left\|\C_{\text{GD}} - \C_{\text{GI}}\right\|_\diamond \leq \sum_{i=1}^{m} \left\langle \left\|\Lambda(E_i') - \bar\Lambda_i\right\|_\diamond \right\rangle. \label{eq:rc-bound} \end{equation}

Alternatively, the triangle inequality applied to $\eqref{eq:gd-gi}$, together with the fact that composing with a channel cannot increase the diamond norm, gives

\begin{equation} \left\|\C_{\text{GD}} - \C_{\text{GI}}\right\|_\diamond \leq \sum_{i=1}^{m} \left\| \left\langle \delta_i\,\delta_{i-1}\,\nu^{\adj}_{i-2:0} \right\rangle \right\|_\diamond. \label{eq:triangle-bound} \end{equation}

In this sense, Theorem 2 of the RC paper bounds the perturbation terms of the CER expansion. Both bounds say the same thing: the more the errors of the easy gates vary from gate to gate, the further the compiled circuit can be from the gate-independent model, and the looser the bounds become.

5. Summary

References