# Interleaved Randomized Benchmarking (IRB)¶

*See* `make_irb()`

*for API documentation.*

IRB is a protocol for inferring the probability of an error occurring during a gate of interest (see arXiv:1203.4550).

This protocol constructs circuits where the gate of interest is interleaved with random gates. Therefore, the most natural quantity this protocol estimates is the average error of the gate of interest composed with a random gate, and not the error of the gate alone.

To infer the error of the gate alone one would naively take the composite error and subtract from it a reference error found from performing the same protocol without the interleaved gate (i.e. SRB). However, this is problematic because unitary portions of the noise process may either constructively or destructively interfere in the composition of the interleaved gate with a random twirling group element (arXiv:1610.05296). Both of these scenarios are common in physical noise models. If the noise happens to be completely stochastic, so that no coherent effects are possible, then this naive procedure is correct. Otherwise, the best that can be done is to bound the physically allowed error rates of the gate of interest. These bounds can be improved if the unitarity of the noise is known. These bounds will be included as estimates in the fit whenever SRB data (and optionally XRB data for improved bounds) is included in the circuit collection along with IRB data.

Note that we invert each circuit up to a random Pauli matrix to diagnose errors that are missed by always returning to the initial state (see arXiv:1901.00535).

Terms that may be returned from the analysis are as follows. These descriptions are also available via mouse-overs when running True-Q™ in a Jupyter or Colab notebook.

## Estimated Parameters¶

- \({e}_{F}\) -
The total probability that an error afflicts the targeted systems during a dressed gate if the noise is stochastic, where a dressed gate is a gate of interest composed with a random gate. This probability does not include errors that only affect other systems.

The probability of an error (also known as the process infidelity) satisfies

\[e_F = 1 - F_E = (1 + 1/d) r\]where \(F_E\) is the process fidelity (also known as the entanglement fidelity), \(d\) is the dimension of the system, and

\[r = 1 - \int d\psi \operatorname{Tr}(\psi, E(\psi))\]is the average gate infidelity. Note that the process fidelity is stable under tensor products, whereas the average gate infidelity must be converted to the process fidelity to estimate the fidelity of a tensor product of processes.

- \({e}_{IL}\) -
A lower bound on the inferred value of \(e_F\) that accounts for systematic errors in the interleaved estimate.

- \({e}_{IU}\) -
An upper bound on the inferred value of \(e_F\) that accounts for systematic errors in the interleaved estimate.

- \({p}\) -
Decay parameter of the exponential decay \(Ap^m\).

- \({A}\) -
This parameter has an ideal value of \(A=1\) and encapsulates all state preparation and measurement (SPAM) errors. It additionally contains the noise of a single random gate. Therefore, a value of less than 1 does not necessarily indicate large SPAM errors if gate errors are significant.