Readout Calibration

import trueq as tq

# Make a circuit collection containing extended randomized compiling circuits acting on
# the 0th qubit
circuits = tq.make_xrb([0], [4, 32, 64], 30)

# Add readout calibration circuits to the circuit collection, with calibration on
# the 0th qubit
circuits.append(tq.make_readout_calibration([0]))

# Initialize a noisy simulator
sim = tq.Simulator().add_depolarizing(p=0.02).add_readout_error(0.2)

# Run the circuit collection. Because readout calibration circuits are included,
# measurement errors will be corrected for every xrb circtuit in the collection.
sim.run(circuits)

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

Gallery generated by Sphinx-Gallery