Interleaved Randomized Benchmarking (IRB)¶
By interleaving a fixed gate in the SRB protocol, we can target the average gate
infidelity of a specific gate. This is called interleaved randomized benchmarking (IRB)
[6], and is a commonly used tool [a].
The reported value of r
is the infidelity of the specific gate when composed with
a random twirling group element (typically the Clifford group).
Naively, one could take this composite infidelity r
and subtract from it a
reference infidelity found from performing the same protocol without the interleaved
gate (i.e. SRB) in an attempt to learn
the infidelity of the interleaved gate alone. 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. 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. More generally, if the amount of unitarity is
known, then we can make a lower and upper bound on the physically consistent range
of possible infidelities for the interleaved gate [7]. The unitarity
quantity is measured by the XRB protocol
as the parameter u
. If a fit()
is performed where both
SRB and XRB data is found (of the correct twirling group) then these lower and upper
bounds are reported along with their finitedata error bars. If only SRB is found,
then the bounds are also reported, but the worst case u=1
is used.
Below is a list of parameters that may appear in an IRB
protocol when
fit()
is called.

Average gate infidelity of the composite error map. If the
interleaved gate is \(G\), then 

The lower bound on the average gate infidelity of the interleaved gate. 

The upper bound on the average gate infidelity of the interleaved gate. 

State preparation and measurement (SPAM) constant of the exponential decay \(A p^m\) of the IRB experiment. 

Decay rate of the exponential decay \(A p^m\) of the IRB experiment. 
The plotting function CircuitCollection.plot.irb_summary()
compares all of the
r
like parameters relevant to IRB. In particular, the following values are plotted:
Composite Infidelity 
The 
Reference Infidelity 
The 
Stochastic Infidelity 
The 
Infidelity Bound 
The parameters 
Example¶
#
# Interleaved randomized benchmarking (IRB) example.
# Copyright 2020 Quantum Benchmark Inc.
#
import trueq as tq
# Define some cycles that define the gates we want to characterize with IRB
# Note that we could perform simultaneous IRB with,
# e.g. {(1, 2): tq.Gate.cz, (3, 4): tq.Gate.cz}
cycle1 = {1: tq.Gate.h}
cycle2 = {2: tq.Gate.h}
cycle12 = {(1, 2): tq.Gate.cz}
# Generate a circuit collection to run IRB on the above cycle
# with 30 random circuits for each circuit length in [4, 32, 64].
circuits = tq.make_irb(cycle1, [4, 32, 64])
circuits.append(tq.make_irb(cycle2, [4, 32, 64]))
circuits.append(tq.make_irb(cycle12, [4, 32, 64]))
# We are interested in the gate fidelity of e.g. CZ alone, so we also need a reference
# SRB experiment. Optionally, to tighten the bound on the infidelity estimate, we
# also do an XRB experiment. The double nesting [[1, 2]] is necessary because just
# [1, 2] refers to simultaneous 1qubit gates.
circuits.append(tq.make_srb([1], [4, 20, 50]))
circuits.append(tq.make_srb([2], [4, 20, 50]))
circuits.append(tq.make_srb([[1, 2]], [4, 20, 50]))
circuits.append(tq.make_xrb([1], [4, 20, 50]))
circuits.append(tq.make_xrb([2], [4, 20, 50]))
circuits.append(tq.make_xrb([[1, 2]], [4, 20, 50]))
# Create a noisy simulator and populate all results
sim = tq.Simulator().add_depolarizing(0.01).add_overrotation(0.04).run(circuits)
# Plot a summary of information
circuits.plot.irb_summary()
# Print a summary of the results for the CZ gate
circuits.fit(twirl=(("C", 1, 2),)).summarize()
IRB on [1, 2]

Name Estimate 95% CI Description
r 2.214 [1.968,2.460] e02 Average gate infidelity of the composite error m..
r_l 2.727 [0.892,4.562] e03 Lower bound on the interleaved gate's average ga..
r_u 3.088 [2.137,4.039] e02 Upper bound on the interleaved gate's average ga..
A 0.988 [0.954,1.022] SPAM of the exponential decay A * p ** m
p 0.970 [0.967,0.974] Decay rate of the exponential decay A * p ** m
SRB on [1, 2]

Name Estimate 95% CI Description
r 1.307 [1.160,1.455] e02 Average gate infidelity of the error map
A 0.987 [0.964,1.010] SPAM of the exponential decay A * p ** m
p 0.983 [0.981,0.985] Decay rate of the exponential decay A * p ** m
XRB on [1, 2]

Name Estimate 95% CI Description
ru 9.275 [7.542,11.0] e03 Average gate infidelity of systematic coherent e..
inc 0.709 [0.554,0.864] Incoherence, 0 indicates entirely unitary noise ..
A 0.603 [0.501,0.705] SPAM of the exponential decay A * u ** m
u 0.975 [0.971,0.980] Decay rate of the exponential decay A * u ** m