# Simultaneous extended randomized benchmarking (XRB) with incoherence¶

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.

# 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()

SRB on [0]
Name
Estimate
95% CI

Description
r
6.151
[5.380,6.922]
e-03
Average gate infidelity of the error map
A
0.960
[0.932,0.989]
SPAM of the exponential decay A * p ** m
p
0.988
[0.986,0.989]
Decay rate of the exponential decay A * p ** m
SRB on [1]
Name
Estimate
95% CI

Description
r
6.795
[5.952,7.639]
e-03
Average gate infidelity of the error map
A
0.973
[0.942,1.004]
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.772
[6.020,7.525]
e-03
Average gate infidelity of the error map
A
0.977
[0.953,1.001]
SPAM of the exponential decay A * p ** m
p
0.986
[0.985,0.988]
Decay rate of the exponential decay A * p ** m
XRB on [0]
Name
Estimate
95% CI

Description
ru
5.713
[4.984,6.443]
e-03
Average gate infidelity of systematic coherent error, d * (1 - sqrt(u)) / (d - 1), so that it is bounded between 0 and r from SRB
inc
0.929
[0.763,1.095]
Incoherence, 0 indicates entirely unitary noise and 1 indicates entirely depolarizing noise
A
1.013
[0.939,1.086]
SPAM of the exponential decay A * u ** m
u
0.977
[0.974,0.980]
Decay rate of the exponential decay A * u ** m
XRB on [1]
Name
Estimate
95% CI

Description
ru
5.417
[4.599,6.235]
e-03
Average gate infidelity of systematic coherent error, d * (1 - sqrt(u)) / (d - 1), so that it is bounded between 0 and r from SRB
inc
0.797
[0.641,0.953]
Incoherence, 0 indicates entirely unitary noise and 1 indicates entirely depolarizing noise
A
0.944
[0.839,1.049]
SPAM of the exponential decay A * u ** m
u
0.978
[0.975,0.982]
Decay rate of the exponential decay A * u ** m
XRB on [2]
Name
Estimate
95% CI

Description
ru
5.877
[5.118,6.637]
e-03
Average gate infidelity of systematic coherent error, d * (1 - sqrt(u)) / (d - 1), so that it is bounded between 0 and r from SRB
inc
0.868
[0.720,1.016]
Incoherence, 0 indicates entirely unitary noise and 1 indicates entirely depolarizing noise
A
0.978
[0.905,1.052]
SPAM of the exponential decay A * u ** m
u
0.977
[0.974,0.980]
Decay rate of the exponential decay A * u ** m

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

Gallery generated by Sphinx-Gallery