![]() |
Results from a cross-entropy benchmarking (XEB) experiment.
cirq.experiments.CrossEntropyResult(
data: List[CrossEntropyPair],
repetitions: int,
purity_data: Optional[List[SpecklePurityPair]] = None
)
May also include results from speckle purity benchmarking (SPB) performed concomitantly.
Attributes | |
---|---|
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
depolarizing_model() -> CrossEntropyDepolarizingModel
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
plot(
ax: Optional[plt.Axes] = None,
**plot_kwargs
) -> plt.Axes
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
purity_depolarizing_model() -> CrossEntropyDepolarizingModel
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__
__eq__(
other
)
Class Variables | |
---|---|
purity_data |
None
|