Extended Randomized Benchmarking (XRB)

The XRB protocol measures the leakage and unitarity of a qubit (see [3][4]). The unitarity is a measure of how close the noise channel is to a unitary channel. In particular, the unitarity is \(1\) when noise is entirely unitary, and \(0\) when the noise is depolarizing.

Example 1

#
# Extended randomized benchmarking (XRB) example.
# Copyright 2019 Quantum Benchmark Inc.
#

import trueq as tq

# Generate a circuit collection to run one-qubit XRB on qubit 0 with 30 random circuits
# for each circuit length in [4, 32, 64].
circuits = tq.make_xrb([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()
../_images/xrb1_example.svg
XRB on [0]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
   ru     5.559  [4.718,6.399]  e-03  Average gate infidelity of systematic coherent e..
    A     0.962  [0.875,1.048]        SPAM of the exponential decay A * u ** m
    u     0.978  [0.975,0.981]        Decay rate of the exponential decay A * u ** m

Example 2

#
# Simultaneous extended randomized benchmarking (XRB) example.
# Copyright 2019 Quantum Benchmark Inc.
#

import trueq as tq

# Generate a circuit collection to run simultaneous XRB on qubits [0, 1, 2] with
# 30 random circuits for each circuit length in [4, 32, 64].
circuits = tq.make_xrb([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()
../_images/xrb2_example.svg
XRB on [0]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
   ru     5.675  [4.888,6.463]  e-03  Average gate infidelity of systematic coherent e..
    A     0.951  [0.855,1.046]        SPAM of the exponential decay A * u ** m
    u     0.977  [0.974,0.981]        Decay rate of the exponential decay A * u ** m

XRB on [1]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
   ru     5.640  [4.785,6.495]  e-03  Average gate infidelity of systematic coherent e..
    A     0.952  [0.844,1.060]        SPAM of the exponential decay A * u ** m
    u     0.978  [0.974,0.981]        Decay rate of the exponential decay A * u ** m

XRB on [2]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
   ru     6.126  [5.449,6.803]  e-03  Average gate infidelity of systematic coherent e..
    A     1.029  [0.980,1.079]        SPAM of the exponential decay A * u ** m
    u     0.976  [0.973,0.978]        Decay rate of the exponential decay A * u ** m

Example 3

#
# Simultaneous extended randomized benchmarking (XRB) with incoherence example.
# Copyright 2019 Quantum Benchmark Inc.
#

import trueq as tq

# Generate a circuit collection to run simultaneous XRB on qubits [0, 1, 2] with
# 30 random circuits for each circuit length in [4, 32, 64].
circuits = tq.make_xrb([0, 1, 2], [4, 32, 64], 30)

# 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].
srb_circuits = tq.make_srb([0, 1, 2], [4, 32, 64], 30)

# Append SRB circuits to the XRB circuit collection to analyze incoherence.
for circuit in srb_circuits:
    circuits.append(circuit)

# 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()
../_images/xrb3_example.svg
SRB on [0]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
    r     6.654  [5.834,7.473]  e-03  Average gate infidelity of the error map
    A     0.968  [0.941,0.996]        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.766  [6.059,7.472]  e-03  Average gate infidelity of the error map
    A     0.962  [0.935,0.989]        SPAM of the exponential decay A * p ** m
    p     0.986  [0.985,0.988]        Decay rate of the exponential decay A * p ** m

SRB on [2]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
    r     6.487  [5.895,7.079]  e-03  Average gate infidelity of the error map
    A     0.972  [0.949,0.994]        SPAM of the exponential decay A * p ** m
    p     0.987  [0.986,0.988]        Decay rate of the exponential decay A * p ** m

XRB on [0]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
   ru     5.934  [5.184,6.685]  e-03  Average gate infidelity of systematic coherent e..
  inc     0.892  [0.734,1.049]        Incoherence, 0 indicates entirely unitary noise ..
    A     0.973  [0.890,1.055]        SPAM of the exponential decay A * u ** m
    u     0.976  [0.973,0.979]        Decay rate of the exponential decay A * u ** m

XRB on [1]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
   ru     6.022  [5.304,6.740]  e-03  Average gate infidelity of systematic coherent e..
  inc     0.890  [0.749,1.031]        Incoherence, 0 indicates entirely unitary noise ..
    A     0.971  [0.877,1.066]        SPAM of the exponential decay A * u ** m
    u     0.976  [0.973,0.979]        Decay rate of the exponential decay A * u ** m

XRB on [2]
--------------------------------------------------------------------------------
 Name  Estimate   95% CI              Description
   ru     5.843  [4.920,6.766]  e-03  Average gate infidelity of systematic coherent e..
  inc     0.901  [0.736,1.065]        Incoherence, 0 indicates entirely unitary noise ..
    A     0.963  [0.841,1.085]        SPAM of the exponential decay A * u ** m
    u     0.977  [0.973,0.980]        Decay rate of the exponential decay A * u ** m