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 2019 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.262 [1.986,2.538] e02 Average gate infidelity of the composite error m..
r_l 4.450 [0.952,7.948] e03 Lower bound on the interleaved gate's average ga..
r_u 2.310 [1.200,3.420] e02 Upper bound on the interleaved gate's average ga..
A 0.981 [0.940,1.022] SPAM of the exponential decay A * p ** m
p 0.970 [0.966,0.974] Decay rate of the exponential decay A * p ** m
SRB on [1, 2]

Name Estimate 95% CI Description
r 1.262 [1.102,1.423] e02 Average gate infidelity of the error map
A 1.001 [0.979,1.023] 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 1.082 [0.909,1.254] e02 Average gate infidelity of systematic coherent e..
inc 0.857 [0.682,1.032] Incoherence, 0 indicates entirely unitary noise ..
A 0.699 [0.592,0.807] SPAM of the exponential decay A * u ** m
u 0.971 [0.967,0.976] Decay rate of the exponential decay A * u ** m