# 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 2019 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.319 [5.500,7.138] e-03 Average gate infidelity of the error map
A 0.954 [0.927,0.981] SPAM of the exponential decay A * p ** m
p 0.987 [0.986,0.989] Decay rate of the exponential decay A * p ** m
```

## Example 2¶

```
#
# Simultaneous streamlined randomized benchmarking (SRB) example.
# Copyright 2019 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.372 [5.556,7.187] e-03 Average gate infidelity of the error map
A 0.976 [0.954,0.998] SPAM of the exponential decay A * p ** m
p 0.987 [0.986,0.989] Decay rate of the exponential decay A * p ** m
SRB on [1]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 5.817 [5.054,6.580] e-03 Average gate infidelity of the error map
A 0.971 [0.947,0.995] SPAM of the exponential decay A * p ** m
p 0.988 [0.987,0.990] Decay rate of the exponential decay A * p ** m
SRB on [2]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 6.619 [5.935,7.303] e-03 Average gate infidelity of the error map
A 0.973 [0.947,0.998] 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 3¶

```
#
# Simultaneous streamlined randomized benchmarking (SRB) example.
# Copyright 2019 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.987 [6.108,7.865] e-03 Average gate infidelity of the error map
A 0.975 [0.952,0.997] SPAM of the exponential decay A * p ** m
p 0.986 [0.984,0.988] Decay rate of the exponential decay A * p ** m
SRB on [1, 2]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 1.518 [1.365,1.671] e-02 Average gate infidelity of the error map
A 0.966 [0.939,0.994] SPAM of the exponential decay A * p ** m
p 0.980 [0.978,0.982] Decay rate of the exponential decay A * p ** m
SRB on [3]
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
r 6.928 [6.188,7.667] e-03 Average gate infidelity of the error map
A 0.978 [0.955,1.001] SPAM of the exponential decay A * p ** m
p 0.986 [0.985,0.988] Decay rate of the exponential decay A * p ** m
```