# Streamlined Randomized Benchmarking (SRB)¶

SRB on a single qubit can be regarded as a “Hello quantum world” program that establishes a baseline performance and verifies integration has been successful. The standard form of randomized benchmarking (RB), for which the groundwork ([11][12][13][14]) dates back more than a decade, is the standard tool used by experimentalists to estimate the fidelity of their gates [a]. Years of collaborations with experimental groups have taught our research scientists that the standard protocol could be significantly streamlined. Our SRB module includes major improvements over the standard protocol that significantly reduce the experimental cost of obtaining a precise estimate of the quality of a set of quantum operations.

Saying more, running less

Historically, in implementations of RB, there has been no standard way of choosing circuit lengths, the number of random circuits per circuit length, or the number of shots per circuit. However, these values can drastically affect experiment time. True-Qᵀᴹ Design minimizes experiment time using four techniques:

We reduce the number of fit parameters by introducing further randomization. This enables us to use a fit model \(A\cdot p^m\) rather than \(A\cdot p^m +B\), enabling substantially shorter circuit lengths since decorrelating \(p\) and \(B\) is no longer necessary [15].

Because of the technique and model described in (1), we can use as few as two circuit lengths to fit for the parameter of interest, \(p\).

We selectively choose sequence lengths which maximize expected information density per unit time.

We use fewer shots per circuit; as a rule-of-thumb, there is little advantage to using more than 50 shots per circuit in SRB experiments.

Compared to many implementations found in literature today, this can easily lead to calibration times that are 7x faster. In the long run, as fidelities improve and classical hardware has lower circuit transfer overhead, these improvements may become even more apparent:

## Example 1¶

```
#
# Streamlined randomized benchmarking (SRB) example.
# Copyright 2020 Quantum Benchmark Inc.
#
import trueq as tq
# Generate a circuit collection to run one-qubit SRB on qubit 0 with 30 random circuits
# for each circuit length in [4, 32, 64].
circuits = tq.make_srb([0], [4, 32, 64], 30)
# Initialize a simulator with stochastic pauli noise.
sim = tq.Simulator().add_stochastic_pauli(px=0.01)
# Run the circuits on the simulator to populate the results.
sim.run(circuits)
# Plot the results.
circuits.plot.raw()
# Print summary of the results.
circuits.fit().summarize()
```

```
SRB on [0]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 6.645 [5.901,7.390] e-03 Average gate infidelity of the error map
A 0.991 [0.971,1.012] SPAM of the exponential decay A * p ** m
p 0.987 [0.985,0.988] Decay rate of the exponential decay A * p ** m
```

## Example 2¶

```
#
# Simultaneous streamlined randomized benchmarking (SRB) example.
# Copyright 2020 Quantum Benchmark Inc.
#
import trueq as tq
# Generate a circuit collection to run simultaneous SRB on qubits [0, 1, 2] with
# 30 random circuits for each circuit length in [4, 32, 64].
circuits = tq.make_srb([0, 1, 2], [4, 32, 64], 30)
# Initialize a simulator with stochastic pauli noise.
sim = tq.Simulator().add_stochastic_pauli(px=0.01)
# Run the circuits on the simulator to populate the results.
sim.run(circuits)
# Plot the results.
circuits.plot.raw()
# Print summary of the results.
circuits.fit().summarize()
```

```
SRB on [0]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 6.745 [5.959,7.531] e-03 Average gate infidelity of the error map
A 0.981 [0.954,1.009] SPAM of the exponential decay A * p ** m
p 0.987 [0.985,0.988] Decay rate of the exponential decay A * p ** m
SRB on [1]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 6.208 [5.544,6.871] e-03 Average gate infidelity of the error map
A 0.967 [0.945,0.988] SPAM of the exponential decay A * p ** m
p 0.988 [0.986,0.989] Decay rate of the exponential decay A * p ** m
SRB on [2]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 6.987 [6.140,7.833] e-03 Average gate infidelity of the error map
A 0.983 [0.964,1.002] SPAM of the exponential decay A * p ** m
p 0.986 [0.984,0.988] Decay rate of the exponential decay A * p ** m
```

## Example 3¶

```
#
# Simultaneous streamlined randomized benchmarking (SRB) example.
# Copyright 2020 Quantum Benchmark Inc.
#
import trueq as tq
# Generate a circuit collection to run simultaneous SRB on individual qubits (0, 3) and
# a qubit pair (1, 2) with 30 random circuits for each circuit length in [4, 32, 64].
circuits = tq.make_srb([0, [1, 2], 3], [4, 32, 64], 30)
# Initialize a simulator with stochastic pauli noise.
sim = tq.Simulator().add_stochastic_pauli(px=0.01)
# Run the circuits on the simulator to populate the results.
sim.run(circuits)
# Plot the results.
circuits.plot.raw()
# Print summary of the results.
circuits.fit().summarize()
```

```
SRB on [0]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 6.629 [5.886,7.372] e-03 Average gate infidelity of the error map
A 0.981 [0.954,1.007] SPAM of the exponential decay A * p ** m
p 0.987 [0.985,0.988] Decay rate of the exponential decay A * p ** m
SRB on [1, 2]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 1.682 [1.501,1.863] e-02 Average gate infidelity of the error map
A 0.951 [0.918,0.984] SPAM of the exponential decay A * p ** m
p 0.978 [0.975,0.980] Decay rate of the exponential decay A * p ** m
SRB on [3]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 6.369 [5.602,7.136] e-03 Average gate infidelity of the error map
A 0.972 [0.944,0.999] SPAM of the exponential decay A * p ** m
p 0.987 [0.986,0.989] Decay rate of the exponential decay A * p ** m
```