Comparing Infidelities with SRB and XRB

This example demonstrates how to estimate the process infidelities of specified systems using SRB, and how this quantity can be divided into coherent and stochastic infidelity by the addition of XRB circuits. While this example uses a simulator to execute the circuits, the same procedure can be followed for hardware applications.

import trueq as tq

# generate SRB circuits to simultaneously characterize a single qubit [0],
# a pair of qubits [1, 2], and another single qubit [3]
circuits = tq.make_srb([[0], [1, 2], [3]], [4, 32, 64], 30)

# generate XRB circuits using the same arguments as SRB and combine them
circuits += tq.make_xrb([[0], [1, 2], [3]], [4, 32, 64], 30)

# initialize a noisy simulator with stochastic Pauli and overrotation
sim = tq.Simulator().add_stochastic_pauli(px=0.02).add_overrotation(0.04)

# run the circuits on the simulator to populate their results
sim.run(circuits, n_shots=1000)

# print the fit summary
circuits.fit()
SRB
Streamlined Randomized Benchmarking
Cliffords
(0,)
Key:
  • labels: (0,)
  • protocol: SRB
  • twirl: (('C', 0), ('C', 3), ('C', 1, 2))
Cliffords
(1, 2)
Key:
  • labels: (1, 2)
  • protocol: SRB
  • twirl: (('C', 0), ('C', 3), ('C', 1, 2))
Cliffords
(3,)
Key:
  • labels: (3,)
  • protocol: SRB
  • twirl: (('C', 0), ('C', 3), ('C', 1, 2))
${e}_{P}$
The probability of an error acting on the targeted systems during a random gate.
2.4e-02 (7.1e-04)
0.024252955597192316, 0.0007106972738506496
3.9e-02 (1.1e-03)
0.03931741977816917, 0.0011155329628177793
2.3e-02 (6.6e-04)
0.02264122110241437, 0.0006633838187555764
${p}$
Decay parameter of the exponential decay $Ap^m$.
9.7e-01 (9.5e-04)
0.9676627258704102, 0.0009475963651341994
9.6e-01 (1.2e-03)
0.9580614189032862, 0.0011899018270056312
9.7e-01 (8.8e-04)
0.9698117051967808, 0.0008845117583407685
${A}$
SPAM parameter of the exponential decay $Ap^m$.
9.6e-01 (8.3e-03)
0.9642979620246094, 0.008337889158902843
9.3e-01 (1.2e-02)
0.9262015891154877, 0.011510270736281972
9.6e-01 (1.1e-02)
0.9596493667117473, 0.010873504962323765
XRB
Extended Randomized Benchmarking
Cliffords
(0,)
Key:
  • labels: (0,)
  • protocol: XRB
  • twirl: (('C', 0), ('C', 3), ('C', 1, 2))
Cliffords
(1, 2)
Key:
  • labels: (1, 2)
  • protocol: XRB
  • twirl: (('C', 0), ('C', 3), ('C', 1, 2))
Cliffords
(3,)
Key:
  • labels: (3,)
  • protocol: XRB
  • twirl: (('C', 0), ('C', 3), ('C', 1, 2))
${e}_{U}$
The process infidelity of the coherent error acting on the specifed systems during a random gate.
4.8e-03 (8.2e-04)
0.004804802113666434, 0.0008234171260418167
2.6e-03 (1.2e-03)
0.0026197688575045966, 0.0012021060611638284
2.9e-03 (7.4e-04)
0.0028505624678361596, 0.0007431073306842194
${e}_{S}$
The probability of a stochastic error acting on the specified systems during a random gate.
1.9e-02 (4.2e-04)
0.019448153483525882, 0.0004158426967017936
3.7e-02 (4.5e-04)
0.03669765092066457, 0.0004479343603183409
2.0e-02 (3.3e-04)
0.019790658634578212, 0.00033485879700239973
${u}$
The unitarity of the noise, that is, the average decrease in the purity of an initial state.
9.5e-01 (1.1e-03)
0.948810667464231, 0.0010801587553275927
9.2e-01 (9.2e-04)
0.9232439433749037, 0.0009181874039651234
9.5e-01 (8.7e-04)
0.9479212128307967, 0.000869393854611697
${A}$
SPAM parameter of the exponential decay $Au^m$.
9.5e-01 (1.7e-02)
0.9521557670539459, 0.016790572996155242
9.5e-01 (1.3e-02)
0.9479250313467885, 0.012674980877751029
9.8e-01 (1.9e-02)
0.9805468532847893, 0.018554252737911624


Notice that the fit() output contains an estimate of process infidelity for the specified systems from SRB, the stochastic infidelity from XRB, and the unitary infidelity which would be absent if the circuit collection did not contain both SRB and XRB circuits. We can visualize the different process infidelities as follows.

# plot a comparison of process infidelities
circuits.plot.compare_rb()
Comparison for Cliffords on [0, (1, 2), 3]

Total running time of the script: ( 0 minutes 7.863 seconds)

Gallery generated by Sphinx-Gallery