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()
True-Q formatting will not be loaded without trusting this notebook or rerunning the affected cells. Notebooks can be marked as trusted by clicking "File -> Trust Notebook".
SRB
Streamlined Randomized Benchmarking
Cliffords
(0,)
Key:
  • labels: (0,)
  • protocol: SRB
  • twirl: Cliffords on [0, (1, 2), 3]
Cliffords
(1, 2)
Key:
  • labels: (1, 2)
  • protocol: SRB
  • twirl: Cliffords on [0, (1, 2), 3]
Cliffords
(3,)
Key:
  • labels: (3,)
  • protocol: SRB
  • twirl: Cliffords on [0, (1, 2), 3]
${e}_{F}$
The probability of an error acting on the targeted systems during a random gate.
2.2e-02 (6.7e-04)
0.022351896090758022, 0.0006731262686944076
3.9e-02 (9.7e-04)
0.039407583615921477, 0.0009706079871587383
2.3e-02 (6.6e-04)
0.02295018537591409, 0.0006555177406606873
${p}$
Decay parameter of the exponential decay $Ap^m$.
9.7e-01 (9.0e-04)
0.9701974718789893, 0.0008975016915925435
9.6e-01 (1.0e-03)
0.9579652441430171, 0.0010353151863026543
9.7e-01 (8.7e-04)
0.9693997528321145, 0.0008740236542142496
${A}$
SPAM parameter of the exponential decay $Ap^m$.
9.5e-01 (9.6e-03)
0.947826736914207, 0.009636577396113514
9.0e-01 (1.0e-02)
0.9032693615810582, 0.010352856597719323
9.6e-01 (9.1e-03)
0.9633086848803958, 0.009099395610028871
XRB
Extended Randomized Benchmarking
Cliffords
(0,)
Key:
  • labels: (0,)
  • protocol: XRB
  • twirl: Cliffords on [0, (1, 2), 3]
Cliffords
(1, 2)
Key:
  • labels: (1, 2)
  • protocol: XRB
  • twirl: Cliffords on [0, (1, 2), 3]
Cliffords
(3,)
Key:
  • labels: (3,)
  • protocol: XRB
  • twirl: Cliffords on [0, (1, 2), 3]
${e}_{U}$
The process infidelity of the coherent error acting on the specifed systems during a random gate.
2.7e-03 (7.4e-04)
0.0027448461328761498, 0.000735054729372316
2.8e-03 (1.1e-03)
0.002790648986281258, 0.0010836056844101235
3.2e-03 (7.3e-04)
0.0032029946292276845, 0.0007336082468905021
${e}_{S}$
The probability of a stochastic error acting on the specified systems during a random gate.
2.0e-02 (3.0e-04)
0.019607049957881872, 0.00029530743567704617
3.7e-02 (4.8e-04)
0.03661693462964022, 0.00048178980328520283
2.0e-02 (3.3e-04)
0.019747190746686405, 0.0003293593046884571
${u}$
The unitarity of the noise, that is, the average decrease in the purity of an initial state.
9.5e-01 (7.7e-04)
0.9482271153230495, 0.0007720462080874461
9.2e-01 (9.9e-04)
0.9233140593518836, 0.0009901826934465736
9.5e-01 (8.6e-04)
0.9478607600653508, 0.0008609476897988751
${A}$
SPAM parameter of the exponential decay $Au^m$.
9.8e-01 (1.2e-02)
0.9785468392557938, 0.011607140860272215
9.6e-01 (1.3e-02)
0.9610584136855663, 0.012601755730692573
9.6e-01 (1.2e-02)
0.9621651966142377, 0.0121166367183988


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.190 seconds)

Gallery generated by Sphinx-Gallery