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 finite-data 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.

 r Average gate infidelity of the composite error map. If the interleaved gate is $$G$$, then r is the infidelity of the product $$G\circ T$$ averaged over all $$T$$ in the twirling group. The twirling group is typically (historically and as the default True-Qᵀᴹ option) the Clifford group, but may be, for example, the special unitary group. r_l The lower bound on the average gate infidelity of the interleaved gate. r_u The upper bound on the average gate infidelity of the interleaved gate. A State preparation and measurement (SPAM) constant of the exponential decay $$A p^m$$ of the IRB experiment. p 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 r parameter described above. Reference Infidelity The r parameter as measured by SRB alone; the infidelity of the reference twirling group. Stochastic Infidelity The ru parameter as measured by XRB; the amount infidelity due to stochastic noise. Infidelity Bound The parameters r_l and r_u described above.

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 1-qubit 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.298  [2.048,2.548]  e-02  Average gate infidelity of the composite error m..
r_l     3.753  [1.122,6.384]  e-03  Lower bound on the interleaved gate's average ga..
r_u     2.668  [1.657,3.679]  e-02  Upper bound on the interleaved gate's average ga..
A     0.975  [0.938,1.012]        SPAM of the exponential decay A * p ** m
p     0.969  [0.966,0.973]        Decay rate of the exponential decay A * p ** m

SRB on [1, 2]
--------------------------------------------------------------------------------
Name  Estimate   95% CI              Description
r     1.311  [1.152,1.471]  e-02  Average gate infidelity of the error map
A     0.993  [0.968,1.018]        SPAM of the exponential decay A * p ** m
p     0.983  [0.980,0.985]        Decay rate of the exponential decay A * p ** m

XRB on [1, 2]
--------------------------------------------------------------------------------
Name  Estimate   95% CI              Description
ru     1.052  [0.884,1.221]  e-02  Average gate infidelity of systematic coherent e..
inc     0.803  [0.641,0.964]        Incoherence, 0 indicates entirely unitary noise ..
A     0.696  [0.589,0.803]        SPAM of the exponential decay A * u ** m
u     0.972  [0.968,0.977]        Decay rate of the exponential decay A * u ** m