Note

Click here to download the full example code

# Extended randomized benchmarking (XRB)¶

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

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