# Cycle Benchmarking (CB)

*See* `make_cb()`

*for API documentation.*

CB is a fully scalable protocol for assessing the performance of a specified clock cycle containing any combination of single gates, parallelized gates, and idle qubits, across an entire \(n\)-qubit device [9, 10]. The performance is measured in one of two ways: the first and most common is the total probability of error of the cycle (\(e_F\)), and the second is the probability of some specified Pauli error ocurring during the cycle (\(e_P\) for some Pauli \(P\)).

Examples of 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 probability of any error occurring during a dressed cycle, where a dressed cycle is the cycle of interest composed with a random cycle of local gates. This is also known as the process infidelity of the dressed cycle. By default, the process infidelity is reported for the entire cycle and includes, for example, errors that occur on qubits that are idle during the cycle of interest. However this quantity can optionally be computed for any subset of qubits, corresponding to a marginal process infidelity.

If \(\mathcal{C}\) is superoperator of the cycle of interest and \(\mathcal{T}\) is the superoperator of a twirling operation, then the process infidelity of the dressed cycle is defined as

\[e_F = 1 - \mathbb{E}\left[ \operatorname{Tr} \left( \mathcal{T}^\dagger \mathcal{C}^\dagger \tilde{\mathcal{C}} \tilde{\mathcal{T}} \right)\right]\]where a tilde denotes the noisy implementation of a superoperator, and the expectation value is taken over randomizations of the twirling group. Note that if the twirling group is perfectly implemented, then we have the simpler formula

\[e_F = 1 - \frac{\operatorname{Tr}(\mathcal{C}^\dagger \tilde{\mathcal{C}})}{d^2}\]which is the process infidelity of the cycle of interest alone.

The process infidelity is closely related to the process fidelity \(F_E\) (also known as the entanglement fidelity), and the average gate infidelity \(r = 1 - \int d\psi \operatorname{Tr}(\psi, E(\psi))\), via the formula \(e_F = 1 - F_E = (1 + 1/d) r\). Here, \(d\) is the total dimension of the system across all qubits. 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.

Because this protocol uses the same twirling group as randomized compiling (RC), estimates of this parameter accurately predict the in-situ characteristics of this cycle when present in a circuit that is run using RC.

- \({e}_{ZXZX}\) -
The marginal error rate of the subscripted Pauli error occuring on the qubits in question. In other words, the sum of the probabilities of all global errors that act as the subscripted error on the specified qubit labels. For example, if an error rate \(e_X=0.1\) is measured for the qubit label

`(0, )`

, then\[\sum_Q e_{X \otimes Q} = 0.1\]where \(Q\) is summed over all Paulis acting on different qubits.

Examples: \(e_{X}\), \(e_{XYYI}\), \(e_{ZZ}\), \(e_{XYYI}\), \(e_{ZZ}\).

- \({A}_{YZXX}\) -
SPAM parameter of the exponential decay \(Ap^m\) for the given Pauli term.

Examples: \(A_X\), \(A_{XYYI}\), \(A_{ZZ}\), describing the \(A\) parameter for each of the respective Paulis.

- \({p}_{YZXX}\) -
Decay parameter of the exponential decay \(Ap^m\) for the given Pauli term.

Examples: \(p_X\), \(p_{XYYI}\), \(p_{ZZ}\), describing the \(p\) parameter for each of the respective Paulis.