cirq.experiments.CrossEntropyResult

Results from a cross-entropy benchmarking (XEB) experiment.

May also include results from speckle purity benchmarking (SPB) performed concomitantly.

data A sequence of NamedTuples, each of which contains two fields: num_cycle: the circuit depth as the number of cycles, where a cycle consists of a layer of single-qubit gates followed by a layer of two-qubit gates. xeb_fidelity: the XEB fidelity after the given cycle number.
repetitions The number of circuit repetitions used.
purity_data A sequence of NamedTuples, each of which contains two fields: num_cycle: the circuit depth as the number of cycles, where a cycle consists of a layer of single-qubit gates followed by a layer of two-qubit gates. purity: the purity after the given cycle number.

Methods

depolarizing_model

View source

Fit a depolarizing error model for a cycle.

Fits an exponential model f = S * p**d, where d is the number of cycles and f is the cross entropy fidelity for that number of cycles, using nonlinear least squares.

Returns
A CrossEntropyDepolarizingModel object, which has attributes spam_depolarization representing the value S, cycle_depolarization representing the value p, and covariance representing the covariance in the estimation of S and p in that order.

plot

View source

Plots the average XEB fidelity vs the number of cycles.

Args
ax the plt.Axes to plot on. If not given, a new figure is created, plotted on, and shown.
**plot_kwargs Arguments to be passed to 'plt.Axes.plot'.

Returns
The plt.Axes containing the plot.

purity_depolarizing_model

View source

Fit a depolarizing error model for a cycle to purity data.

Fits an exponential model f = S * pd, where d is the number of cycles and p2 is the purity for that number of cycles, using nonlinear least squares.

Returns
A SpecklePurityDepolarizingModel object, which has attributes spam_depolarization representing the value S, cycle_depolarization representing the value p, and covariance representing the covariance in the estimation of S and p in that order. It also has the property purity representing the purity p**2.

__eq__

purity_data None