Analyzing Results

This tutorial provides an overview of how to use True-Q™'s analysis tools to retrieve parameters of interest from the results returned by True-Q™'s built-in protocols.

Each of True-Q™'s error characterization protocols returns parameters of interest that give information about the noise in your device or simulator. For example, in the case of SRB, the returned parameter is the process fidelity, averaged over the operations in the twirling group. This figure of merit largely quantifies compilation errors for the twirling gateset.

To see how to analyze the results for a given protocol, we first need a CircuitCollection containing circuits for a protocol, with populated results. To this end, we can run the following code to construct a collection of SRB circuits and get some simulated results:

import trueq as tq

# generate SRB circuits on a single qubit
circuit_collection = tq.make_srb(0, [4, 20, 60])

# create a noisy simulator
sim = tq.Simulator().add_overrotation(0.03)

# run the circuits on the noisy simulator and populate the results attribute
sim.run(circuit_collection)

To analyze the results, we can call the fit() method, which is a universal function for CircuitCollections containing Circuits from any subset of True-Q™'s error diagnostic protocols. The fit() method returns estimates for some set of protocol-specific parameters.

circuit_collection.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]
${e}_{F}$
The probability of an error acting on the targeted systems during a random gate.
1.8e-03 (4.6e-04)
0.0017526492873971844, 0.00045900922715646846
${p}$
Decay parameter of the exponential decay $Ap^m$.
1.0e+00 (6.1e-04)
0.9976631342834704, 0.0006120123028752912
${A}$
SPAM parameter of the exponential decay $Ap^m$.
9.9e-01 (1.1e-02)
0.9921628526911916, 0.010973928479106524


As you can see above, fit() prints a table containing the parameter estimates returned when the results are analyzed. Every protocol will return different estimates corresponding to the parameters the protocol is characterizing. Mousing over a parameter will give a short description of what the parameter means. If a circuit collection contains circuits from more than one error diagnostic protocol, fit will return fits for each protocol. For example, if we add some XRB circuits to the circuit collection we defined above, we get the following:

# generate XRB circuits and append them to the circuit_collection
circuit_collection += tq.make_xrb(1, [4, 20, 60])

# run circuits again to populate XRB circuits. We set overwrite = False to keep the
# results obtained above for the SRB circuits
sim.run(circuit_collection, overwrite=False)

# analyze results
circuit_collection.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]
${e}_{F}$
The probability of an error acting on the targeted systems during a random gate.
1.8e-03 (3.9e-04)
0.0018245169828323693, 0.00039304697793727736
${p}$
Decay parameter of the exponential decay $Ap^m$.
1.0e+00 (5.2e-04)
0.9975673106895568, 0.0005240626372497031
${A}$
SPAM parameter of the exponential decay $Ap^m$.
9.9e-01 (9.4e-03)
0.9937666487643162, 0.009368052703296326
XRB
Extended Randomized Benchmarking
Cliffords
(1,)
Key:
  • labels: (1,)
  • protocol: XRB
  • twirl: Cliffords on [1]
${e}_{S}$
The probability of a stochastic error acting on the specified systems during a random gate.
8.1e-05 (2.3e-04)
8.143472019239706e-05, 0.0002268092462921553
${u}$
The unitarity of the noise, that is, the average decrease in the purity of an initial state.
1.0e+00 (6.0e-04)
0.9997828495883051, 0.0006047754030523905
${A}$
SPAM parameter of the exponential decay $Au^m$.
1.0e+00 (1.6e-02)
1.0289096192203944, 0.01588277768598196


Optional Fitting Arguments

Valid options for the trueq.CircuitCollection.fit() method.

Certain analysis routines use optional arguments. The table below is an exhaustive list of possible arguments. These arguments can be passed into the fit() method as keyword arguments.

type

object

properties

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

Gallery generated by Sphinx-Gallery